@ccclass('Test')
export class Test extends Component {
@property(Node)
startNode: Node;
@property(VideoPlayer)
startVideo: VideoPlayer;
@property(Node)
resultNode: Node;
@property(VideoPlayer)
resultVideo: VideoPlayer;
@property(Node)
resultVideoNode: Node;
start() {}
init() {
const { startNode, startVideo, resultNode, resultVideo, resultVideoNode } = this;
startNode.active = true;
startVideo.play();
startNode.on(
VideoPlayer.EventType.COMPLETED,
() => {
startNode.active = false;
resultNode.active = true;
resultVideo.play();
const a = this.getComponent(Animation);
a.play();
resultVideo.playOnAwake = true;
resultVideoNode.on(
VideoPlayer.EventType.COMPLETED,
() => {
console.log(234);
},
this
);
},
this
);
}
update(deltaTime: number) {}
}
PC(mac) 可以正常播放第一段视频, 完了之后, 正常播放第二段视频.
但是 手机上 第一段视频能正常播放, 第二段视频就放不了了.( iOS 浏览器)
