Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I embed Youku or Tudou videos in my iOS app?

Or open them in a UIWebView? Their videos are in .swf format though.

Thank you.

EDIT: Okay, so I can get it to play in UIWebView, also when you click on the video in the UIWebView it will play the video in fullscreen. So am wondering if I can just get the code of when it clicks to fullscreen, and use it in some button I have.

Did that make sense?

Oh and thank you again.

like image 515
purplelilgirl Avatar asked Dec 12 '22 05:12

purplelilgirl


2 Answers

Try embed the iframe snippet from Youku into your webview

<iframe height="498" width="510" frameborder="0" allowfullscreen
 src="http://player.youku.com/embed/XNTY4ODU0NzQ0"></iframe>

I got it working on Android, but not tried it on iOS yet.

like image 126
OatsMantou Avatar answered Dec 14 '22 23:12

OatsMantou


<video width="480" height="320"
 src="http://v.youku.com/player/getRealM3U8/vid/XMzkxMTM3MDQw/type//video.m3u8"
 controls>
    <embed src="http://player.youku.com/player.php/sid/XMzkxMTM3MDQw/v.swf"
     allowFullScreen="true" quality="high" width="480" height="320"
     align="middle" allowScriptAccess="always"
     type="application/x-shockwave-flash"></embed>
</video>

Just use the above HTML in a UIWebView for Youku. It can be played on iOS device and PC. Replace the XMzkxMTM3MDQw with the corresponding code of the video.

like image 26
Eddie Lau Avatar answered Dec 14 '22 23:12

Eddie Lau