|
@@ -42,7 +42,7 @@ export default class CusVideo extends React.Component {
|
|
|
resizeMode: "stretch",
|
|
|
duration: 0.0,
|
|
|
currentTime: 0.0,
|
|
|
- paused: false,
|
|
|
+ paused: true,
|
|
|
wheel: false,
|
|
|
isFull: false,
|
|
|
needback: this.props.needback,
|
|
@@ -141,6 +141,9 @@ export default class CusVideo extends React.Component {
|
|
|
}
|
|
|
|
|
|
componentWillMount() {
|
|
|
+ if (this.state.pause) {
|
|
|
+ }
|
|
|
+
|
|
|
this.videotouch = PanResponder.create({
|
|
|
onStartShouldSetPanResponder: (evt, gestureState) => true,
|
|
|
onStartShouldSetPanResponderCapture: (evt, gestureState) => true,
|
|
@@ -561,18 +564,22 @@ const styles = StyleSheet.create({
|
|
|
|
|
|
/**
|
|
|
使用方法
|
|
|
- <CusVideo
|
|
|
- uri={this.state.video_uri}
|
|
|
- ref={view => (this.video = view)}
|
|
|
- needback={true} //(是否需要小窗口的返回按钮)
|
|
|
- videoback={this.clickVideoBack.bind(this)}//(小窗口返回按钮的事件)
|
|
|
- videofullScreenPlayer={this.fullScreenPlayer.bind(this)}//(点击全屏按钮的事件)
|
|
|
- style={{
|
|
|
- flex: this.state.video_flex,
|
|
|
- width: this.state.video_width,
|
|
|
- height: this.state.video_height
|
|
|
- }}
|
|
|
- />
|
|
|
+ <CusVideo
|
|
|
+ show={this.state.video_show} //是否显示
|
|
|
+ uri={this.state.video_uri} //播放路径
|
|
|
+ ref={view => (this.video = view)} //设置ID
|
|
|
+ needback={false}
|
|
|
+ videoback={() => alert("videoback")}
|
|
|
+ videofullScreenPlayer={this.fullScreenPlayer.bind(this)}
|
|
|
+ style={{
|
|
|
+ left: this.state.x,
|
|
|
+ top: this.state.y,
|
|
|
+ width: this.state.video_width,
|
|
|
+ height: this.state.video_height,
|
|
|
+ overflow: "hidden",
|
|
|
+ position: "absolute"
|
|
|
+ }}
|
|
|
+ />
|
|
|
|
|
|
|
|
|
*/
|