222
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container" style="background-color: #000; position: relative">
|
<view class="container" style="background-color: #000; position: relative">
|
||||||
<u-modal :show="show" :title="title" :content='content'></u-modal>
|
<u-modal :show="show" :title="title" :content="content"></u-modal>
|
||||||
<!-- <u-icon
|
<!-- <u-icon
|
||||||
@click="goBack"
|
@click="goBack"
|
||||||
name="arrow-left"
|
name="arrow-left"
|
||||||
@@ -17,16 +17,31 @@
|
|||||||
<button type="primary" @click="start()">开始</button>
|
<button type="primary" @click="start()">开始</button>
|
||||||
<button type="primary" @click="pause()">暂停</button> -->
|
<button type="primary" @click="pause()">暂停</button> -->
|
||||||
<view style="width: 100%; height: 200px">
|
<view style="width: 100%; height: 200px">
|
||||||
<div class="" style="background-color: #000" ref="videoContent" @tap="renderScript.handleClick"
|
<div
|
||||||
id="url-player-test" :videoData="videoData" :winWidth="winWidth" :winHeight="winHeight"
|
class=""
|
||||||
:currentVideoList="currentVideoList" :firstTime="firstTime" :isfresh="isfresh" :platform="platform"
|
style="background-color: #000"
|
||||||
:isSetFirstTime="isSetFirstTime" :isChange="isChange" :change:videoData="renderScript.receiveMsg"
|
ref="videoContent"
|
||||||
:change:winWidth="renderScript.receiveWinWidth" :change:winHeight="renderScript.receiveWinHeight"
|
@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"
|
||||||
|
:change:winWidth="renderScript.receiveWinWidth"
|
||||||
|
:change:winHeight="renderScript.receiveWinHeight"
|
||||||
:change:firstTime="renderScript.receiveFirstTime"
|
:change:firstTime="renderScript.receiveFirstTime"
|
||||||
:change:isSetFirstTime="renderScript.receiveisSetFirstTime"
|
:change:isSetFirstTime="renderScript.receiveisSetFirstTime"
|
||||||
:change:isfresh="renderScript.receiveIsfresh" :change:platform="renderScript.receiveplatform"
|
:change:isfresh="renderScript.receiveIsfresh"
|
||||||
|
:change:platform="renderScript.receiveplatform"
|
||||||
:change:isChange="renderScript.receiveIsChange"
|
:change:isChange="renderScript.receiveIsChange"
|
||||||
:change:currentVideoList="renderScript.receiveVideoList"></div>
|
:change:currentVideoList="renderScript.receiveVideoList"
|
||||||
|
></div>
|
||||||
<div @tap="renderScript.emitData" ref="videoContent1" v-show="false">
|
<div @tap="renderScript.emitData" ref="videoContent1" v-show="false">
|
||||||
直接调用renderjs中的emitData的方法,传递当前播放时长
|
直接调用renderjs中的emitData的方法,传递当前播放时长
|
||||||
</div>
|
</div>
|
||||||
@@ -35,7 +50,11 @@
|
|||||||
监听结束方法,记录播放时长
|
监听结束方法,记录播放时长
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div @tap="renderScript.changeVideoData" ref="videoContent3" v-show="false">
|
<div
|
||||||
|
@tap="renderScript.changeVideoData"
|
||||||
|
ref="videoContent3"
|
||||||
|
v-show="false"
|
||||||
|
>
|
||||||
监听切换视频方法
|
监听切换视频方法
|
||||||
</div>
|
</div>
|
||||||
<div @tap="renderScript.emitSetData" ref="videoContent4" v-show="false">
|
<div @tap="renderScript.emitSetData" ref="videoContent4" v-show="false">
|
||||||
@@ -45,8 +64,10 @@
|
|||||||
打开视频提示
|
打开视频提示
|
||||||
</div>
|
</div>
|
||||||
<div class="fullScreenButton-container">
|
<div class="fullScreenButton-container">
|
||||||
<div :class="`prism-fullscreen-btn ${isFullScreen ? 'fullscreen' : ''}`"
|
<div
|
||||||
@tap="renderScript.changeVideoScreen"></div>
|
:class="`prism-fullscreen-btn ${isFullScreen ? 'fullscreen' : ''}`"
|
||||||
|
@tap="renderScript.changeVideoScreen"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view style="width: 100%; height: 200px; position: relative" v-else>
|
<!-- <view style="width: 100%; height: 200px; position: relative" v-else>
|
||||||
@@ -69,10 +90,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import store from "@/store/index.js";
|
import store from "@/store/index.js";
|
||||||
import $http from "@/config/requestConfig.js";
|
import $http from "@/config/requestConfig.js";
|
||||||
import {
|
import { mapState, mapMutations } from "vuex";
|
||||||
mapState,
|
|
||||||
mapMutations
|
|
||||||
} from "vuex";
|
|
||||||
|
|
||||||
// importScripts('@/static/aliplayer/aliplayer-min.js')
|
// importScripts('@/static/aliplayer/aliplayer-min.js')
|
||||||
export default {
|
export default {
|
||||||
@@ -294,10 +312,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
that.$refs.playerView.setPlayerCallBack(({
|
that.$refs.playerView.setPlayerCallBack(({ type, data }) => {
|
||||||
type,
|
|
||||||
data
|
|
||||||
}) => {
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "isFullScreen":
|
case "isFullScreen":
|
||||||
isFullScreen = Boolean(data);
|
isFullScreen = Boolean(data);
|
||||||
@@ -314,9 +329,9 @@
|
|||||||
async getData(data, isChange) {
|
async getData(data, isChange) {
|
||||||
var that = this;
|
var that = this;
|
||||||
if (!this.isSetFirstTime) {
|
if (!this.isSetFirstTime) {
|
||||||
var netWork = data.userCourseVideoPositionEntity ?
|
var netWork = data.userCourseVideoPositionEntity
|
||||||
data.userCourseVideoPositionEntity.position :
|
? data.userCourseVideoPositionEntity.position
|
||||||
0;
|
: 0;
|
||||||
var list = [];
|
var list = [];
|
||||||
if (uni.getStorageSync("videoOssList")) {
|
if (uni.getStorageSync("videoOssList")) {
|
||||||
list = JSON.parse(uni.getStorageSync("videoOssList"));
|
list = JSON.parse(uni.getStorageSync("videoOssList"));
|
||||||
@@ -765,17 +780,18 @@
|
|||||||
|
|
||||||
var playerOptions = {
|
var playerOptions = {
|
||||||
id: "url-player-test",
|
id: "url-player-test",
|
||||||
// preload: false,
|
|
||||||
// "vid": this.videoData
|
|
||||||
// .videoId, // 必选参数,可以通过点播控制台(路径:媒资库>音/视频)查询。示例:1e067a2831b641db90d570b6480f****。
|
|
||||||
|
|
||||||
width: '100%', //容器的大小
|
width: '100%', //容器的大小
|
||||||
// videoWidth: '100vw', //容器的大小
|
|
||||||
// videoHeight: '100vh', //容器的大小
|
|
||||||
height: '100%', //容器的大小
|
height: '100%', //容器的大小
|
||||||
// playsinline: true,
|
"qualitySort": "asc",
|
||||||
// controlBarVisibility: "click",
|
"format": "m3u8",
|
||||||
cover: "",
|
"mediaType": "video",
|
||||||
|
"cover": "",
|
||||||
|
"autoplay": true,
|
||||||
|
"isLive": false,
|
||||||
|
"rePlay": false,
|
||||||
|
"playsinline": true,
|
||||||
|
"controlBarVisibility": "hover",
|
||||||
|
"useH5Prism": true,
|
||||||
components: [
|
components: [
|
||||||
// {
|
// {
|
||||||
// name: 'BulletScreenComponent',
|
// name: 'BulletScreenComponent',
|
||||||
|
|||||||
Reference in New Issue
Block a user