Commit b75fae21 authored by limingzhe's avatar limingzhe
parents 6a3eaec7 bc4680ff
...@@ -93,7 +93,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -93,7 +93,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
refreshBtnState() { refreshBtnState() {
// await asyncDelay(0.01); // await asyncDelay(0.01);
if(!this.video) {
return;
}
if (this.video.isPlaying()) { if (this.video.isPlaying()) {
this.pauseBtn.active = true; this.pauseBtn.active = true;
this.playBtn.active = false; this.playBtn.active = false;
...@@ -176,11 +178,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -176,11 +178,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
videoRemoteNode.parent = videoLocalNode.parent; videoRemoteNode.parent = videoLocalNode.parent;
const video = videoRemoteNode.addComponent(cc.VideoPlayer); const video = videoRemoteNode.addComponent(cc.VideoPlayer);
window["air"].hideAirClassLoading();
video.resourceType = cc.VideoPlayer.ResourceType.REMOTE; video.resourceType = cc.VideoPlayer.ResourceType.REMOTE;
video.remoteURL = url; video.remoteURL = url;
// video.isFullscreen = true; // video.isFullscreen = true;
video.stayOnBottom = true; video.stayOnBottom = true;
...@@ -220,8 +220,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -220,8 +220,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// console.log('sy: ', sy); // console.log('sy: ', sy);
// console.log('scale: ', video.node.scale); // console.log('scale: ', video.node.scale);
video.play(); video.play();
window["air"].hideAirClassLoading();
// window["air"].hideAirClassLoading();
checkIsPlaying(); checkIsPlaying();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment