[P2VR 6.1.11] Media Ended action not working for Youtube videos

Q&A about the latest versions
Post Reply
User avatar
dennisvanduijn
Posts: 145
Joined: Wed Apr 28, 2010 10:56 am
Location: Gouda, Netherlands
Contact:

Hi all!

I recently noticed that the Media Ended action on Youtube videos doesn't seem to work anymore. Please see the videos in this example project of mine:

https://www.okijk.nl/projecten/eriks/ede

The Media Ended action should trigger a click on the white close icon at the upper right, which hides the video pop-up and makes the GUI items to reappear. But instead, when the video ends, the video stays in view and Youtube video suggestions appear. Locally it works as expected, but online, it strangely is as described.

Settings are:
Autoplay: checked
Controls: checked
Loop: unchecked
Unload video on hide: checked

I checked several combination to see if this fixes it, but to no avail. Who could help me with this? Is this a bug, is there a workaround available?

Cheers!

Dennis
Commercial 360° tours ● Gamified 360° tours ● Officially since 2010

Image

https://okijk.nl
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Dennis,
Just checked this and it's all working.
Please see the simple test attached.
Open the video and scrub to almost the and let it play.
On the media end, it hides the video.

Which YouTube video are you using, can you post the link?
I take it your using the video element and not a text box with embed code.
OK, just looked in the browser console, your using an iframe, you need to use the video element.
Regards,
Attachments
YouTube.zip
(16.54 KiB) Downloaded 95 times
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
User avatar
dennisvanduijn
Posts: 145
Joined: Wed Apr 28, 2010 10:56 am
Location: Gouda, Netherlands
Contact:

Hi Hopki,

Thanks for your efforts. In fact, I am using the same video element, following the tip you gave me a while ago. I see that in your example, the youtube ID is given in the hotspot itself, and called for with $(hu). I do it differently, by an action at video button click that sets the value of the video element to be the Youtube video ID and also the variable VideoPlays to true. If true, then the container and the Video element are shown. Weird thing is, it does work with my project, but only locally. As soon as I upload and see the tour online (Windows Edge, FF, Chrome, cache cleaned), the faulty situation occors.

The video I am using is for eaxmple: https://youtu.be/F-Xa3v64wPM

Regards,

Dennis
Commercial 360° tours ● Gamified 360° tours ● Officially since 2010

Image

https://okijk.nl
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Dennis,
Just tried your way, so my project but with a button that sets a value to the video element, and then set the variable value.
Still working https://support.ggno.me/youtube3
Let me know when you have seen it so I can remove the project from my server.
The project that built it is attached.
Regards,
Attachments
youtube3.zip
(17.44 KiB) Downloaded 105 times
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
User avatar
dennisvanduijn
Posts: 145
Joined: Wed Apr 28, 2010 10:56 am
Location: Gouda, Netherlands
Contact:

Hi Hopki,

Thank you very much for your help! Thanks to your examples, I saw I set up the skin elements just right. The cause was to be found somewhere else, so I tracked the issue down to the point that the index.html file appeared to be outdated. I am used to copy this file to each new project, so that I don't have to copy in the Google Analytics and the og: data anew every time. So, I replaced the index.html with the newly outputted one and that did the trick. The videos now just end as expected, and I know which bad habit I have to abandon :oops: .

Regards,

Dennis
Commercial 360° tours ● Gamified 360° tours ● Officially since 2010

Image

https://okijk.nl
User avatar
k.ary.n
Gnome
Posts: 615
Joined: Wed Aug 15, 2007 1:02 pm

When you copy the HTML into the project, how are you doing this?

Maybe you could make your HTML file a template with the Analytics, etc. already added. This way, a fresh index.html is created, but with the needed elements.

Then, save the entire output as an output template or as the project default settings (File > Save as Default) so you don't forget to choose that custom template.
User avatar
dennisvanduijn
Posts: 145
Joined: Wed Apr 28, 2010 10:56 am
Location: Gouda, Netherlands
Contact:

Hi Karyn,

I almost always replace the existing online index.html file with the Google Analytics and og: containing one when the official handover to my customer is near. Being able to insert my pieces of html on-the-fly would be awesome. The page you refer to doesn't seem to provide an how-to, would there be a video tutorial be available to do this?

Regards,

Dennis
Commercial 360° tours ● Gamified 360° tours ● Officially since 2010

Image

https://okijk.nl
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Dennis,
The HTML templates can be found using the Files tab in the Settings/Preferences, see: https://ggnome.com/doc/prefs-settings/#files
You can right button click on the HTML Templates file path to open in Explorer/Finder.
You can then make a copy of the normal.ggt, then using a plain text editor open it up and add your analytics code and save.
If you want to know more about the .ggt files please see: https://ggnome.com/doc/html-template/
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
User avatar
dennisvanduijn
Posts: 145
Joined: Wed Apr 28, 2010 10:56 am
Location: Gouda, Netherlands
Contact:

Great, thank you Hopki, I will do that!
Regards,
Dennis
Commercial 360° tours ● Gamified 360° tours ● Officially since 2010

Image

https://okijk.nl
Post Reply