Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
723 views
in Technique[技术] by (71.8m points)

objective c - Play youtube videos in fullscreen auto

I am trying to play a youtube video using youtube embedded player in my ipad app. I want that as soon as the user clicks on the video thumbnail the video automatically should be loaded fullscreen on switching to landscape mode in ipad. Currently the user has to click the fullscreen button to play the video in fullscreen mode. I want the same effect that is seen when we play the video using the default youtube app that comes with ipad.

This is the code that I am using to play you tube video on ipad.

embedHTML = @"<object width="640" height="390">
<param name="movie"value="http://www.youtube.com/v/IYX_Ql-3U10&fs=1">
<param name="allowFullScreen" value="true"></param>
<param name="allowScriptAccess" value="always"></param>
<embed id="yt" src="http://www.youtube.com/v/youtube_video_id&fs=1" 
type="application/x-shockwave-flash" position="fixed" 
allowfullscreen="true" allowScriptAccess="always"
 width="640" height="390"></embed></object>";

And if this is not possible does anybody know if there is a reason or documentation supporting this decision.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can't, it's not allowed :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...