Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make Youtube 360 degree Videos work on mobile

I recently embedded the youtube 360 degree videos in my side. But I found that the 360 videos don't work on mobile browsers in devices like Android or iOS. Is there anyway to make work the 360 videos on mobile or Is it possible that when someone clicks on video link, then youtube app installed in mobile opens up ? Because I found that 360 videos works really well in native youtube app.

Thanks

like image 663
Faizan Afzal Avatar asked Jan 30 '16 09:01

Faizan Afzal


People also ask

How can I watch 360 videos on mobile?

Open the YouTube app on Android. Search for a VR video or go to the YouTube Virtual Reality house channel by searching for "Virtual Reality." Look for this icon to find the right channel . Select a VR video. To start playback, tap the play button.

Why do 360 videos not work on my phone?

If the YouTube app in your iPhone or Android is an old version, its possible 360-degree videos may not work. In this case, you need to update your YouTube app on your phone or upgrade your devices to the latest version of the operating system to run the newest version of the YouTube app.


1 Answers

You can redirect user to youtube which will open youtube native app or website when in mobile devices.

like this following code does

if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || (window.innerWidth < 640)){
     $('.video').on('click', function( e ) {
       e.preventDefault();
       window.location = "https://www.youtube.com/watch?v=0x16ngo8xfY&list=PLzSXIFcDqpiCiKXMtXtVIHnmor9uUsEhC&autoplay=1";
     });
  }
like image 106
dev.meghraj Avatar answered Sep 23 '22 18:09

dev.meghraj