Browse Source

:art: call method: Utils.videoUrlFormat

zhanghe 6 years ago
parent
commit
446f69ccec

+ 5 - 4
src/stage/index/scene/LessonScene.js

@@ -1,5 +1,6 @@
-import APIClient from '../../../util/API/APIClient'
-import Consts from '../../../util/Consts'
+import APIClient from '../../../util/API/APIClient';
+import Consts from '../../../util/Consts';
+import Utils from '../../../util/Utils';
 import HlsVideoPlugin from '../../../util/HlsVideoPlugin';
 import {CommandBus, CMD_TYPE} from '../../../util/CommandBus';
 
@@ -141,7 +142,7 @@ class LessonScene extends scene {
     		case Consts.TYPE_VIDEO:
     			let playUrl = '';
     			if (list && list.length >= 1) {
-    				playUrl = list[0].url;
+    				playUrl = Utils.videoUrlFormat(list[0].url);
     			}
     			let videoViewDom =
                 `
@@ -232,7 +233,7 @@ class LessonScene extends scene {
     		case Consts.TYPE_VIDEO:
     			let playUrl = '';
     			if (list && list.length >= 1) {
-    				playUrl = list[0].url;
+    				playUrl = Utils.videoUrlFormat(list[0].url);
     			}
     			let videoViewDom =
                 `

+ 2 - 1
src/stage/index/scene/VideoWareFullScreenScene.js

@@ -1,4 +1,5 @@
 import Consts from '../../../util/Consts';
+import Utils from '../../../util/Utils';
 import HlsVideoPlugin from '../../../util/HlsVideoPlugin';
 
 class VideoWareFullScreenScene extends scene {
@@ -86,7 +87,7 @@ class VideoWareFullScreenScene extends scene {
         const { list, type, title } = wareItem;
         let playUrl = '';
         if (list.length > 0) {
-          playUrl = list[0].url;
+          playUrl = Utils.videoUrlFormat(list[0].url);
         }
         if (window.efunbox) {
         	window.efunbox.initAndroidPlayer(