以全屏自动播放YouTube视频 [英] Play youtube videos in fullscreen auto

查看:146
本文介绍了以全屏自动播放YouTube视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图在我的ipad应用中使用youtube嵌入式播放器播放YouTube视频。我希望只要用户点击视频缩略图,就会在ipad中切换到横向模式时自动加载视频。目前,用户必须单击全屏按钮才能以全屏模式播放视频。
我想要使用ipad附带的默认youtube应用程序播放视频时看到的效果相同。

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.

这是我正在使用的代码在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.

推荐答案

你不能,这是不允许的:)

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

这篇关于以全屏自动播放YouTube视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆