播放器
This commit is contained in:
@@ -6,8 +6,8 @@
|
|||||||
scroll-x="true"
|
scroll-x="true"
|
||||||
class="detail_title video_box"
|
class="detail_title video_box"
|
||||||
style="background-color: #fff"
|
style="background-color: #fff"
|
||||||
>
|
>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
v-for="(v, i) in dataList"
|
v-for="(v, i) in dataList"
|
||||||
:class="`video_item ${currentVideo&¤tVideo.id == v.id ? 'hot' : ''}`"
|
:class="`video_item ${currentVideo&¤tVideo.id == v.id ? 'hot' : ''}`"
|
||||||
@@ -35,6 +35,9 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad(options) {},
|
onLoad(options) {},
|
||||||
onHide() {},
|
onHide() {},
|
||||||
|
mounted() {
|
||||||
|
console.log('currentVideo播放列表收到的--',this.currentVideo)
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["userInfo"]),
|
...mapState(["userInfo"]),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -127,12 +127,12 @@
|
|||||||
this.isChange = false;
|
this.isChange = false;
|
||||||
},
|
},
|
||||||
async changeVideo(data) {
|
async changeVideo(data) {
|
||||||
console.log('changeVideo',);
|
console.log('changeVideo+++++++++',data);
|
||||||
this.currentTime = "";
|
this.currentTime = "";
|
||||||
this.firstTime = 0;
|
this.firstTime = 0;
|
||||||
this.isSetFirstTime = false;
|
this.isSetFirstTime = false;
|
||||||
this.isChange = false;
|
this.isChange = false;
|
||||||
this.getLive(true, this.currentVideo)
|
this.getLive(true, data)
|
||||||
// await this.init(data, true);
|
// await this.init(data, true);
|
||||||
},
|
},
|
||||||
screenChange(data) {
|
screenChange(data) {
|
||||||
@@ -663,7 +663,7 @@
|
|||||||
source: this.videoData.m3u8Url,
|
source: this.videoData.m3u8Url,
|
||||||
// "playConfig": {"EncryptType": "HLSEncryption"}
|
// "playConfig": {"EncryptType": "HLSEncryption"}
|
||||||
}
|
}
|
||||||
console.log('这是标准加密的视频');
|
console.log('这是标准加密的视频',this.videoData.id,this.videoData.m3u8Url);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<view
|
<view
|
||||||
class="contentBox curriculum_box"
|
class="contentBox curriculum_box"
|
||||||
:style="`height:calc(100% - ${60 + statusBarHeight}px !important;${
|
:style="`height:calc(100% - ${60 + statusBarHeight}px !important; overflow-x: hidden; ${
|
||||||
isFullScreen ? 'background:#000' : ''
|
isFullScreen ? 'background:#000' : ''
|
||||||
}`"
|
}`"
|
||||||
>
|
>
|
||||||
@@ -25,8 +25,7 @@
|
|||||||
>
|
>
|
||||||
</common-video>
|
</common-video>
|
||||||
<view style="height: 200px" v-else></view>
|
<view style="height: 200px" v-else></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<scroll-view
|
<scroll-view
|
||||||
:style="`height:calc(100% - 200px - 40rpx) ;`"
|
:style="`height:calc(100% - 200px - 40rpx) ;`"
|
||||||
scroll-y="true"
|
scroll-y="true"
|
||||||
@@ -280,23 +279,25 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
changeVideo(data) {
|
changeVideo(data) {
|
||||||
console.log("data at line 370:", data);
|
console.log("点击了点击了切换视频-----:", data);
|
||||||
|
|
||||||
if (data.id != this.currentVideo.id) {
|
if (data.id != this.currentVideo.id) {
|
||||||
// handleEnd
|
// handleEnd
|
||||||
// this.$refs.commonVideo.handleEnd();
|
// this.$refs.commonVideo.handleEnd();
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.currentVideo = data;
|
|
||||||
this.$refs.commonVideo.changeVideo();
|
this.$refs.commonVideo.changeVideo(data);
|
||||||
|
this.currentVideo = data;
|
||||||
// this.changeVideo()
|
// this.changeVideo()
|
||||||
// this.initVideo();
|
// this.initVideo();
|
||||||
this.isOpenMp3 = false;
|
this.isOpenMp3 = false;
|
||||||
}, 500);
|
}, 500);
|
||||||
} else {
|
}
|
||||||
this.currentVideo = data;
|
// else {
|
||||||
this.initVideo();
|
// this.currentVideo = data;
|
||||||
this.isOpenMp3 = false;
|
// this.initVideo();
|
||||||
}
|
// this.isOpenMp3 = false;
|
||||||
|
// }
|
||||||
|
|
||||||
// console.log("data at line 380111111111111111111:", data.type);
|
// console.log("data at line 380111111111111111111:", data.type);
|
||||||
},
|
},
|
||||||
@@ -376,6 +377,7 @@ export default {
|
|||||||
isHaveHistorySeekVideo != -1 ? isHaveHistorySeekVideo : 0;
|
isHaveHistorySeekVideo != -1 ? isHaveHistorySeekVideo : 0;
|
||||||
if (that.videoArray.length > 0) {
|
if (that.videoArray.length > 0) {
|
||||||
this.currentVideo = that.videoArray[that.currentCateIndex];
|
this.currentVideo = that.videoArray[that.currentCateIndex];
|
||||||
|
console.log('默认播放的index',that.currentCateIndex, this.currentVideo.id,that.videoArray);
|
||||||
this.initVideo();
|
this.initVideo();
|
||||||
}
|
}
|
||||||
var videoArray = [];
|
var videoArray = [];
|
||||||
|
|||||||
@@ -1902,6 +1902,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
|
|
||||||
// text-align: center;
|
// text-align: center;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
Reference in New Issue
Block a user