jQTouch: How to embed YouTube video?

谁说我不能喝 提交于 2019-12-25 00:08:17

问题


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

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

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

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

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


回答1:


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>  


来源:https://stackoverflow.com/questions/6231002/jqtouch-how-to-embed-youtube-video

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!