|
@@ -65,13 +65,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
- HideVideo: function(newVal, oldVal) {
|
|
|
- if (newVal) {
|
|
|
- document.getElementById("player-tencent").style.display = "none";
|
|
|
- } else {
|
|
|
- document.getElementById("player-tencent").style.display = "block";
|
|
|
- }
|
|
|
- },
|
|
|
+ // HideVideo: function(newVal, oldVal) {
|
|
|
+ // if (newVal) {
|
|
|
+ // document.getElementById("player-tencent").setAttribute("style","visibility:hidden");
|
|
|
+ // } else {
|
|
|
+ // document.getElementById("player-tencent").setAttribute("style","visibility:visible");
|
|
|
+ // }
|
|
|
+ // },
|
|
|
//因为刚开始获取不到goodsData的数据 所以需要监听
|
|
|
goodsData: function(newVal, oldVal) {
|
|
|
if (newVal) {
|
|
@@ -119,10 +119,17 @@ export default {
|
|
|
viewSign == 2 ? "pause" : "s2j_onVideoPause",
|
|
|
this.onVideoPause
|
|
|
); //视频暂停时触发
|
|
|
- this[viewSign == 2 ? "player_tencent" : "player"].on(
|
|
|
- viewSign == 2 ? "playing" : "s2j_onVideoPlay",
|
|
|
- this.onVideoPlay
|
|
|
- ); //视频播放或由暂停恢复播放时触发
|
|
|
+ // this[viewSign == 2 ? "player_tencent" : "player"].on(
|
|
|
+ // viewSign == 2 ? "playing" : "s2j_onVideoPlay",
|
|
|
+ // this.onVideoPlay
|
|
|
+ // );
|
|
|
+ if(viewSign == 2){
|
|
|
+ this.player_tencent.on("playing",this.onVideoPlay)
|
|
|
+ }else{
|
|
|
+ this.player.on("s2j_onPlayStart",this.onVideoPlay)
|
|
|
+ this.player.on("s2j_onVideoPlay",this.onVideoPlay)
|
|
|
+ }
|
|
|
+ //视频播放或由暂停恢复播放时触发
|
|
|
this[viewSign == 2 ? "player_tencent" : "player"].on(
|
|
|
viewSign == 2 ? "ended" : "s2j_onPlayOver",
|
|
|
this.onPlayOver
|
|
@@ -571,6 +578,7 @@ export default {
|
|
|
},
|
|
|
//视频恢复播放时触发
|
|
|
onVideoPlay() {
|
|
|
+ console.log("触发一下吧")
|
|
|
if (this.firstPlay) {
|
|
|
this.firstPlay = false;
|
|
|
//计算拍照逻辑
|