16

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

Faizan Afzal
  • 413
  • 2
  • 11
  • 19
  • Did you find an answer to this? – IanS Feb 24 '16 at 15:45
  • 1
    The only solution I could get this to pass the request youtube native app – Faizan Afzal Apr 04 '16 at 08:11
  • But are you able to open the video in 360º mode? Because when I open the Youtube app with the link to the video, I'm not able to get the 360 mode (I have to press on Youtube icon, go to video desc and open again). Are you using any special intent extra for that? – rolgalan Apr 11 '16 at 10:48
  • https://stackoverflow.com/questions/35319284/youtube-360-video-iframe-does-not-work-in-mobile-browser?noredirect=1&lq=1 is this a possible duplicate of the question? – Artiom A May 24 '17 at 13:27

1 Answers1

1

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";
     });
  }
dev.meghraj
  • 8,542
  • 5
  • 38
  • 76