页面内的JQuery Mobile Open Video链接 [英] JQuery Mobile Open Video link inside page
问题描述
我正在使用JQuery Mobile版本1.1.1
I am using JQuery Mobile version 1.1.1
链接到youTube视频时,我有一个链接列表。
I have a list of links when link to youTube videos.
<ul>
<li><a href="link to youtube video">See Video</a></li>
</ul>
我的问题是当它打开视频页面时我无法返回页面,因为没有返回按钮,它不再在JQM页面内。
My problem is that when it opens the video page I cannot get back to the page as there's no Back button and it's no longer inside a JQM page.
如何打开它以便它有一个后退按钮返回页面有一个关闭方式所以我可以在不重新启动的情况下返回应用程序吗?
How can I open it so that it either has a back button to return to the page of has a way of closing so I can return to the app without restarting it?
推荐答案
我建议使用YouTube上的IFRAME嵌入方法:
I'd suggest using the IFRAME embed method from YouTube:
这可以像设置< iframe>
一样简单:
It can be as easy as setting up an <iframe>
like this:
<iframe id="player" type="text/html" width="640" height="390"
src="http://www.youtube.com/embed/u1zgFlCw8Aw?enablejsapi=1&origin=http://example.com"
frameborder="0"></iframe>
但您也可以使用YouTube API,有关详细信息,请参阅这些文档: https://developers.google.com/youtube/iframe_api_reference
But you can utilize the YouTube API as well, see these docs for more info: https://developers.google.com/youtube/iframe_api_reference
IFrame播放器API允许您在
网站上嵌入YouTube视频播放器,并使用JavaScript控制播放器。与Flash和
JavaScript播放器API不同,它们都涉及在
网页上嵌入Flash对象,IFrame API会将内容发布到
页面上的标记。这种方法提供了比之前的
可用API更大的灵活性,因为它允许YouTube为不支持Flash的移动设备提供比用于移动设备的Flash播放器更低价b $ b的HTML5播放器。
Src:以上链接
这篇关于页面内的JQuery Mobile Open Video链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!