|
@@ -67,16 +67,16 @@
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- let data = JSON.parse(options.studyData)
|
|
|
- console.log(data);
|
|
|
- this.pageData = {
|
|
|
- ...data
|
|
|
- }
|
|
|
- console.log(this.pageData);
|
|
|
- this.videoId = data.videoId
|
|
|
- this.jieName = data.jieName
|
|
|
- this.progressMarkers = data.progressMarkers
|
|
|
- this.getLive(); //获取播放凭证
|
|
|
+ // let data = JSON.parse(options.studyData)
|
|
|
+ // console.log(data);
|
|
|
+ // this.pageData = {
|
|
|
+ // ...data
|
|
|
+ // }
|
|
|
+ // console.log(this.pageData);
|
|
|
+ // this.videoId = data.videoId
|
|
|
+ // this.jieName = data.jieName
|
|
|
+ // this.progressMarkers = data.progressMarkers
|
|
|
+ // this.getLive(); //获取播放凭证
|
|
|
//uni.$on('playEnd', this.playEnd);
|
|
|
},
|
|
|
onHide() {
|
|
@@ -171,7 +171,9 @@
|
|
|
}
|
|
|
},
|
|
|
hideFlagFun(newValue, oldValue, ownerInstance, instance) {
|
|
|
- this.player.pause()
|
|
|
+ if(this.player){
|
|
|
+ this.player.pause()
|
|
|
+ }
|
|
|
},
|
|
|
progressMarkersMsg(newValue, oldValue, ownerInstance, instance) {
|
|
|
|
|
@@ -222,57 +224,12 @@
|
|
|
//配置播放器
|
|
|
var player = new Aliplayer({
|
|
|
id: "wgy-player-test",
|
|
|
- "vid": this.videoId,
|
|
|
- "playauth": this.playAuth,
|
|
|
- // "playConfig": {
|
|
|
- // "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
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ],
|
|
|
- "qualitySort": "asc",
|
|
|
- "format": "mp4",
|
|
|
- "mediaType": "video",
|
|
|
- "encryptType": 1,
|
|
|
- "progressMarkers": this.progressMarkers,
|
|
|
- "width": '100%',
|
|
|
- "height": '500px',
|
|
|
- "autoplay": false,
|
|
|
- "isLive": false,
|
|
|
- "rePlay": false,
|
|
|
- "playsinline": true,
|
|
|
- "preload": false,
|
|
|
- "controlBarVisibility": "hover",
|
|
|
- "useH5Prism": true
|
|
|
+ width: "100%",
|
|
|
+ source: " https://media.w3.org/2010/05/sintel/trailer.mp4",
|
|
|
+ height: "500px",
|
|
|
+ autoplay: false,
|
|
|
+ preload: false,
|
|
|
+ isLive: false
|
|
|
|
|
|
}, function(player) {});
|
|
|
this.player = player;
|
|
@@ -299,7 +256,7 @@
|
|
|
s_tag.src = 'https://g.alicdn.com/de/prismplayer/2.9.6/aliplayer-min.js';
|
|
|
s_tag.charset = 'utf-8';
|
|
|
s_tag.onload = () => {
|
|
|
- // this.checkValue();
|
|
|
+ this.playAli()
|
|
|
resolve();
|
|
|
}
|
|
|
document.body.appendChild(s_tag);
|