Bump version for onEnd callback
This commit is contained in:
parent
9f5aa72d94
commit
25628d9877
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
node_modules/**/*
|
node_modules/**/*
|
||||||
RCTVideo.xcodeproj/xcuserdata/**/*
|
RCTVideo.xcodeproj/xcuserdata/**/*
|
||||||
RCTVideo.xcodeproj/project.xcworkspace/**/*
|
RCTVideo.xcodeproj/project.xcworkspace/**/*
|
||||||
|
Examples/VideoPlayer/node_modules/**/*
|
||||||
|
@ -11,6 +11,7 @@ var {
|
|||||||
Text,
|
Text,
|
||||||
View,
|
View,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
|
AlertIOS,
|
||||||
} = React;
|
} = React;
|
||||||
|
|
||||||
var Video = require('react-native-video');
|
var Video = require('react-native-video');
|
||||||
@ -95,6 +96,7 @@ var VideoPlayer = React.createClass({
|
|||||||
resizeMode={this.state.resizeMode}
|
resizeMode={this.state.resizeMode}
|
||||||
onLoad={this.onLoad}
|
onLoad={this.onLoad}
|
||||||
onProgress={this.onProgress}
|
onProgress={this.onProgress}
|
||||||
|
onEnd={() => { AlertIOS.alert('Done!') }}
|
||||||
repeat={true} />
|
repeat={true} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
|
@ -7,6 +7,6 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react-native": "0.3.10",
|
"react-native": "0.3.10",
|
||||||
"react-native-video": "^0.2.6"
|
"react-native-video": "^0.2.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,9 @@ A <Video> component for react-native, as seen in
|
|||||||
paused={false} // Pauses playback entirely.
|
paused={false} // Pauses playback entirely.
|
||||||
resizeMode="cover" // Fill the whole screen at aspect ratio.
|
resizeMode="cover" // Fill the whole screen at aspect ratio.
|
||||||
repeat={true} // Repeat forever.
|
repeat={true} // Repeat forever.
|
||||||
onEnd={this._onEnd} // handle end of playback
|
onLoad={this.setDuration} // Callback when video loads
|
||||||
|
onProgress={this.setTime} // Callback every ~250ms with currentTime
|
||||||
|
onEnd={this.onEnd} // Callback when playback finishes
|
||||||
style={styles.backgroundVideo} />
|
style={styles.backgroundVideo} />
|
||||||
|
|
||||||
// Later on in your styles..
|
// Later on in your styles..
|
||||||
@ -57,5 +59,4 @@ Example code [here](https://github.com/brentvatne/react-native-login/blob/master
|
|||||||
- [ ] Add support for captions
|
- [ ] Add support for captions
|
||||||
- [ ] Support `require('video!...')`
|
- [ ] Support `require('video!...')`
|
||||||
- [ ] Add support for playing multiple videos in a sequence (will interfere with current `repeat` implementation)
|
- [ ] Add support for playing multiple videos in a sequence (will interfere with current `repeat` implementation)
|
||||||
- [x] Add `onComplete` callback for when it finishes playing
|
|
||||||
- [ ] Callback to get buffering progress for remote videos
|
- [ ] Callback to get buffering progress for remote videos
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-video",
|
"name": "react-native-video",
|
||||||
"version": "0.2.7",
|
"version": "0.2.8",
|
||||||
"description": "A <Video /> element for react-native",
|
"description": "A <Video /> element for react-native",
|
||||||
"main": "Video.ios.js",
|
"main": "Video.ios.js",
|
||||||
"author": "Brent Vatne <brentvatne@gmail.com> (https://github.com/brentvatne)",
|
"author": "Brent Vatne <brentvatne@gmail.com> (https://github.com/brentvatne)",
|
||||||
|
Loading…
Reference in New Issue
Block a user