ui修改
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
"src" : "图片路径"
|
||||
}
|
||||
],
|
||||
"versionName" : "1.0.09",
|
||||
"versionCode" : 1009,
|
||||
"versionName" : "1.0.11",
|
||||
"versionCode" : 1011,
|
||||
"app-plus" : {
|
||||
"nvueCompiler" : "weex",
|
||||
"compatible" : {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="container" style="background-color: #000; position: relative">
|
||||
<u-modal :show="show" :title="title" :content='content'></u-modal>
|
||||
<!-- <u-modal :show="show" :title="videoTitle" :content='content'></u-modal> -->
|
||||
<!-- <u-icon
|
||||
@click="goBack"
|
||||
name="arrow-left"
|
||||
@@ -17,7 +17,10 @@
|
||||
<button type="primary" @click="start()">开始</button>
|
||||
<button type="primary" @click="pause()">暂停</button> -->
|
||||
<view style="width: 100%; height: 200px">
|
||||
<div class="" style="background-color: #000" ref="videoContent" @tap="renderScript.handleClick"
|
||||
<view v-if="show" style="height: 100%;display: flex;align-items:center;justify-content:center;color: #fff;font-size: 38rpx;text-align: center;">
|
||||
此设备暂不支持观看当前视频<br/>请移步到安卓手机进行学习!
|
||||
</view>
|
||||
<div class="" v-else style="background-color: #000" ref="videoContent" @tap="renderScript.handleClick"
|
||||
id="url-player-test" :videoData="videoData" :winWidth="winWidth" :winHeight="winHeight"
|
||||
:currentVideoList="currentVideoList" :firstTime="firstTime" :isfresh="isfresh" :platform="platform"
|
||||
:isSetFirstTime="isSetFirstTime" :isChange="isChange" :change:videoData="renderScript.receiveMsg"
|
||||
@@ -76,7 +79,7 @@
|
||||
|
||||
// importScripts('@/static/aliplayer/aliplayer-min.js')
|
||||
export default {
|
||||
props: ["currentVideo", "currentVideoList"],
|
||||
props: ["currentVideo", "currentVideoList","videoTitle"],
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
@@ -88,7 +91,7 @@
|
||||
isChange: false,
|
||||
isControl: true,
|
||||
timer: null,
|
||||
videoTitle: "",
|
||||
// videoTitle: "",
|
||||
videoList: [],
|
||||
firstTime: 0,
|
||||
options: {},
|
||||
@@ -436,17 +439,23 @@
|
||||
});
|
||||
},
|
||||
async handleEnd() {
|
||||
console.log('进来了吗,handleEnd')
|
||||
console.log("找到了吗????",this.videoData.id);
|
||||
// console.log('uni.getStorageSync("videoOssList")',uni.getStorageSync("videoOssList"));
|
||||
var list = JSON.parse(JSON.stringify(uni.getStorageSync("videoOssList")));
|
||||
|
||||
var data = list.find((e) => e.id == this.videoData.id);
|
||||
console.log("找到了吗????");
|
||||
this.currentTime = data.time;
|
||||
console.log(
|
||||
"this.currentTime at line 这是结束的时候掉的存储视频:",
|
||||
this.currentTime
|
||||
);
|
||||
await this.setVideoTime();
|
||||
clearInterval(this.$store.state.videoTimer);
|
||||
this.timer = null;
|
||||
|
||||
await this.setVideoTime();
|
||||
|
||||
},
|
||||
setVideoTime(time) {
|
||||
var data = {};
|
||||
@@ -767,17 +776,19 @@
|
||||
|
||||
var playerOptions = {
|
||||
id: "url-player-test",
|
||||
// preload: false,
|
||||
// "vid": this.videoData
|
||||
// .videoId, // 必选参数,可以通过点播控制台(路径:媒资库>音/视频)查询。示例:1e067a2831b641db90d570b6480f****。
|
||||
|
||||
width: '100%', //容器的大小
|
||||
// videoWidth: '100vw', //容器的大小
|
||||
// videoHeight: '100vh', //容器的大小
|
||||
height: '100%', //容器的大小
|
||||
// playsinline: true,
|
||||
// controlBarVisibility: "click",
|
||||
cover: "",
|
||||
width: '100%', //容器的大小
|
||||
height: '100%', //容器的大小
|
||||
"qualitySort": "asc",
|
||||
// "format": "m3u8",
|
||||
// "mediaType": "video",
|
||||
"cover": "",
|
||||
"autoplay": true,
|
||||
"isLive": false,
|
||||
"rePlay": false,
|
||||
"playsinline": true,
|
||||
"controlBarVisibility": "hover",
|
||||
"useH5Prism": true,
|
||||
// cover: "",
|
||||
components: [
|
||||
// {
|
||||
// name: 'BulletScreenComponent',
|
||||
@@ -888,14 +899,16 @@
|
||||
}
|
||||
|
||||
if (this.videoData.type == 1) {
|
||||
if (this.videoData.m3u8Url == null || this
|
||||
.videoData.m3u8Url == '') {
|
||||
//console.log('这是私有加密的视频');
|
||||
if (this.videoData.m3u8Url == null || this.videoData.m3u8Url == '') {
|
||||
console.log('这是私有加密的视频');
|
||||
if (this.$platform == 'ios') {
|
||||
this.$refs.videoContent5.click()
|
||||
} else {
|
||||
playerOptions = {
|
||||
...playerOptions,
|
||||
"vid": this.videoData
|
||||
.videoId, // 必选参数,可以通过点播控制台(路径:媒资库>音/视频)查询。示例:1e067a2831b641db90d570b6480f****。
|
||||
|
||||
"playauth": this.videoData.playAuth, // 必选参数,参数值可通过调用GetVideoPlayAuth接口获取。
|
||||
"encryptType": 1, // 必选参数,当播放私有加密流时需要设置本参数值为1。其它情况无需设置。
|
||||
"playConfig": {
|
||||
@@ -908,9 +921,7 @@
|
||||
playerOptions = {
|
||||
...playerOptions,
|
||||
source: this.videoData.m3u8Url,
|
||||
playConfig: {
|
||||
"EncryptType": 'HLSEncryption'
|
||||
}
|
||||
// "playConfig": {"EncryptType": "HLSEncryption"}
|
||||
}
|
||||
console.log('这是标准加密的视频');
|
||||
}
|
||||
@@ -922,30 +933,7 @@
|
||||
}
|
||||
console.log('这是没有加密的视频');
|
||||
}
|
||||
console.log('playerOptions',playerOptions);
|
||||
// if (this.videoData.type == 1 && this.videoData.m3u8Url == null || this.videoData.type == 1 && this
|
||||
// .videoData.m3u8Url == '') {
|
||||
// playerOptions = {
|
||||
// ...playerOptions,
|
||||
// "playauth": this.videoData.playAuth, // 必选参数,参数值可通过调用GetVideoPlayAuth接口获取。
|
||||
// "encryptType": 1, // 必选参数,当播放私有加密流时需要设置本参数值为1。其它情况无需设置。
|
||||
// "playConfig": {
|
||||
// "EncryptType": 'AliyunVoDEncryption'
|
||||
// }
|
||||
// }
|
||||
// console.log('这是私有加密的视频');
|
||||
|
||||
// } else if (this.videoData.type == 1 && this.videoData.m3u8Url != null && this.videoData.type == 1 && this
|
||||
// .videoData.m3u8Url != '') {
|
||||
// playerOptions = {
|
||||
// ...playerOptions,
|
||||
// source: this.videoData.m3u8Url,
|
||||
// playConfig: {
|
||||
// "EncryptType": 'HLSEncryption'
|
||||
// }
|
||||
// }
|
||||
// console.log('这是标准加密的视频');
|
||||
// }
|
||||
var player = new Aliplayer(playerOptions, function(player) {});
|
||||
this.player = player;
|
||||
console.log('是否拿到第一次初始值呢', this.platform, typeof this.firstTime, this.firstTime)
|
||||
@@ -975,7 +963,10 @@
|
||||
|
||||
// })
|
||||
} else {
|
||||
// if(player){
|
||||
this.player.seek(this.firstTime)
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -358,14 +358,21 @@ export default {
|
||||
// this.getUserInfo()
|
||||
// this.getCateList()
|
||||
},
|
||||
|
||||
onUnload(){
|
||||
beforeDestroy(){
|
||||
console.log('页面卸载')
|
||||
|
||||
// this.$nextTick(()=>{
|
||||
this.$refs.commonVideo.handleEnd();
|
||||
// this.$refs.commonVideo.handleEnd();
|
||||
|
||||
// })
|
||||
},
|
||||
onUnload(){
|
||||
// console.log('页面卸载')
|
||||
|
||||
// // this.$nextTick(()=>{
|
||||
// this.$refs.commonVideo.handleEnd();
|
||||
|
||||
// // })
|
||||
|
||||
},
|
||||
onHide() {
|
||||
|
||||
Reference in New Issue
Block a user