开发者

Going back in an iphone AJAX Webapp

I have a problem: I want to play a video from a full screen web app, not using html embed, but using an image banner which redirects to the video url (for example url: http://example.com/media/vid.mp4), because this can't be done using hrefs, i'm just calling a javascript event:

HTML:

<img src='http://example.com/media/banner01.jpg' id='play_video' />开发者_高级运维;

JavaScript:

<script>
$("#play_video").click(function(){
window.location = "http://example.com/media/vid.mp4";
});
</script>

But because it's just an AJAX page, once video finishes playing, the user is back to the 1st page, however, I have a unique url for each page (for social networking), but how can I inject it to the browser's history, or perhaps some other method of playing the video?


I've been through a similar thing recently, and have found jQuery.address to be a great solution. It handles changing the URL in an AJAXy way, lovely.

Of course, if your users are running in standalone full-screen mode, you'll need to implement some controls for navigating the site without the usual browser chrome.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜