It it possible to expand a video within an image tracked scene to full-screen? And then minimize to go back to the AR experience?
The experience is a poster that has a set of image trackers on it, a couple of them auto playing videos / looping poster graphics, and one main video that shows up with a tappable thumbnail. Iβve placed a button in the experience as well, and would like the user to be able to tap the button to expand the main video into a full-screen non-AR experience. And then ideally, they could minimize the video and pick up the image trackers again. Any tips on how I should approach that? Thank you!
iOS doesnβt fully support full-screen mode in browsers, except potentially through Progressive Web Apps (PWAs), which then require launching from the home screen. Therefore, aiming for full-screen experiences might not be advisable due to inconsistent support across operating systems.
However, you can implement a semi-full screen video for certain functionalities, such as when you need a video to play over your scene. When the xrimagefound event is triggered, or whenever you wish to start a video, you could initiate playback of a video within a 2D overlay (div) over the a-frame scene. Additionally, incorporate logic that allows users to exit this mode smoothly.
/* Function to open fullscreen mode /
function openFullscreen() {
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.webkitRequestFullscreen) { / Safari /
elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) { / IE11 */
elem.msRequestFullscreen();
}
}
you can try this but you need create button trigger open fullscreen image