From 52eeb475f00173d629666ae7b61cf8a5a3d824ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com> Date: Tue, 23 Jul 2024 13:02:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E5=87=86=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commonComponents/video/index.vue | 30 ++++--------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/pages/component/commonComponents/video/index.vue b/pages/component/commonComponents/video/index.vue index 13ee4fd..ffd1c18 100644 --- a/pages/component/commonComponents/video/index.vue +++ b/pages/component/commonComponents/video/index.vue @@ -910,6 +910,7 @@ export default { } else { playerOptions = { ...playerOptions, + vid:this.videoData.videoId, "playauth": this.videoData.playAuth, // 必选参数,参数值可通过调用GetVideoPlayAuth接口获取。 "encryptType": 1, // 必选参数,当播放私有加密流时需要设置本参数值为1。其它情况无需设置。 "playConfig": { @@ -921,9 +922,10 @@ export default { playerOptions = { ...playerOptions, source: this.videoData.m3u8Url, - playConfig: { - "EncryptType": 'HLSEncryption' - } + // playConfig: { + // "EncryptType": 'HLSEncryption', + // 'MtsHlsUriToken':this.videoData.mtsHlsUriToken + // } } console.log('这是标准加密的视频'); } @@ -937,29 +939,7 @@ export default { console.log('这是没有加密的视频'); } - 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)