A video challenge

A video challenge

Good Morning
This is my first posting.
How to run a video in the same scene in full screen and when you pressed the "done" button (default Ipad2) closed this video back to the same scene?
This video would run only when pressed any button on the scene.

You need a little bit of custom JavaScript to pull this off - at least for iOS devices. Fullscreen mode API is something that is still not full specified for HTML5 so implementations are very specific for each browser.

Anyway, to switch scene when you press 'Done' when viewing videos on an iOS device do the following:

In the scene that contains the video, under Actions -> Start -> Custom JavaScipt
enter following code:

Code:

//get the reference for the video
var video = document.getElementsByTagName('video')[0];
//listen to when the user presses 'Done', and then execute onVideoEndsFullScreen
video.addEventListener('webkitendfullscreen', onVideoEndsFullScreen, false);
function onVideoEndsFullScreen() {
//go to next scene when that happens
controller.goToNextScene();
//or alternatively, you can call controller.replayScene(); to restart current scene
}