Page 1 of 1

loading video question

Posted: 09:39, 06 Feb 2015
by teacherben
Just got started with a set of beacons and the relaxation demo app that I found here:

http://evothings.com/quick-guide-to-wri ... avascript/

It worked like a charm. But then I tried to add videos to each of the pages (YouTube iframe) and while the page would load fine and the video would start as expected, when I moved my device over to another beacon, the page would change to the new page as it should, but the audio from the YouTube video continues to play. How can i code it so that when the page changes, the video stops?

Thanks,
C:

Re: loading video question

Posted: 21:53, 10 Feb 2015
by micke
Hello,

Perhaps you can set the URL of the iframe playing the video to point to an empty page? That should stop the video from playing. I think the problem is that the iframe still has the video playing even when the div containing the iframe is hidden. That should be why you hear the sound.

The empty page could be stored locally in the app, you could just point the iframe URL to it when the div tag is hidden.

Does this make sense?

Let me know how it goes.

Best regards, Mikael