Z.device.playFullscreenVideo Issues

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;
}

}
});

Hey There Malcolm,

Is the pause,play e.t.c button not working even when you remove the button you put?

Also,I didn’t get what you are aiming for,Can you please elaborate it?

Thanks,
Ayushya

Hi,

Sorry for the delay.

I want to have Video controls available when playing videos. The main video has placeholders for 4 buttons at the end, so I also want to overlay 4 buttons onto the end. These buttons trigger other videos.

Note on playFullsceenvideo the overlays/buttons do not come up. however they show when you remove the PlayfullscreenVideo component of the statement.

In terms of video controls I will need to check when I get back to the office. I will re post then

Malcolm

Malcolm when you use fullscreen video you are using the devices own video player not zappars. You only get the built-in controls based on your device. IE apple decides player looks different than a Androids.

There is NO on screen zappar controls for full screen video at this time.

Steve

Hi guys, I’m new here.
Is posible to set “autoplay” when you add an action “Play full screen video”?
Thanks!

Hey @francisca - welcome to the forum!

You can toggle the autoplay property on/off in Studio after you’ve added the video player symbol.
There’s more information here: https://docs.zap.works/studio/subsymbols/subsymbol-templates/components/video-player/

Hay @tom.defraine I think @francisca is asking for auto play using z.device.playFullscreenVideo not the video player subsymbol. I can’t remember if we can or not. will have to look at it.

Steve

I am new using zappar, I have built some experiences and I have a problem with Z.device.playFullscreenVideo, using an image as a button, I set up a “pointerenter”, adding the following script:

parent.on(“pointerenter”, (e) => {

Z.device.playFullscreenVideo(“Intro zasu zappar-2.mp4 - Google Drive”);
});

The problem is that when opening the video it stays loading and does not play, I have already changed the settings to the recommended ones, and I even use youtube and vimeo videos but the problem persists

The characteristics of the video are the following:

I am using an iphone x with ios 15 for experience use

can you give me any recommendation?

Thank you.

Hi @innovacion.zasu.mx,

It sounds like you may not be using a direct video link to play your video. Unfortunately, Google Drive does not provide a direct URL to media. We have more information about streaming full screen video here.

It’s best to host your video on a CDN such as AWS CloudFront or CloudFlare. This will also allow you to get that direct link.

Have a great day!
Francesca :blush:

Hi @francisca,

Welcome to the forums! :tada:

The ability to ‘autoplay’ when adding the ‘Play Fullscreen Video’ Action is not available in the Action itself. This Action will also work differently depending on the platform you are using.

For example, in the Zappar App, full screen video should autoplay by default. In WebAR, we must ask the user to play the video, since we’re now at the mercy of the device’s browser.

Hopefully that’s helpful!

Have a great day,
Francesca :blush: