How to play Youtube video, auto fade out then fade in with normal 360?

  • Hi,

    Was hoping to get a little advice please on a project.

    I've got the youtube video playing OK after referring to the YouTube player example and then when the movie ends I click outside the player box it disappears and the multires 360 is behind it but I'd like to do the following:

    The scene loads and all is black with just a graphic hotspot titled CLICK HERE

    Once the hotspot is clicked a YouTube video opens and plays and then at the very end the video disappears automatically, the entire scene fades to black and then the main multires 360 degree image fades in and people can spin it around as normal.

    I'm not quite sure where to start so hopefully someone can offer any pointers at all?

    Many thanks,

    Andrew

  • For when the video ends, I believe youtube won't work. You need the actual video file.. You can download youtube videos however.

    For the rest, see the inline example at the end of this link..

    https://krpano.com/plugins/videoplayer/#top

    For basic usage without the onvideocomplete event try these code examples..

    load a youtube video

    I think in the long run trying to use youtube just creates more headaches than it solves. With the source video files, you can do anything and have it work perfectly.

  • Thanks Sacha,

    I originally used the intro video file on the website and then had the 360 completely separate but the video downloading was so slow at most times of the day it was a joke. It was only 13mb in size so that's why I switched to letting YouTube look after it all as there seems to be less streaming issues.

    Silly me, many times I miss the obvious and never even thought to try using the original video 'inside' the 360 as a layer. May well be the solution especially as there's a onvideocomplete="" at the end *wink*

    Will need to sort out some sort of loading bar as after checking the inline Videoplayer example, clicking the play icon the screen just went darker and then nothing happens at all until the video is loaded. I think most would think something is wrong after 10 - 15 seconds of nothing and head off somewhere else.

    I'll try tomorrow and update this post which may help out Virtual Pete.

    Thanks again.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!