1.完成视频详情页的窗口播放视频,并能够将相关参数带到sceneVideoPlayer场景中
Showing
7 changed files
with
23 additions
and
15 deletions
This diff is collapsed.
Click to expand it.
| ... | @@ -192,7 +192,7 @@ | ... | @@ -192,7 +192,7 @@ |
| 192 | "array": [ | 192 | "array": [ |
| 193 | 0, | 193 | 0, |
| 194 | 0, | 194 | 0, |
| 195 | 249.4095916748047, | 195 | 250.28134155273438, |
| 196 | 0, | 196 | 0, |
| 197 | 0, | 197 | 0, |
| 198 | 0, | 198 | 0, |
| ... | @@ -3301,7 +3301,7 @@ | ... | @@ -3301,7 +3301,7 @@ |
| 3301 | "__id__": 75 | 3301 | "__id__": 75 |
| 3302 | } | 3302 | } |
| 3303 | ], | 3303 | ], |
| 3304 | "_active": false, | 3304 | "_active": true, |
| 3305 | "_components": [ | 3305 | "_components": [ |
| 3306 | { | 3306 | { |
| 3307 | "__id__": 78 | 3307 | "__id__": 78 |
| ... | @@ -3703,6 +3703,7 @@ | ... | @@ -3703,6 +3703,7 @@ |
| 3703 | "_aTouchContext": [], | 3703 | "_aTouchContext": [], |
| 3704 | "_defaultBackScene": null, | 3704 | "_defaultBackScene": null, |
| 3705 | "_oFocusScaleFactorInfo": null, | 3705 | "_oFocusScaleFactorInfo": null, |
| 3706 | "_bShowExitBox": false, | ||
| 3706 | "LastButton": { | 3707 | "LastButton": { |
| 3707 | "__id__": 17 | 3708 | "__id__": 17 |
| 3708 | }, | 3709 | }, | ... | ... |
| ... | @@ -37,6 +37,14 @@ cc.Class({ | ... | @@ -37,6 +37,14 @@ cc.Class({ |
| 37 | //----上下文及参数相关处理开始 | 37 | //----上下文及参数相关处理开始 |
| 38 | let aSceneContext = this._cApplication.getSceneContext(); | 38 | let aSceneContext = this._cApplication.getSceneContext(); |
| 39 | let aSceneParameter = this._cApplication.getSceneParameter(); | 39 | let aSceneParameter = this._cApplication.getSceneParameter(); |
| 40 | if (aSceneParameter.length) { | ||
| 41 | this._oSceneContext.name = aSceneParameter[aSceneParameter.length - 1].name; | ||
| 42 | this._oSceneContext.url = aSceneParameter[aSceneParameter.length - 1].url; | ||
| 43 | } else if (aSceneParameter) { | ||
| 44 | this._oSceneContext.name = aSceneParameter.name; | ||
| 45 | this._oSceneContext.url = aSceneParameter.url; | ||
| 46 | } | ||
| 47 | cc.find("SongNames/CurrentName", this.node).getComponent(cc.Label).string = this._oSceneContext.name || ""; | ||
| 40 | //参数 | 48 | //参数 |
| 41 | this._oDefaultBackASceneParameter = {}; | 49 | this._oDefaultBackASceneParameter = {}; |
| 42 | cc.log(aSceneParameter); | 50 | cc.log(aSceneParameter); |
| ... | @@ -521,7 +529,7 @@ cc.Class({ | ... | @@ -521,7 +529,7 @@ cc.Class({ |
| 521 | 529 | ||
| 522 | this._ComOperation.initPlayer(0, 0, Common.SCREEN_WIDTH, Common.SCREEN_HEIGHT, true, true); //测试 | 530 | this._ComOperation.initPlayer(0, 0, Common.SCREEN_WIDTH, Common.SCREEN_HEIGHT, true, true); //测试 |
| 523 | let options = {}; | 531 | let options = {}; |
| 524 | options.playurl = "http://mirror.aarnet.edu.au/pub/TED-talks/911Mothers_2010W-480p.mp4"; | 532 | options.playurl = this._oSceneContext.url; |
| 525 | this._ComOperation.setURL(options); //测试播放地址 | 533 | this._ComOperation.setURL(options); //测试播放地址 |
| 526 | } catch (error) { | 534 | } catch (error) { |
| 527 | if (cc.sys.isNative) { | 535 | if (cc.sys.isNative) { | ... | ... |
assets/Script/videoDetail.js
0 → 100644
This diff is collapsed.
Click to expand it.
| ... | @@ -672,9 +672,9 @@ | ... | @@ -672,9 +672,9 @@ |
| 672 | "_opacity": 255, | 672 | "_opacity": 255, |
| 673 | "_color": { | 673 | "_color": { |
| 674 | "__type__": "cc.Color", | 674 | "__type__": "cc.Color", |
| 675 | "r": 255, | 675 | "r": 180, |
| 676 | "g": 255, | 676 | "g": 184, |
| 677 | "b": 255, | 677 | "b": 191, |
| 678 | "a": 255 | 678 | "a": 255 |
| 679 | }, | 679 | }, |
| 680 | "_contentSize": { | 680 | "_contentSize": { | ... | ... |
| ... | @@ -3,12 +3,11 @@ | ... | @@ -3,12 +3,11 @@ |
| 3 | "count": 1, | 3 | "count": 1, |
| 4 | "resultSet": [ | 4 | "resultSet": [ |
| 5 | { | 5 | { |
| 6 | "name": "魔法沙拉", | 6 | "name": "专注力 (21个亲子游戏)", |
| 7 | "versions": "1.0.1", | 7 | "episode_number": 15, |
| 8 | "size": "99.73M", | 8 | "current_episode_number": 15, |
| 9 | "updateTime": "2019-12-25", | ||
| 10 | "tag":"遥控器,游戏手柄,摄像头", | ||
| 11 | "description": "简介:作为人气作品《魔法沙拉》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......", | 9 | "description": "简介:作为人气作品《魔法沙拉》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......", |
| 10 | "url": "http://mirror.aarnet.edu.au/pub/TED-talks/911Mothers_2010W-480p.mp4", | ||
| 12 | "images": { | 11 | "images": { |
| 13 | "list": [ | 12 | "list": [ |
| 14 | { | 13 | { | ... | ... |
| ... | @@ -379,25 +379,25 @@ | ... | @@ -379,25 +379,25 @@ |
| 379 | { | 379 | { |
| 380 | "name": "Subject1", | 380 | "name": "Subject1", |
| 381 | "imageURL": "upload/image/main/block7_1.png", | 381 | "imageURL": "upload/image/main/block7_1.png", |
| 382 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneVideoPlayer\"}}]}", | 382 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneVideoDetail\"}}]}", |
| 383 | "code": "promotionItem_e432ac2d-c1f3-4d44-a42b-7000971affa1" | 383 | "code": "promotionItem_e432ac2d-c1f3-4d44-a42b-7000971affa1" |
| 384 | }, | 384 | }, |
| 385 | { | 385 | { |
| 386 | "name": "Subject2", | 386 | "name": "Subject2", |
| 387 | "imageURL": "upload/image/main/block7_2.png", | 387 | "imageURL": "upload/image/main/block7_2.png", |
| 388 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneVideoPlayer\"}}]}", | 388 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneVideoPlayer\",\"name\":\"TED\",\"url\":\"http://mirror.aarnet.edu.au/pub/TED-talks/911Mothers_2010W-480p.mp4\"}}]}", |
| 389 | "code": "promotionItem_f90b7ff3-1f36-4019-9e77-cef871902343" | 389 | "code": "promotionItem_f90b7ff3-1f36-4019-9e77-cef871902343" |
| 390 | }, | 390 | }, |
| 391 | { | 391 | { |
| 392 | "name": "Subject3", | 392 | "name": "Subject3", |
| 393 | "imageURL": "upload/image/main/block7_3.png", | 393 | "imageURL": "upload/image/main/block7_3.png", |
| 394 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneVideoPlayer\"}}]}", | 394 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneVideoPlayer\",\"name\":\"TED\",\"url\":\"http://mirror.aarnet.edu.au/pub/TED-talks/911Mothers_2010W-480p.mp4\"}}]}", |
| 395 | "code": "promotionItem_e29b33e4-8954-4ef9-a6fc-0d844c909c67" | 395 | "code": "promotionItem_e29b33e4-8954-4ef9-a6fc-0d844c909c67" |
| 396 | }, | 396 | }, |
| 397 | { | 397 | { |
| 398 | "name": "Subject4", | 398 | "name": "Subject4", |
| 399 | "imageURL": "upload/image/main/block7_4.png", | 399 | "imageURL": "upload/image/main/block7_4.png", |
| 400 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneVideoPlayer\"}}]}", | 400 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneVideoPlayer\",\"name\":\"TED\",\"url\":\"http://mirror.aarnet.edu.au/pub/TED-talks/911Mothers_2010W-480p.mp4\"}}]}", |
| 401 | "code": "promotionItem_57aea4b3-7716-4FGRACWGVRTee32" | 401 | "code": "promotionItem_57aea4b3-7716-4FGRACWGVRTee32" |
| 402 | } | 402 | } |
| 403 | ] | 403 | ] | ... | ... |
-
Please register or sign in to post a comment