本文介绍了jQTouch:如何嵌入YouTube视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将YouTube视频嵌入到jQTouch移动应用的页面中。

I am trying to embed a YouTube video into a page of a jQTouch mobile app.

我尝试使用YouTube上的嵌入代码,它可以在我的桌面浏览器(Chrome)上使用,但不能在我的iPod Touch浏览器(Safari)上使用。

I tried using the "embed" code from YouTube and it worked on my desktop browser (Chrome), but not on my iPod Touch browser (Safari).

然后我尝试使用HTML5视频标签,但仍然一无所获。

I then tried using the HTML5 video tag, and still got nothing.

我如何将YouTube视频嵌入到jQTouch应用程序中?

How exactly can I embed a YouTube video into a jQTouch app?

我看过来自非jQTouch页面的嵌入式YouTube视频(例如www.squidoo.com/sqlitehammer)在iPod Touch上播放得很好。

I have seen embedded YouTube videos from non-jQTouch pages (e.g. www.squidoo.com/sqlitehammer) which played fine on the iPod Touch.

推荐答案

我有以下代码块作为jqtouch应用程序(从网上运行)的一部分,它启动了YouTube应用程序预计在移动设备上测试时:

I have the following code block as part of a jqtouch app (running from the web), which launches the YouTube app as expected when tested on a mobile device:

    <div id="m_intro1" class="current">
        <div class="toolbar">
            <h1>Page Heading</h1>
            <a class="back" href="#">Home</a>
        </div>
        <div style="text-align: center;">
            <object width="320" height="320">
                <param name="movie" value="http://www.youtube.com/v/{your_movie_id_goes_here}?fs=1&amp;hl=en_US" />
                <param name="allowFullScreen" value="true" />
                <param name="allowscriptaccess" value="always" />
                <embed src="http://www.youtube.com/v/{your_movie_id_goes_here}?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="320" />
            </object>
        </div>
    </div>

这篇关于jQTouch:如何嵌入YouTube视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 15:33