Hi Everyone,
I’m having trouble with Z.device playFullscreenVideo function. I can’t seem to put a button overlay on to the video and I am unable to get any controls to pause, slide or exit. Also I cannot influence how the video responds at the end eg. stay on screen or exit.
Am I missing something?
Malcolm
Code after the usual declarations:
// Runs when Zapped
parent.on(“ready”, () => {
//Flag for Video
VideoState = 0;
//Play the Video
VideoFile = Z.device.playFullscreenVideo(“https://xyz/autoStart.mp4”); \example of the call link
Video_Player.nodes.show0.myvid.source(VideoFile);
symbol.controllers.VideoMode.elements.Show.activate();
Video_Player.nodes.control.start();
// Run the Timeline to show the 4 Play buttons at the end of the autoStart Video
symbol.controllers.ButtonState.elements.Show.activate();
symbol.controllers.ButtonTimeline.elements.Show.play(); // buttons to appear from 20 seconds
});
// Runs when Play Button Pressed either from end of First Video or from jpg image
Play_Button1.on(“pointerdown”, (e) => {
VideoState = 1;
//First hide the buttons
symbol.controllers.ButtonState.elements.Hide.activate();
//Run the Video
VideoFile = “https://xyz/Video1.mp4”; //example link to file
Video_Player.nodes.show0.myvid.source(VideoFile);
Video_Player.nodes.control.start();
symbol.controllers.VideoMode.elements.Show.activate();
});
// Video Finished code *************************
Video_Player.on(“video:finish”, () => {
switch(VideoState) {
case 0 : {
//The video should stay on the screen with 4 overlay buttons at end
//these buttons activate other videos
break;
}
//button 1 triggers a new video then returns to a poster image
case 1: {
symbol.controllers.VideoMode.elements.Hide.activate(); // Hide the video
symbol.controllers.PosterState.elements.Show.activate(); // Show the poster
symbol.controllers.ButtonState.elements.Show.activate(); // Show the buttons
break;
}
}
});