Search Unity

Is there a way to play a yotube video inside a unity web app?

Discussion in 'Editor & General Support' started by Juan, Jun 4, 2011.

  1. Juan

    Juan

    Joined:
    May 21, 2009
    Posts:
    142
    Hi.

    That's the question:

    Is there a way to play a yotube video inside a unity web app?

    I'm interested in this because i have a standalon/ios/android app that has a video, but this video is big (around 40mb), and i have a youtube version of this video.

    Is it possible to stream a youtube video from the web player?

    Cheers and thanks for the help.
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    No thats not possible, all you can do is offer them a link to jump to unity over push an iframe over the webplayer to do so but you won't get it into unity.

    The only movie format you can playback in unity pro is ogg theora
     
  3. divinity

    divinity

    Joined:
    May 30, 2011
    Posts:
    411
    You can download the video and then put that onto a plane or whatever (seen it somewhere as a tut)
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Thats easy yeah. Juts use WWW and yield for the www object and once the yield is through assign www.movieTexture to the guitexture.texture and use www.movieTexture.audioClip and assign that to an AudioSource and then play the movietexture and audiosource :)
     
  5. Juan

    Juan

    Joined:
    May 21, 2009
    Posts:
    142
    Thanks for the answers.

    The downloaded video will be playable from unity then?

    I mean, the downloaded video from youtube won't be encoded with unity, so will it support the video as a texture?

    Cheers.
     
  6. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    No it will not work.
    The movie must always be ogg theora or it will not go into unity at all at runtime
     
  7. hallamasch

    hallamasch

    Joined:
    Nov 29, 2010
    Posts:
    153
    Hmm maybe doing an on the spot conversion.
    (either in the APP or on a Dedicated Server) (But I am not sure if the performance will be good enough)

    For an idea (not tutorial) check this website out: http://www.hidemyass.com/
    They basicly stream the video to one of there US based servers, at the same time they send the stream to your browser.

    They don't do conversion do!
    Works pretty good to bypass "this video is not available in your country"