|
@@ -124,15 +124,19 @@ export default class CusVideo extends React.Component {
|
|
|
});
|
|
|
};
|
|
|
play() {
|
|
|
- this.setState({ paused: false });
|
|
|
- // if (this.state.paused) {
|
|
|
- // this.player_icon_index = 1;
|
|
|
- // } else {
|
|
|
- // this.player_icon_index = 0;
|
|
|
- // }
|
|
|
+ if (this.state.paused) {
|
|
|
+ this.start();
|
|
|
+ } else {
|
|
|
+ this.pause();
|
|
|
+ }
|
|
|
}
|
|
|
pause() {
|
|
|
this.setState({ paused: true });
|
|
|
+ this.player_icon_index = 1;
|
|
|
+ }
|
|
|
+ start() {
|
|
|
+ this.setState({ paused: false });
|
|
|
+ this.player_icon_index = 0;
|
|
|
}
|
|
|
showToast(params) {
|
|
|
// ToastExample.message(params);
|
|
@@ -140,7 +144,10 @@ export default class CusVideo extends React.Component {
|
|
|
}
|
|
|
|
|
|
refreshVideo() {
|
|
|
- this.setState({ duration: 0, currentTime: 0 });
|
|
|
+ this.setState({
|
|
|
+ duration: 0,
|
|
|
+ currentTime: 0
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -160,7 +167,7 @@ const styles = StyleSheet.create({
|
|
|
height: "80%",
|
|
|
justifyContent: "center",
|
|
|
alignItems: "center",
|
|
|
- backgroundColor: "red"
|
|
|
+ backgroundColor: "blue"
|
|
|
},
|
|
|
player_time: {
|
|
|
backgroundColor: "red",
|