Estoy usando JQuery Mobile versión 1.1.1
I have a list of links when link to youTube videos.
<ul> <li><a href="link to youtube video">See Video</a></li> </ul>
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?
preguntado el 24 de agosto de 12 a las 10:08
I'd suggest using the IFRAME embed method from YouTube:
It can be as easy as setting up an
<iframe> Me gusta esto:
<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>
But you can utilize the YouTube API as well, see these docs for more info: https://developers.google.com/youtube/iframe_api_reference
Src: The above link
@Jasper is correct that using the iframe embed is the best way to play a video from a mobile site. What was not discussed is what else is involved. Here's a great demo of the new popup functionality in jquery mobile 1.2.0 (as of Oct. 2012):