|
@@ -5,9 +5,10 @@
|
|
<text class="nav-bar-title">视频播放</text>
|
|
<text class="nav-bar-title">视频播放</text>
|
|
</view>
|
|
</view>
|
|
<view ref="videoContent" id="wgy-player-test" :playAuth="playAuth" :change:playAuth="renderScript.receiveMsg"
|
|
<view ref="videoContent" id="wgy-player-test" :playAuth="playAuth" :change:playAuth="renderScript.receiveMsg"
|
|
- :videoId="videoId" :change:videoId="renderScript.videoIdFun"
|
|
|
|
- :progressMarkers="progressMarkers" :change:progressMarkers="renderScript.progressMarkersMsg"
|
|
|
|
- :seekTime="seekTime" :change:seekTime="renderScript.seekTimeFun" class="course-video-box">
|
|
|
|
|
|
+ :videoId="videoId" :change:videoId="renderScript.videoIdFun" :hideFlag="hideFlag"
|
|
|
|
+ :change:hideFlag="renderScript.hideFlagFun" :progressMarkers="progressMarkers"
|
|
|
|
+ :change:progressMarkers="renderScript.progressMarkersMsg" :seekTime="seekTime"
|
|
|
|
+ :change:seekTime="renderScript.seekTimeFun" class="course-video-box">
|
|
</view>
|
|
</view>
|
|
<view class="course-content-border">
|
|
<view class="course-content-border">
|
|
<view class="course-content-box">
|
|
<view class="course-content-box">
|
|
@@ -60,6 +61,7 @@
|
|
playAuth: "", //播放凭证
|
|
playAuth: "", //播放凭证
|
|
progressMarkers: [],
|
|
progressMarkers: [],
|
|
jieName: '',
|
|
jieName: '',
|
|
|
|
+ hideFlag: 'show',
|
|
videoId: "", //阿里云视频id
|
|
videoId: "", //阿里云视频id
|
|
seekTime: ''
|
|
seekTime: ''
|
|
}
|
|
}
|
|
@@ -77,17 +79,25 @@
|
|
this.getLive(); //获取播放凭证
|
|
this.getLive(); //获取播放凭证
|
|
//uni.$on('playEnd', this.playEnd);
|
|
//uni.$on('playEnd', this.playEnd);
|
|
},
|
|
},
|
|
|
|
+ onHide() {
|
|
|
|
+ console.log('onHideonHideonHideonHide');
|
|
|
|
+ this.hideFlag = 'hide'
|
|
|
|
+ },
|
|
|
|
+ onUnload() {
|
|
|
|
+ console.log('onUnloadonUnloadonUnloadonUnloadonUnload');
|
|
|
|
+ this.hideFlag = 'hide'
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
playEnd(data) {
|
|
playEnd(data) {
|
|
- this.$refs.popupRef.open();
|
|
|
|
|
|
+ this.$refs.popupRef.open();
|
|
},
|
|
},
|
|
goBack() {
|
|
goBack() {
|
|
- this.$refs.popupRef.close();
|
|
|
|
- this.goUpPage()
|
|
|
|
|
|
+ this.$refs.popupRef.close();
|
|
|
|
+ this.goUpPage()
|
|
},
|
|
},
|
|
goNext() {
|
|
goNext() {
|
|
- this.$refs.popupRef.close();
|
|
|
|
- toast("暂无此功能");
|
|
|
|
|
|
+ this.$refs.popupRef.close();
|
|
|
|
+ toast("暂无此功能");
|
|
return false
|
|
return false
|
|
},
|
|
},
|
|
getLive() {
|
|
getLive() {
|
|
@@ -141,7 +151,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
-
|
|
|
|
|
|
+
|
|
receiveMsg(newValue, oldValue, ownerInstance, instance) {
|
|
receiveMsg(newValue, oldValue, ownerInstance, instance) {
|
|
// console.log('service层中的options发生变化')
|
|
// console.log('service层中的options发生变化')
|
|
// console.log('新值', newValue)
|
|
// console.log('新值', newValue)
|
|
@@ -155,11 +165,14 @@
|
|
this.playAli()
|
|
this.playAli()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- videoIdFun(newValue, oldValue, ownerInstance, instance) {
|
|
|
|
|
|
+ videoIdFun(newValue, oldValue, ownerInstance, instance) {
|
|
if (newValue) {
|
|
if (newValue) {
|
|
this.videoId = newValue
|
|
this.videoId = newValue
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ hideFlagFun(newValue, oldValue, ownerInstance, instance) {
|
|
|
|
+ this.player.pause()
|
|
|
|
+ },
|
|
progressMarkersMsg(newValue, oldValue, ownerInstance, instance) {
|
|
progressMarkersMsg(newValue, oldValue, ownerInstance, instance) {
|
|
|
|
|
|
if (newValue) {
|
|
if (newValue) {
|
|
@@ -214,40 +227,38 @@
|
|
// "playConfig": {
|
|
// "playConfig": {
|
|
// "EncryptType": 'AliyunVoDEncryption'
|
|
// "EncryptType": 'AliyunVoDEncryption'
|
|
// },
|
|
// },
|
|
- "skinLayout": [
|
|
|
|
- {
|
|
|
|
- "name": "bigPlayButton",
|
|
|
|
- "align": "blabs",
|
|
|
|
- "x": 30,
|
|
|
|
- "y": 80
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- "name": "controlBar",
|
|
|
|
- "align": "blabs",
|
|
|
|
- "x": 0,
|
|
|
|
- "y": 0,
|
|
|
|
- "children": [
|
|
|
|
- {
|
|
|
|
- "name": "progress",
|
|
|
|
- "align": "blabs",
|
|
|
|
- "x": 0,
|
|
|
|
- "y": 44
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- "name": "playButton",
|
|
|
|
- "align": "tl",
|
|
|
|
- "x": 15,
|
|
|
|
- "y": 12
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- "name": "fullScreenButton",
|
|
|
|
- "align": "tr",
|
|
|
|
- "x": 10,
|
|
|
|
- "y": 12
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
|
|
+ "skinLayout": [{
|
|
|
|
+ "name": "bigPlayButton",
|
|
|
|
+ "align": "blabs",
|
|
|
|
+ "x": 30,
|
|
|
|
+ "y": 80
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "name": "controlBar",
|
|
|
|
+ "align": "blabs",
|
|
|
|
+ "x": 0,
|
|
|
|
+ "y": 0,
|
|
|
|
+ "children": [{
|
|
|
|
+ "name": "progress",
|
|
|
|
+ "align": "blabs",
|
|
|
|
+ "x": 0,
|
|
|
|
+ "y": 44
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "name": "playButton",
|
|
|
|
+ "align": "tl",
|
|
|
|
+ "x": 15,
|
|
|
|
+ "y": 12
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "name": "fullScreenButton",
|
|
|
|
+ "align": "tr",
|
|
|
|
+ "x": 10,
|
|
|
|
+ "y": 12
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
"qualitySort": "asc",
|
|
"qualitySort": "asc",
|
|
"format": "mp4",
|
|
"format": "mp4",
|
|
"mediaType": "video",
|
|
"mediaType": "video",
|
|
@@ -271,7 +282,9 @@
|
|
|
|
|
|
});
|
|
});
|
|
player.on('ended', function() {
|
|
player.on('ended', function() {
|
|
- that.$ownerInstance.callMethod('playEnd', {data:'end'})
|
|
|
|
|
|
+ that.$ownerInstance.callMethod('playEnd', {
|
|
|
|
+ data: 'end'
|
|
|
|
+ })
|
|
// uni.$emit('playEnd', {
|
|
// uni.$emit('playEnd', {
|
|
// data: 'end'
|
|
// data: 'end'
|
|
// });
|
|
// });
|