Page 1 of 1

Triggering loader for each 360° video scene

Posted: Tue Oct 22, 2019 9:01 am
by jobes
Hey. Diving back into P2VR and my knowledge is feeling a bit rusty :P so asking for some sagely advice please.

Been authoring a multi-scene tour comprising a mix of 360° video and photos, with the emphasis being on 90-120sec 360° video content as the lead. Having played around with various encoding and resolution settings I've got a pretty solid primary video encode for desktop, and fallbacks for mobile.

However for desktop playback these videos are 4K and generally 100-150MB. They play well once loaded and in cache but there's a lag between clicking through to a 360° video node, and playback. I'd like to call a generic loader screen to display prior to each of these 360° video playing. Previously only used a loader at the start of a project, not for individual content.

So… how would I go about using a hotspot to open a new tour node / panorama - but display a loading bar / screen until the video is ready to play? At present the placeholder image is displayed until the video is loaded. I'd like to have a generic screen and loading component cover this image, and when that content changes to the 360° video file, make the loading screen disappear to reveal the playing video. I'd prefer to keep the 360° video as autoplay, rather than ask the user to trigger playback.

Is there a threshold variable that a 360° needs to reach before the video plays? Fully loaded, or can it play part-way through based on the bandwidth and number of frames?

Thanks in advance :)

Re: Triggering loader for each 360° video scene

Posted: Wed Oct 23, 2019 3:52 pm
by jobes
Perhaps I was overthinking this. For now I've implemented a simple customised loader element - referenced from the components library – which does most of what I want. It'd still be good if there was a way to initiate playback once the video has loaded enough to be able to play, rather than fully loading the file, but this may be beyond what's achievable in Pano2VR…

Re: Triggering loader for each 360° video scene

Posted: Thu Oct 24, 2019 3:26 pm
by Hopki
Hi Joby,
The problem is Pano2VR does not get the information, it's down to the browser to start playing the video when it has enough data.
The player makes the call to open the file, then it starts to stream.
How the video has been encoded also plays a big part in this.
As an example, HandBrake has the Web Optimised option which includes all the necessary data in the headers so the browser knows to stream the video from the start. Other encoders map put it at the end so the browser will take a lot longer to start playing the video.
I'm sure you know all this, just pointing this out for others following the thread.
However, I have put this in the bug tracker/feature request so it will be possible to have a message display while loading and hide when the video starts to play.
Regards,
Hopki

Re: Triggering loader for each 360° video scene

Posted: Thu Oct 24, 2019 4:01 pm
by jobes
Thanks Hopki, appreciate the reply.

When I thought this through I reaslised without hinting or other information in the videos this isn't really possible… the best P2VR could do is to display tangible info (eg number of bytes loaded, or percentage loaded) and then play at a 'safe' stage, assuming the media format allows it to so while streaming. Still, a 'normal' loader works pretty well for me here.

Re: Triggering loader for each 360° video scene

Posted: Thu Oct 24, 2019 5:48 pm
by Hopki
We are looking at the seek bar and the activate and deactivate source actions.
My thoughts are while the video is not playing it is not active, when it starts to play then we should be able to use the source Activate.
So you could give the seek bar actions such as Activate, hide loading message, or similar.
The problem is its not the player that determines this but the browser when it will start to play.
Anyway, it's in the hands of the dev gnomes to whip up some magic gnome dust.
Regards,
Hopki