vhall-mini-sdk 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/player/components/online-hot/index.js +2 -2
- package/lib/sdk/main/index.js +1 -0
- package/package.json +2 -4
- package/postinstall.js +21 -51
- package/dist/components/chat/chat-edit/chat-edit.js +0 -127
- package/dist/components/chat/chat-edit/chat-edit.json +0 -4
- package/dist/components/chat/chat-edit/chat-edit.wxml +0 -7
- package/dist/components/chat/chat-edit/chat-edit.wxss +0 -1
- package/dist/components/chat/chat-item/chat-item.js +0 -253
- package/dist/components/chat/chat-item/chat-item.json +0 -3
- package/dist/components/chat/chat-item/chat-item.wxml +0 -96
- package/dist/components/chat/chat-item/chat-item.wxss +0 -1
- package/dist/components/chat/chat-list/chat-list.js +0 -216
- package/dist/components/chat/chat-list/chat-list.json +0 -6
- package/dist/components/chat/chat-list/chat-list.wxml +0 -9
- package/dist/components/chat/chat-list/chat-list.wxss +0 -1
- package/dist/components/chat/chat.js +0 -98
- package/dist/components/chat/chat.json +0 -7
- package/dist/components/chat/chat.wxml +0 -7
- package/dist/components/chat/chat.wxss +0 -1
- package/dist/components/gift/gift-display/gift-display.js +0 -118
- package/dist/components/gift/gift-display/gift-display.json +0 -3
- package/dist/components/gift/gift-display/gift-display.wxml +0 -16
- package/dist/components/gift/gift-display/gift-display.wxss +0 -1
- package/dist/components/gift/gift-sender/gift-sender.js +0 -63
- package/dist/components/gift/gift-sender/gift-sender.json +0 -6
- package/dist/components/gift/gift-sender/gift-sender.wxml +0 -19
- package/dist/components/gift/gift-sender/gift-sender.wxss +0 -1
- package/dist/components/introduction/introduction.js +0 -43
- package/dist/components/introduction/introduction.json +0 -3
- package/dist/components/introduction/introduction.wxml +0 -8
- package/dist/components/introduction/introduction.wxss +0 -1
- package/dist/components/invite-rank/img/bronze.png +0 -0
- package/dist/components/invite-rank/img/gold.png +0 -0
- package/dist/components/invite-rank/img/silver.png +0 -0
- package/dist/components/invite-rank/index.js +0 -135
- package/dist/components/invite-rank/index.json +0 -8
- package/dist/components/invite-rank/index.wxml +0 -42
- package/dist/components/invite-rank/index.wxss +0 -1
- package/dist/components/invite-rank/invite-rank-item.js +0 -12
- package/dist/components/invite-rank/invite-rank-item.json +0 -4
- package/dist/components/invite-rank/invite-rank-item.wxml +0 -21
- package/dist/components/invite-rank/invite-rank-item.wxss +0 -1
- package/dist/components/invite-rank/my-invite-detail.js +0 -82
- package/dist/components/invite-rank/my-invite-detail.json +0 -7
- package/dist/components/invite-rank/my-invite-detail.wxml +0 -27
- package/dist/components/invite-rank/my-invite-detail.wxss +0 -1
- package/dist/components/invite-rank/util.wxs +0 -21
- package/dist/components/live-landscape/live-landscape.js +0 -216
- package/dist/components/live-landscape/live-landscape.json +0 -39
- package/dist/components/live-landscape/live-landscape.wxml +0 -73
- package/dist/components/live-landscape/live-landscape.wxss +0 -1
- package/dist/components/live-portrait/live-portrait.js +0 -274
- package/dist/components/live-portrait/live-portrait.json +0 -38
- package/dist/components/live-portrait/live-portrait.wxml +0 -106
- package/dist/components/live-portrait/live-portrait.wxss +0 -1
- package/dist/components/lottery/lottery-accept/index.js +0 -249
- package/dist/components/lottery/lottery-accept/index.json +0 -4
- package/dist/components/lottery/lottery-accept/index.wxml +0 -49
- package/dist/components/lottery/lottery-accept/index.wxss +0 -1
- package/dist/components/lottery/lottery-history/index.js +0 -36
- package/dist/components/lottery/lottery-history/index.json +0 -3
- package/dist/components/lottery/lottery-history/index.wxml +0 -28
- package/dist/components/lottery/lottery-history/index.wxss +0 -1
- package/dist/components/lottery/lottery-shake/lottery-shake.js +0 -328
- package/dist/components/lottery/lottery-shake/lottery-shake.json +0 -1
- package/dist/components/lottery/lottery-shake/lottery-shake.wxml +0 -52
- package/dist/components/lottery/lottery-shake/lottery-shake.wxss +0 -1
- package/dist/components/lottery/lottery-slot/lottery-slot.js +0 -230
- package/dist/components/lottery/lottery-slot/lottery-slot.json +0 -1
- package/dist/components/lottery/lottery-slot/lottery-slot.wxml +0 -62
- package/dist/components/lottery/lottery-slot/lottery-slot.wxss +0 -1
- package/dist/components/lottery/lottery-wheel/lottery-wheel.js +0 -153
- package/dist/components/lottery/lottery-wheel/lottery-wheel.json +0 -4
- package/dist/components/lottery/lottery-wheel/lottery-wheel.wxml +0 -91
- package/dist/components/lottery/lottery-wheel/lottery-wheel.wxss +0 -1
- package/dist/components/lottery/lottery-winners/index.js +0 -101
- package/dist/components/lottery/lottery-winners/index.json +0 -4
- package/dist/components/lottery/lottery-winners/index.wxml +0 -39
- package/dist/components/lottery/lottery-winners/index.wxss +0 -1
- package/dist/components/lottery/lottery.js +0 -388
- package/dist/components/lottery/lottery.json +0 -11
- package/dist/components/lottery/lottery.wxml +0 -78
- package/dist/components/lottery/lottery.wxss +0 -1
- package/dist/components/lottery/wheel.json +0 -49
- package/dist/components/mall-reward/common/reward-card.wxss +0 -0
- package/dist/components/mall-reward/duration-icon/index.js +0 -101
- package/dist/components/mall-reward/duration-icon/index.json +0 -3
- package/dist/components/mall-reward/duration-icon/index.wxml +0 -7
- package/dist/components/mall-reward/duration-icon/index.wxss +0 -1
- package/dist/components/mall-reward/f-count-down/index.js +0 -61
- package/dist/components/mall-reward/f-count-down/index.json +0 -3
- package/dist/components/mall-reward/f-count-down/index.wxml +0 -9
- package/dist/components/mall-reward/f-count-down/index.wxss +0 -1
- package/dist/components/mall-reward/f-empty/index.js +0 -11
- package/dist/components/mall-reward/f-empty/index.json +0 -3
- package/dist/components/mall-reward/f-empty/index.wxml +0 -8
- package/dist/components/mall-reward/f-empty/index.wxss +0 -1
- package/dist/components/mall-reward/f-history/index.js +0 -84
- package/dist/components/mall-reward/f-history/index.json +0 -4
- package/dist/components/mall-reward/f-history/index.wxml +0 -38
- package/dist/components/mall-reward/f-history/index.wxss +0 -1
- package/dist/components/mall-reward/f-open/index.js +0 -36
- package/dist/components/mall-reward/f-open/index.json +0 -3
- package/dist/components/mall-reward/f-open/index.wxml +0 -10
- package/dist/components/mall-reward/f-open/index.wxss +0 -1
- package/dist/components/mall-reward/f-receive/index.js +0 -36
- package/dist/components/mall-reward/f-receive/index.json +0 -3
- package/dist/components/mall-reward/f-receive/index.wxml +0 -9
- package/dist/components/mall-reward/f-receive/index.wxss +0 -1
- package/dist/components/mall-reward/index.js +0 -374
- package/dist/components/mall-reward/index.json +0 -8
- package/dist/components/mall-reward/index.wxml +0 -4
- package/dist/components/mall-reward/index.wxss +0 -0
- package/dist/components/mall-reward/main-popup/index.js +0 -46
- package/dist/components/mall-reward/main-popup/index.json +0 -12
- package/dist/components/mall-reward/main-popup/index.wxml +0 -16
- package/dist/components/mall-reward/main-popup/index.wxss +0 -1
- package/dist/components/player/assets/image/arrow-left.png +0 -0
- package/dist/components/player/assets/image/arrow-right.png +0 -0
- package/dist/components/player/assets/image/enterFullScreen.png +0 -0
- package/dist/components/player/assets/image/exitFullScreen.png +0 -0
- package/dist/components/player/assets/image/fullscreen_1.png +0 -0
- package/dist/components/player/assets/image/fullscreen_2.png +0 -0
- package/dist/components/player/assets/image/pause.png +0 -0
- package/dist/components/player/assets/image/pause_1.png +0 -0
- package/dist/components/player/assets/image/play.png +0 -0
- package/dist/components/player/assets/image/play_1.png +0 -0
- package/dist/components/player/assets/image/refresh.png +0 -0
- package/dist/components/player/assets/image/refresh_1.png +0 -0
- package/dist/components/player/assets/image/subtitle_close.png +0 -0
- package/dist/components/player/assets/image/subtitle_default.png +0 -0
- package/dist/components/player/assets/image/volume-off.png +0 -0
- package/dist/components/player/assets/image/volume-on.png +0 -0
- package/dist/components/player/common/config.js +0 -7
- package/dist/components/player/common/veComponent.js +0 -4
- package/dist/components/player/components/barrage/barrage-canvas.js +0 -488
- package/dist/components/player/components/barrage/barrage-dom.js +0 -471
- package/dist/components/player/components/barrage/index.js +0 -62
- package/dist/components/player/components/barrage/index.json +0 -4
- package/dist/components/player/components/barrage/index.wxml +0 -39
- package/dist/components/player/components/barrage/index.wxss +0 -1
- package/dist/components/player/components/barrage/utils.js +0 -71
- package/dist/components/player/components/controls/controls.js +0 -93
- package/dist/components/player/components/controls/controls.json +0 -6
- package/dist/components/player/components/controls/controls.wxml +0 -60
- package/dist/components/player/components/controls/controls.wxss +0 -1
- package/dist/components/player/components/danmaku/danmaku.js +0 -23
- package/dist/components/player/components/danmaku/danmaku.json +0 -4
- package/dist/components/player/components/danmaku/danmaku.wxml +0 -1
- package/dist/components/player/components/danmaku/danmaku.wxss +0 -0
- package/dist/components/player/components/error/error.js +0 -15
- package/dist/components/player/components/error/error.json +0 -3
- package/dist/components/player/components/error/error.wxml +0 -6
- package/dist/components/player/components/error/error.wxss +0 -1
- package/dist/components/player/components/loading/loading.js +0 -9
- package/dist/components/player/components/loading/loading.json +0 -3
- package/dist/components/player/components/loading/loading.wxml +0 -4
- package/dist/components/player/components/loading/loading.wxss +0 -1
- package/dist/components/player/components/main/extensions/data.js +0 -8
- package/dist/components/player/components/main/extensions/export.js +0 -83
- package/dist/components/player/components/main/extensions/methods.js +0 -110
- package/dist/components/player/components/main/extensions/observers.js +0 -41
- package/dist/components/player/components/main/extensions/props.js +0 -177
- package/dist/components/player/components/main/index.js +0 -44
- package/dist/components/player/components/main/index.json +0 -4
- package/dist/components/player/components/main/index.wxml +0 -7
- package/dist/components/player/components/main/index.wxss +0 -1
- package/dist/components/player/components/marquee/marquee.js +0 -304
- package/dist/components/player/components/marquee/marquee.json +0 -4
- package/dist/components/player/components/marquee/marquee.wxml +0 -14
- package/dist/components/player/components/marquee/marquee.wxss +0 -1
- package/dist/components/player/components/online-hot/assets/line-hot.png +0 -0
- package/dist/components/player/components/online-hot/assets/line-user.png +0 -0
- package/dist/components/player/components/online-hot/index.js +0 -66
- package/dist/components/player/components/online-hot/index.json +0 -3
- package/dist/components/player/components/online-hot/index.wxml +0 -15
- package/dist/components/player/components/online-hot/index.wxss +0 -1
- package/dist/components/player/components/poster/poster.js +0 -12
- package/dist/components/player/components/poster/poster.json +0 -3
- package/dist/components/player/components/poster/poster.wxml +0 -5
- package/dist/components/player/components/poster/poster.wxss +0 -1
- package/dist/components/player/components/watermark/watermark.js +0 -52
- package/dist/components/player/components/watermark/watermark.json +0 -4
- package/dist/components/player/components/watermark/watermark.wxml +0 -8
- package/dist/components/player/components/watermark/watermark.wxss +0 -1
- package/dist/components/player/extensions/data.js +0 -63
- package/dist/components/player/extensions/export.js +0 -325
- package/dist/components/player/extensions/methods.js +0 -406
- package/dist/components/player/extensions/observers.js +0 -114
- package/dist/components/player/extensions/props.js +0 -162
- package/dist/components/player/player.js +0 -83
- package/dist/components/player/player.json +0 -33
- package/dist/components/player/player.wxml +0 -48
- package/dist/components/player/player.wxss +0 -1
- package/dist/components/praise/praise.js +0 -150
- package/dist/components/praise/praise.json +0 -5
- package/dist/components/praise/praise.wxml +0 -17
- package/dist/components/praise/praise.wxss +0 -1
- package/dist/components/product/product-card/product-card.js +0 -109
- package/dist/components/product/product-card/product-card.json +0 -3
- package/dist/components/product/product-card/product-card.wxml +0 -47
- package/dist/components/product/product-card/product-card.wxss +0 -1
- package/dist/components/product/product-detail/product-detail.js +0 -127
- package/dist/components/product/product-detail/product-detail.json +0 -3
- package/dist/components/product/product-detail/product-detail.wxml +0 -57
- package/dist/components/product/product-detail/product-detail.wxss +0 -1
- package/dist/components/product/product-item/product-item.js +0 -56
- package/dist/components/product/product-item/product-item.json +0 -3
- package/dist/components/product/product-item/product-item.wxml +0 -35
- package/dist/components/product/product-item/product-item.wxss +0 -1
- package/dist/components/product/product-list/product-list.js +0 -67
- package/dist/components/product/product-list/product-list.json +0 -6
- package/dist/components/product/product-list/product-list.wxml +0 -16
- package/dist/components/product/product-list/product-list.wxss +0 -1
- package/dist/components/product/product-order/product-order.js +0 -394
- package/dist/components/product/product-order/product-order.json +0 -3
- package/dist/components/product/product-order/product-order.wxml +0 -75
- package/dist/components/product/product-order/product-order.wxss +0 -1
- package/dist/components/signin/signin-dialog.js +0 -305
- package/dist/components/signin/signin-dialog.json +0 -7
- package/dist/components/signin/signin-dialog.wxml +0 -19
- package/dist/components/signin/signin-dialog.wxss +0 -1
- package/dist/components/top-notify/index.js +0 -14
- package/dist/components/top-notify/index.json +0 -3
- package/dist/components/top-notify/index.wxml +0 -2
- package/dist/components/top-notify/index.wxss +0 -1
- package/dist/pubComponents/countdown/countdown.js +0 -97
- package/dist/pubComponents/countdown/countdown.json +0 -5
- package/dist/pubComponents/countdown/countdown.wxml +0 -19
- package/dist/pubComponents/countdown/countdown.wxss +0 -1
- package/dist/pubComponents/error-page/index.js +0 -146
- package/dist/pubComponents/error-page/index.json +0 -5
- package/dist/pubComponents/error-page/index.wxml +0 -37
- package/dist/pubComponents/error-page/index.wxss +0 -1
- package/dist/pubComponents/popup/popup.js +0 -161
- package/dist/pubComponents/popup/popup.json +0 -5
- package/dist/pubComponents/popup/popup.wxml +0 -17
- package/dist/pubComponents/popup/popup.wxss +0 -1
- package/dist/pubComponents/tabs/index.js +0 -95
- package/dist/pubComponents/tabs/index.json +0 -4
- package/dist/pubComponents/tabs/index.wxml +0 -22
- package/dist/pubComponents/tabs/index.wxss +0 -1
- package/dist/sdk/config/index.js +0 -1
- package/dist/sdk/main/index.js +0 -1
- package/dist/sdk/player/index.js +0 -1
- package/dist/sdk/plugins/ChatServer.js +0 -1
- package/dist/sdk/plugins/CustomMenuServer.js +0 -1
- package/dist/sdk/plugins/InteractServer.js +0 -1
- package/dist/sdk/plugins/InviteCardServer.js +0 -1
- package/dist/sdk/plugins/LotteryServer.js +0 -1
- package/dist/sdk/plugins/MallRewardServer.js +0 -1
- package/dist/sdk/plugins/ProductServer.js +0 -1
- package/dist/shared/RequestUtil.js +0 -1
- package/dist/shared/SerializableMap.js +0 -1
- package/dist/shared/base.server.js +0 -1
- package/dist/shared/cacheUtil.js +0 -1
- package/dist/shared/dateUtil.js +0 -1
- package/dist/shared/logger.js +0 -1
- package/dist/shared/mpUtils.js +0 -1
- package/dist/shared/utils.js +0 -1
|
@@ -1,406 +0,0 @@
|
|
|
1
|
-
import { getUnixTimeMs, getCurrentTimeZoneOffset, convertTimeZone } from '../../../shared/dateUtil'
|
|
2
|
-
import { safeJsonParse } from '../../../shared/utils'
|
|
3
|
-
|
|
4
|
-
export function createMethods() {
|
|
5
|
-
return {
|
|
6
|
-
async initVhallPlayer(option) {
|
|
7
|
-
this.vhallPlayerCore.init(
|
|
8
|
-
Object.assign({}, option, {
|
|
9
|
-
componetVersion: this.data.componetVersion,
|
|
10
|
-
defaultDefinition: this.data.defaultDefinition,
|
|
11
|
-
})
|
|
12
|
-
);
|
|
13
|
-
const data = await this.vhallPlayerCore.initVhallPlayer();
|
|
14
|
-
this.setData(data);
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
async initVhallyun() {
|
|
18
|
-
if (this.data.type == 'live') {
|
|
19
|
-
try {
|
|
20
|
-
const livePlayInfo = await this.vhallPlayerCore.initVhallyunLive();
|
|
21
|
-
this.setData({
|
|
22
|
-
videoSrc: livePlayInfo.videoSrc,
|
|
23
|
-
qualitys: livePlayInfo.qualitys,
|
|
24
|
-
currentQuality: livePlayInfo.currentQuality,
|
|
25
|
-
subtitles: livePlayInfo.subtitles,
|
|
26
|
-
currentSubtitle: livePlayInfo.currentSubtitle,
|
|
27
|
-
});
|
|
28
|
-
this.triggerEvent('ready', null);
|
|
29
|
-
} catch (e) {
|
|
30
|
-
console.error(e);
|
|
31
|
-
}
|
|
32
|
-
} else if (this.data.type == 'vod') {
|
|
33
|
-
try {
|
|
34
|
-
const vodPlayInfo = await this.vhallPlayerCore.initVhallyunVod();
|
|
35
|
-
this.setData({
|
|
36
|
-
videoSrc: vodPlayInfo.videoSrc,
|
|
37
|
-
qualitys: vodPlayInfo.qualitys,
|
|
38
|
-
currentQuality: vodPlayInfo.currentQuality,
|
|
39
|
-
});
|
|
40
|
-
this.triggerEvent('ready', null);
|
|
41
|
-
} catch (e) {
|
|
42
|
-
console.error(e);
|
|
43
|
-
}
|
|
44
|
-
} else {
|
|
45
|
-
this.triggerEvent('ready', null);
|
|
46
|
-
console.warn('当前活动状态不支持播放');
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
getVideoSrc(quality, subtitle) {
|
|
51
|
-
return this.vhallPlayerCore.getVideoSrc(quality, subtitle);
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
onToggleControls() {
|
|
55
|
-
const controlsHiddenFlag = this.data.controlsHiddenFlag;
|
|
56
|
-
this.setData({
|
|
57
|
-
controlsHiddenFlag: !controlsHiddenFlag,
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* 控制栏 - 播放/暂停按钮
|
|
63
|
-
*/
|
|
64
|
-
handleControlsPlayPause() {
|
|
65
|
-
const playStatus = this.data.playStatus;
|
|
66
|
-
if (playStatus == 'playing') {
|
|
67
|
-
this.pause();
|
|
68
|
-
// this.setData({
|
|
69
|
-
// playStatus: "paused",
|
|
70
|
-
// pausedFlag: true,
|
|
71
|
-
// });
|
|
72
|
-
} else {
|
|
73
|
-
this.play();
|
|
74
|
-
if (this.data.type == 'live') {
|
|
75
|
-
this.resume();
|
|
76
|
-
}
|
|
77
|
-
// this.setData({
|
|
78
|
-
// playStatus: "playing",
|
|
79
|
-
// pausedFlag: false,
|
|
80
|
-
// });
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
/**
|
|
84
|
-
* 控制栏 - 重新播放按钮
|
|
85
|
-
*/
|
|
86
|
-
handleControlsReplay() {
|
|
87
|
-
// this.playerMain.stop();
|
|
88
|
-
// this.playerMain.play();
|
|
89
|
-
this.replay();
|
|
90
|
-
},
|
|
91
|
-
/**
|
|
92
|
-
* 控制栏 - 静音按钮
|
|
93
|
-
*/
|
|
94
|
-
handleControlsMute() {
|
|
95
|
-
this.setData({
|
|
96
|
-
muted: !this.data.muted,
|
|
97
|
-
});
|
|
98
|
-
},
|
|
99
|
-
/**
|
|
100
|
-
* 控制栏 - 全屏按钮
|
|
101
|
-
*/
|
|
102
|
-
handleControlsFullScreen() {
|
|
103
|
-
const fullscreenFlag = this.data.fullscreenFlag;
|
|
104
|
-
if (fullscreenFlag) {
|
|
105
|
-
this.exitFullScreen();
|
|
106
|
-
} else {
|
|
107
|
-
this.requestFullScreen({
|
|
108
|
-
direction: 90,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
/**
|
|
113
|
-
* 控制栏 - 切换清晰度
|
|
114
|
-
* @param {*} e
|
|
115
|
-
*/
|
|
116
|
-
handleControlsSetQuality(e) {
|
|
117
|
-
const quality = e.detail;
|
|
118
|
-
this.setCurrentQuality(quality);
|
|
119
|
-
},
|
|
120
|
-
/**
|
|
121
|
-
* error组件,点击重试
|
|
122
|
-
*/
|
|
123
|
-
handleErrorAndRetry() {
|
|
124
|
-
console.log('error组件,点击重试');
|
|
125
|
-
this.setData({
|
|
126
|
-
showLoading: true,
|
|
127
|
-
showError: false,
|
|
128
|
-
});
|
|
129
|
-
this.replay();
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* 全屏变化事件
|
|
134
|
-
* 对外事件名: fullscreenchange
|
|
135
|
-
* 事件参数:{fullScreen: true/false}
|
|
136
|
-
*/
|
|
137
|
-
onfullscreenchange(e) {
|
|
138
|
-
console.log('fullscreenchange事件:', e.detail);
|
|
139
|
-
this.triggerEvent('fullscreenchange', e.detail);
|
|
140
|
-
this.setData({
|
|
141
|
-
fullscreenFlag: e.detail.fullScreen,
|
|
142
|
-
});
|
|
143
|
-
},
|
|
144
|
-
/**
|
|
145
|
-
* 小窗模式变化事件
|
|
146
|
-
* 对外事件名: pictureinpicturechange
|
|
147
|
-
* 事件参数:{pictureInPicture: true/false}
|
|
148
|
-
*/
|
|
149
|
-
onpictureinpicturechange(e) {
|
|
150
|
-
console.log('pictureinpicturechange事件:', e.detail);
|
|
151
|
-
this.triggerEvent('pictureinpicturechange', e.detail);
|
|
152
|
-
},
|
|
153
|
-
/**
|
|
154
|
-
* 播放进度变化事件(仅点播)
|
|
155
|
-
* 对外事件名: vodtimeupdate
|
|
156
|
-
* 事件参数:{currentTime: number, duration: number}
|
|
157
|
-
*/
|
|
158
|
-
ontimeupdate(e) {
|
|
159
|
-
const currentTime = e.detail.currentTime;
|
|
160
|
-
this.setData({
|
|
161
|
-
showLoading: false,
|
|
162
|
-
currentVodPlayTime: currentTime,
|
|
163
|
-
});
|
|
164
|
-
this.triggerEvent('currentvodplaytime', { currentTime });
|
|
165
|
-
},
|
|
166
|
-
/**
|
|
167
|
-
* 播放事件
|
|
168
|
-
* @param {*} e
|
|
169
|
-
*/
|
|
170
|
-
onplay(e) {
|
|
171
|
-
console.log(`播放play事件:`, e);
|
|
172
|
-
this.triggerEvent('play', e.detail);
|
|
173
|
-
this.setData({
|
|
174
|
-
playStatus: 'playing',
|
|
175
|
-
pausedFlag: false,
|
|
176
|
-
showLoading: false,
|
|
177
|
-
showError: false,
|
|
178
|
-
showPoster: false,
|
|
179
|
-
});
|
|
180
|
-
},
|
|
181
|
-
/**
|
|
182
|
-
* 暂停事件
|
|
183
|
-
* @param {*} e
|
|
184
|
-
*/
|
|
185
|
-
onpause(e) {
|
|
186
|
-
console.log(`暂停pause事件:`, e.detail);
|
|
187
|
-
this.triggerEvent('pause', e.detail);
|
|
188
|
-
this.setData({
|
|
189
|
-
playStatus: 'paused',
|
|
190
|
-
pausedFlag: true,
|
|
191
|
-
});
|
|
192
|
-
},
|
|
193
|
-
/**
|
|
194
|
-
* 结束事件(仅点播)
|
|
195
|
-
* @param {*} e
|
|
196
|
-
*/
|
|
197
|
-
onended(e) {
|
|
198
|
-
console.log(`播放ended事件:`, e.detail);
|
|
199
|
-
this.triggerEvent('ended', e.detail);
|
|
200
|
-
},
|
|
201
|
-
/**
|
|
202
|
-
* loadedmetadata事件(仅点播)
|
|
203
|
-
* @param {*} e
|
|
204
|
-
*/
|
|
205
|
-
onloadedmetadata(e) {
|
|
206
|
-
console.log(`播放loadedmetadata事件:`, e.detail);
|
|
207
|
-
this.triggerEvent('loadedmetadata', e.detail);
|
|
208
|
-
const { duration, width, height } = e.detail;
|
|
209
|
-
this.setData({
|
|
210
|
-
vodDuration: duration,
|
|
211
|
-
});
|
|
212
|
-
},
|
|
213
|
-
/**
|
|
214
|
-
* error事件
|
|
215
|
-
* @param {*} e
|
|
216
|
-
*/
|
|
217
|
-
onerror(e) {
|
|
218
|
-
console.log(`播放error事件:`, e.detail);
|
|
219
|
-
this.triggerEvent('error', e.detail);
|
|
220
|
-
this.setData({
|
|
221
|
-
showError: true,
|
|
222
|
-
showLoading: false,
|
|
223
|
-
});
|
|
224
|
-
},
|
|
225
|
-
/**
|
|
226
|
-
* 加载事件
|
|
227
|
-
* @param {*} e
|
|
228
|
-
*/
|
|
229
|
-
onwaiting(e) {
|
|
230
|
-
console.log(`播放waiting事件:`, e.detail);
|
|
231
|
-
this.triggerEvent('waiting', e.detail);
|
|
232
|
-
this.setData({
|
|
233
|
-
showLoading: true,
|
|
234
|
-
});
|
|
235
|
-
},
|
|
236
|
-
/**
|
|
237
|
-
* 开始连接事件(仅直播)
|
|
238
|
-
* @param {*} e
|
|
239
|
-
*/
|
|
240
|
-
onloadStart(e) {
|
|
241
|
-
this.setData({
|
|
242
|
-
showLoading: true,
|
|
243
|
-
});
|
|
244
|
-
},
|
|
245
|
-
/**
|
|
246
|
-
* 自动重连事件(仅直播)
|
|
247
|
-
* @param {*} e
|
|
248
|
-
*/
|
|
249
|
-
onreconnecting(e) {
|
|
250
|
-
this.triggerEvent('reconnecting', e.detail);
|
|
251
|
-
},
|
|
252
|
-
startWatchExpire(info) {
|
|
253
|
-
if (!info) return;
|
|
254
|
-
const webinar = this.sdkInstance.store.get('watchInitData.webinar');
|
|
255
|
-
if (webinar && (webinar.type == 4 || webinar.type == 5)) {
|
|
256
|
-
// 点播或回放
|
|
257
|
-
const expireObj = typeof info === 'string' ? JSON.parse(info) : info;
|
|
258
|
-
if (expireObj && expireObj?.status == 1) {
|
|
259
|
-
let currentZoneSystemTime = null
|
|
260
|
-
if (expireObj.system_time) {
|
|
261
|
-
const bjSysT = (expireObj.system_time || '').replace(/-/g, '/'); // 消息返回的是 当前服务器北京时间
|
|
262
|
-
// 将北京时间转换成当前时区时间
|
|
263
|
-
const currentZoneOffset = getCurrentTimeZoneOffset();
|
|
264
|
-
currentZoneSystemTime = convertTimeZone(getUnixTimeMs(bjSysT), 8, currentZoneOffset);
|
|
265
|
-
}
|
|
266
|
-
this.setData({
|
|
267
|
-
recordWatchExpireObj: {
|
|
268
|
-
status: expireObj.status, //回放有效期开关 1: 开启 0: 关闭
|
|
269
|
-
type: expireObj.type, //类型:1.全天,2.部分时段
|
|
270
|
-
start_date: (expireObj.start_date || '').replace(/-/g, '/'), //开始日期 2024-06-10 00:00:00 type=1时此项必填,格式为 yyyy-MM-dd HH:mm:ss;type=2时此项非必填,格式为 yyyy-MM-dd
|
|
271
|
-
end_date: (expireObj.end_date || '').replace(/-/g, '/'), //结束日期 2024-06-28 23:59:59 同上
|
|
272
|
-
start_time: (expireObj.start_time || '').replace(/-/g, '/'), //开始时间 08:10:00 type=2时此项必填,type=1时不接收此值
|
|
273
|
-
end_time: (expireObj.end_time || '').replace(/-/g, '/'), //结束时间 09:10:00 同上
|
|
274
|
-
currentZoneSystemTime
|
|
275
|
-
}
|
|
276
|
-
})
|
|
277
|
-
console.log('this.recordWatchExpireObj:', this.data.recordWatchExpireObj)
|
|
278
|
-
this.clearVhDepClientDateTimeInternalTask();
|
|
279
|
-
this.handleVhDepClientDateTime();
|
|
280
|
-
} else {
|
|
281
|
-
this.clearVhDepClientDateTimeInternalTask();
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
clearVhDepClientDateTimeInternalTask() {
|
|
286
|
-
if (this.vh_dep_client_date_time_intervalId) {
|
|
287
|
-
clearInterval(this.vh_dep_client_date_time_intervalId);
|
|
288
|
-
this.vh_dep_client_date_time_intervalId = null;
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
handleVhDepClientDateTime() {
|
|
292
|
-
const watchInitData = this.sdkInstance.store.get('watchInitData');
|
|
293
|
-
// console.log('watchInitData:', watchInitData)
|
|
294
|
-
const webinar = watchInitData?.webinar;
|
|
295
|
-
if (webinar && (webinar.type == 4 || webinar.type == 5) && this.data.recordWatchExpireObj.status == 1) {
|
|
296
|
-
// 优先级:消息返回服务器时间 > 页面加载返回的服务器时间 > 当前客户端时间
|
|
297
|
-
const currentZoneSystemTime = this.data.recordWatchExpireObj.currentZoneSystemTime || (watchInitData?.system_time || '').replace(/-/g, '/');
|
|
298
|
-
if (!currentZoneSystemTime) return;
|
|
299
|
-
this.vh_dep_client_date_time = new Date(currentZoneSystemTime);
|
|
300
|
-
// console.log('this.vh_dep_client_date_time:', this.vh_dep_client_date_time)
|
|
301
|
-
// 使用setInterval每秒调用incrementTime函数
|
|
302
|
-
this.vh_dep_client_date_time_intervalId = setInterval(() => {
|
|
303
|
-
// 使用Date对象的setSeconds方法来增加一
|
|
304
|
-
this.vh_dep_client_date_time.setSeconds(this.vh_dep_client_date_time.getSeconds() + 1);
|
|
305
|
-
if (this.data.playStatus === 'playing' && !this.checkPlaybackExpiredDateTime()) {
|
|
306
|
-
this.pause();
|
|
307
|
-
// 展示提示弹窗
|
|
308
|
-
this.sdkInstance.emit(this.sdkInstance.EVENT.RECORD_WATCH_EXPIRE_ALERT)
|
|
309
|
-
this.clearVhDepClientDateTimeInternalTask();
|
|
310
|
-
}
|
|
311
|
-
// 打印更新后的时间
|
|
312
|
-
// console.log(
|
|
313
|
-
// 'handleVhDepClientDateTime vh_dep_client_date_time: ',
|
|
314
|
-
// this.vh_dep_client_date_time.toLocaleTimeString()
|
|
315
|
-
// );
|
|
316
|
-
}, 1000);
|
|
317
|
-
}
|
|
318
|
-
},
|
|
319
|
-
checkPlaybackExpiredDateTime() {
|
|
320
|
-
if (this.data.type === 'vod' && this.data.recordWatchExpireObj.status == 1) {
|
|
321
|
-
const record_watch_expire = this.data.recordWatchExpireObj;
|
|
322
|
-
if (this.data.recordWatchExpireObj?.type == 1) {
|
|
323
|
-
// 全天时段
|
|
324
|
-
// console.log(`全天时段 范围:${this.data.recordWatchExpireObj?.start_date} - ${this.data.recordWatchExpireObj?.end_date}`)
|
|
325
|
-
if (this.data.recordWatchExpireObj?.start_date && this.data.recordWatchExpireObj?.end_date) {
|
|
326
|
-
const currentDate = new Date(this.vh_dep_client_date_time);
|
|
327
|
-
const start_date = new Date(this.data.recordWatchExpireObj.start_date);
|
|
328
|
-
const end_date = new Date(this.data.recordWatchExpireObj.end_date);
|
|
329
|
-
if (!(currentDate.getTime() >= start_date.getTime() && currentDate.getTime() <= end_date.getTime())) {
|
|
330
|
-
return false;
|
|
331
|
-
}
|
|
332
|
-
} else {
|
|
333
|
-
// 未配置开始日期和结束日期,不做有效期校验
|
|
334
|
-
return true;
|
|
335
|
-
}
|
|
336
|
-
} else if (this.data.recordWatchExpireObj?.type == 2) {
|
|
337
|
-
// 部分时段
|
|
338
|
-
if (record_watch_expire?.start_time && record_watch_expire?.end_time) {
|
|
339
|
-
if (record_watch_expire?.start_date && record_watch_expire?.end_date) {
|
|
340
|
-
// 部分时段,配置了 开始日期、结束日期、开始时间、结束时间
|
|
341
|
-
const currentDate = new Date(this.vh_dep_client_date_time);
|
|
342
|
-
const newStartDate = record_watch_expire.start_date.split(' ')[0] + ' ' + record_watch_expire.start_time;
|
|
343
|
-
const start_date = new Date(newStartDate);
|
|
344
|
-
const newEndDate = record_watch_expire.end_date.split(' ')[0] + ' ' + record_watch_expire.end_time;
|
|
345
|
-
const end_date = new Date(newEndDate);
|
|
346
|
-
if (!(currentDate.getTime() >= start_date.getTime() && currentDate.getTime() <= end_date.getTime())) {
|
|
347
|
-
// console.log(`部分时段 currentDate 不在 start_date 和 end_date 范围内 currentDate:${currentDate} start_date:${start_date} end_date:${end_date}`);
|
|
348
|
-
return false;
|
|
349
|
-
} else {
|
|
350
|
-
// console.log('部分时段 currentDate 在 start_date 和 end_date 范围内');
|
|
351
|
-
}
|
|
352
|
-
} else {
|
|
353
|
-
// 部分时段,仅配置了 开始时间、结束时间
|
|
354
|
-
const currentDate = new Date(this.vh_dep_client_date_time);
|
|
355
|
-
let year = currentDate.getFullYear();
|
|
356
|
-
let month = currentDate.getMonth() + 1;
|
|
357
|
-
let date = currentDate.getDate();
|
|
358
|
-
const start_date = new Date(`${year}/${month}/${date} ${record_watch_expire.start_time}`);
|
|
359
|
-
const end_date = new Date(`${year}/${month}/${date} ${record_watch_expire.end_time}`);
|
|
360
|
-
if (!(currentDate.getTime() >= start_date.getTime() && currentDate.getTime() <= end_date.getTime())) {
|
|
361
|
-
// console.log(`部分时段,仅配置了 开始时间、结束时间 currentDate 不在 start_date 和 end_date 范围内 currentDate:${currentDate} start_date:${start_date} end_date:${end_date}`);
|
|
362
|
-
return false;
|
|
363
|
-
} else {
|
|
364
|
-
// console.log('部分时段,仅配置了 开始时间、结束时间 currentDate 在 start_date 和 end_date 范围内');
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
return true
|
|
371
|
-
},
|
|
372
|
-
|
|
373
|
-
// 检查在线人数和热度是否示
|
|
374
|
-
setHot(scence, msg) {
|
|
375
|
-
if (scence === 'join') {
|
|
376
|
-
// 上线
|
|
377
|
-
const msgContext = safeJsonParse(msg.context);
|
|
378
|
-
this.setData({
|
|
379
|
-
personValue: msg.uv,
|
|
380
|
-
hotValue: msgContext.pv >= this.data.hotValue ? msgContext.pv + 1 : this.data.hotValue
|
|
381
|
-
})
|
|
382
|
-
} else if (scence === 'leave') {
|
|
383
|
-
// 下线
|
|
384
|
-
this.setData({
|
|
385
|
-
personValue: msg.uv
|
|
386
|
-
})
|
|
387
|
-
} else {
|
|
388
|
-
// 初始化
|
|
389
|
-
const liveInfo = this.sdkInstance.store.get('liveInfo');
|
|
390
|
-
const watchInitData = this.sdkInstance.store.get('watchInitData');
|
|
391
|
-
// 非预约 + 开关显示
|
|
392
|
-
const showPerson = liveInfo?.status != 2 && !!watchInitData?.online?.show;
|
|
393
|
-
const showHot = liveInfo?.status != 2 && !!watchInitData?.pv?.show;
|
|
394
|
-
this.setData({
|
|
395
|
-
showPerson,
|
|
396
|
-
personValue: 1,
|
|
397
|
-
showHot,
|
|
398
|
-
hotValue: watchInitData.pv.num2 ?? watchInitData.pv.real
|
|
399
|
-
})
|
|
400
|
-
}
|
|
401
|
-
},
|
|
402
|
-
destroy() {
|
|
403
|
-
this.vhallPlayerCore?.destroy();
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
export function createObservers() {
|
|
2
|
-
return {
|
|
3
|
-
sdkInstance(_sdkInstance) {
|
|
4
|
-
if (!_sdkInstance) return;
|
|
5
|
-
this.sdkInstance = _sdkInstance;
|
|
6
|
-
this.store = _sdkInstance.store;
|
|
7
|
-
const _that = this;
|
|
8
|
-
this.unsub = this.store.get({
|
|
9
|
-
liveInfo: function (liveInfo) {
|
|
10
|
-
_that.setData({
|
|
11
|
-
liveInfo,
|
|
12
|
-
});
|
|
13
|
-
const options = _that.store.get('');
|
|
14
|
-
// console.log('liveInfo:', JSON.stringify(options));
|
|
15
|
-
_that.initVhallPlayer(options);
|
|
16
|
-
_that.setHot();
|
|
17
|
-
},
|
|
18
|
-
'liveInfo.status': (status) => {
|
|
19
|
-
_that.setData({
|
|
20
|
-
['liveInfo.status']: status,
|
|
21
|
-
});
|
|
22
|
-
_that.setHot();
|
|
23
|
-
// 直播结束
|
|
24
|
-
if (status === 3) {
|
|
25
|
-
_that.destroy();
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
permissionValue: function (_permissionValue) {
|
|
29
|
-
if (_permissionValue.record_watch_expire) {
|
|
30
|
-
_that.startWatchExpire(_permissionValue.record_watch_expire);
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
this.unlistener && this.unlistener();
|
|
36
|
-
const obj = {
|
|
37
|
-
// 回放有效期校验
|
|
38
|
-
[this.sdkInstance.EVENT.RECORD_WATCH_EXPIRE_SET]: (msgData) => {
|
|
39
|
-
this.startWatchExpire(msgData?.msg_data);
|
|
40
|
-
},
|
|
41
|
-
// 上线消息
|
|
42
|
-
[this.sdkInstance.EVENT.JOIN_MSG]: (msg) => {
|
|
43
|
-
this.setHot('join', msg);
|
|
44
|
-
},
|
|
45
|
-
// 下线消息
|
|
46
|
-
[this.sdkInstance.EVENT.LEAVE_MSG]: (msg) => {
|
|
47
|
-
this.setHot('leave', msg);
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
this.unlistener = this.sdkInstance.on(obj);
|
|
52
|
-
},
|
|
53
|
-
checkPlaybackExpiredDateTime() {},
|
|
54
|
-
autoplay(autoplay) {
|
|
55
|
-
if (!autoplay) {
|
|
56
|
-
this.setData({
|
|
57
|
-
playStatus: 'paused',
|
|
58
|
-
// pausedFlag: true,
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
'type, paasAppId, paasRoomId, paasVodId': function (type, paasAppId, paasRoomId, paasVodId) {
|
|
63
|
-
this.initVhallyun();
|
|
64
|
-
},
|
|
65
|
-
muted: function (muted) {
|
|
66
|
-
this.setData({
|
|
67
|
-
mutedFlag: muted,
|
|
68
|
-
});
|
|
69
|
-
},
|
|
70
|
-
'watermarkOption.**': function (watermarkOption) {
|
|
71
|
-
if (watermarkOption.enable) {
|
|
72
|
-
this.setData({
|
|
73
|
-
showWatermark: true,
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
'marqueeOption.**': function (marqueeOption) {
|
|
78
|
-
if (marqueeOption.enable) {
|
|
79
|
-
this.setData({
|
|
80
|
-
showMarquee: true,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
// 封面图片
|
|
85
|
-
'posterOption.**': function (option) {
|
|
86
|
-
const { enable, url } = option;
|
|
87
|
-
if (enable && url.length > 0) {
|
|
88
|
-
this.setData({
|
|
89
|
-
showPoster: true,
|
|
90
|
-
posterUrl: url,
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
audioMode: function (audioMode) {
|
|
95
|
-
this.setData({
|
|
96
|
-
showAudioCover: audioMode,
|
|
97
|
-
});
|
|
98
|
-
},
|
|
99
|
-
currentQuality: function (currentQuality) {
|
|
100
|
-
if (!this.data.audioMode && currentQuality) {
|
|
101
|
-
this.setData({
|
|
102
|
-
showAudioCover: Boolean(currentQuality == 'a'),
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
verticalMode: function (verticalMode) {
|
|
107
|
-
// this.setData({
|
|
108
|
-
// _style: verticalMode
|
|
109
|
-
// ? 'height: calc(100vw * 16 / 9)'
|
|
110
|
-
// : 'height: calc(100vw * 9 / 16)',
|
|
111
|
-
// });
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
const DEFAULT_QUALITY_ALIAS = {
|
|
2
|
-
'same': '原画',
|
|
3
|
-
'origin': '原画质',
|
|
4
|
-
'720p': '超清',
|
|
5
|
-
'720sp': '超清',
|
|
6
|
-
'480p': '高清',
|
|
7
|
-
'480sp': '高清',
|
|
8
|
-
'360p': '标清',
|
|
9
|
-
'360sp': '标清',
|
|
10
|
-
'a': '音频'
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const props = {
|
|
14
|
-
sdkInstance: {
|
|
15
|
-
type: Object,
|
|
16
|
-
value: {},
|
|
17
|
-
},
|
|
18
|
-
uid: {
|
|
19
|
-
type: String,
|
|
20
|
-
value: undefined,
|
|
21
|
-
},
|
|
22
|
-
type: {
|
|
23
|
-
type: String,
|
|
24
|
-
value: 'unknown',
|
|
25
|
-
},
|
|
26
|
-
paasAppId: {
|
|
27
|
-
type: String,
|
|
28
|
-
value: undefined,
|
|
29
|
-
},
|
|
30
|
-
paasRoomId: {
|
|
31
|
-
type: String,
|
|
32
|
-
value: undefined,
|
|
33
|
-
},
|
|
34
|
-
paasVodId: {
|
|
35
|
-
type: String,
|
|
36
|
-
value: undefined,
|
|
37
|
-
},
|
|
38
|
-
paasAccessToken: {
|
|
39
|
-
type: String,
|
|
40
|
-
value: undefined,
|
|
41
|
-
},
|
|
42
|
-
defaultDefinition: {
|
|
43
|
-
type: String,
|
|
44
|
-
value: '480p',
|
|
45
|
-
},
|
|
46
|
-
autoplay: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
value: true,
|
|
49
|
-
},
|
|
50
|
-
showProgress: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
value: false,
|
|
53
|
-
},
|
|
54
|
-
audioMode: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
value: false,
|
|
57
|
-
},
|
|
58
|
-
verticalMode: {
|
|
59
|
-
type: Boolean,
|
|
60
|
-
value: false,
|
|
61
|
-
},
|
|
62
|
-
/**
|
|
63
|
-
* 填充模式:
|
|
64
|
-
* contain: 比例不变,图像长边填满屏幕,短边区域会被填充⿊⾊
|
|
65
|
-
* fillCrop: 比例不变,图像铺满屏幕,超出显示区域的部分将被截掉
|
|
66
|
-
* fill: 不保证保持原有的比例,内容拉伸填充整个内容容器
|
|
67
|
-
*/
|
|
68
|
-
objectFit: {
|
|
69
|
-
type: String,
|
|
70
|
-
value: 'contain',
|
|
71
|
-
},
|
|
72
|
-
ignores: {
|
|
73
|
-
type: Array,
|
|
74
|
-
value: [],
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
liveDelayMode: {
|
|
78
|
-
type: String,
|
|
79
|
-
value: 'live',
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
muted: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
value: false,
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
controls: {
|
|
88
|
-
type: Boolean,
|
|
89
|
-
value: true,
|
|
90
|
-
},
|
|
91
|
-
loop: {
|
|
92
|
-
type: Boolean,
|
|
93
|
-
value: false
|
|
94
|
-
},
|
|
95
|
-
/**
|
|
96
|
-
* 指定初始播放进度(仅点播)
|
|
97
|
-
*/
|
|
98
|
-
initialSeekTime: Number,
|
|
99
|
-
|
|
100
|
-
pictureInPictureMode: {
|
|
101
|
-
type: Array,
|
|
102
|
-
value: [],
|
|
103
|
-
},
|
|
104
|
-
// 水印配置
|
|
105
|
-
watermarkOption: {
|
|
106
|
-
type: Object,
|
|
107
|
-
value: {
|
|
108
|
-
enable: false, // 是否启用, 默认false
|
|
109
|
-
url: undefined, // 水印图片的路径
|
|
110
|
-
align: 'tr', // 水印图片的对其方式, tl | tr | bl | br 分别对应:左上,右上,左下,右下
|
|
111
|
-
position: ['0px', '0px'], // 对应的横纵位置,支持px,vh,vw,%
|
|
112
|
-
size: ['0px', '0px'], // 水印大小,支持px,vh,vw,%
|
|
113
|
-
alpha: 100, // 水印透明度 100完全显示 0隐藏
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
// 封面配置
|
|
117
|
-
posterOption: {
|
|
118
|
-
type: Object,
|
|
119
|
-
value: {
|
|
120
|
-
enable: false, // 是否启用, 默认false
|
|
121
|
-
url: undefined, // 封面图片的路径
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
// 跑马灯配置
|
|
125
|
-
marqueeOption: {
|
|
126
|
-
type: Object,
|
|
127
|
-
value: {},
|
|
128
|
-
},
|
|
129
|
-
// 点播打点配置
|
|
130
|
-
markPointsOption: {
|
|
131
|
-
type: Object,
|
|
132
|
-
value: {
|
|
133
|
-
enable: false, // 是否启用, 默认false
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
// 弹幕配置
|
|
137
|
-
danmakuOption: {
|
|
138
|
-
type: Object,
|
|
139
|
-
value: {
|
|
140
|
-
enable: false, // 是否启用, 默认false
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
// 直播字幕配置
|
|
144
|
-
liveSubtitleOption: {
|
|
145
|
-
type: Object,
|
|
146
|
-
value: {
|
|
147
|
-
enable: false, // 是否启用, 默认false
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
// 异常切线配置
|
|
151
|
-
thornOption: {
|
|
152
|
-
type: Object,
|
|
153
|
-
value: {
|
|
154
|
-
enable: false, // 是否启用, 默认false
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
// 清晰度对应显示词
|
|
158
|
-
qualityAlias: {
|
|
159
|
-
type: Object,
|
|
160
|
-
value: DEFAULT_QUALITY_ALIAS,
|
|
161
|
-
},
|
|
162
|
-
};
|