2

I'm using Unity3D 5.3.5 to build my application. I'm using PHP7 to generate JSON APIs. I was trying to stream 360 videos on my Android app. So, I bought Easy Movie Texture plugin from the asset store. Now, I can play 360 degrees videos both locally and from my server. No Problem There!

However, I cannot find a way to access the direct link in a legal manner.

For example, a Youtube link https://www.youtube.com/watch?v=xxxxxxx would take you to a youtube page. But I am looking for a way to access the direct link like this one

https://r3---sn-4g57knrz.googlevideo.com/videoplayback?sparams=dur,ei,expire,id,initcwndbps,ip,ipbits,itag,lmt,mime,mm,mn,ms,mv,pl,ratebypass,requiressl,source,upn&id=o-AKELtsm___flI-ul3_x4DfHIoNWeQHQUOqjyrBF6eEDC&ip=27.34.106.98&ei=dcC3WJnWOsHKcrfjhLAI&requiressl=yes&pl=18&expire=1488458966&signature=2C08D077FAB84A30DFFE5472BD58539C44850FB2.73F0822B30B45C123589B6EB823612904BFEF35A&lmt=1488437275021563&beids=%5B9452307%5D&itag=22&key=cms1&mime=video%2Fmp4&ipbits=0&dur=118.166&source=youtube&ratebypass=yes&upn=yqEA5wXYUl4&cm2rm=sn-fapo3ox25a-3uhl7s,sn-25gz77z&req_id=11a107d03147a3ee&redirect_counter=2&cms_redirect=yes&mm=34&mn=sn-4g57knrz&ms=ltu&mt=1488439397&mv=m

I got the link through VLC Media Player's Network Stream feature. The problem with these links is that they expire and it isn't fully legal to access them as per this link: how can get direct link from youtube video with youtube api v3

So, how on earth do I stream 360 degrees youtube video through my app in unity?

Community
  • 1
  • 1
  • You just wasted your money by buying **"Easy Movie Texture"**. There is a [VideoPlayer](http://stackoverflow.com/questions/41144054/using-new-unity-videoplayer-and-videoclip-api-to-play-video) that can do this 5.6 which will be released this month. You can still download the beta. It can play both videos offline or online. Although, it may not be able to play Youtube videos directly just like **"Easy Movie Texture"** can't due to license problems. – Programmer Mar 06 '17 at 08:50
  • My suggestion to you is to download the Video. Play it then delete it when the app closes. In that case, the link wouldn't expire while pausing the value. You may also be able to play it while downloading it. I haven't done this before but you can create a http server and point the video file to the data you are downloading. You can then point the video player to that http in your app. I don't know if this will work but give it a try. – Programmer Mar 06 '17 at 08:54

0 Answers0