单击后退按钮时如何停止播放功能 [英] how to stop my play function when click back button
问题描述
嗨我在播放/暂停下使用href进行一项功能..
我的问题是当我按下播放它播放..即使我再次按下相同的按钮它暂停..
问题是当我点击后退按钮它没有暂停..它连续播放..我可能知道为什么...请用代码解释我.....
提前感谢
你可以添加监听器到后退按钮和编写处理后退按钮事件的代码ex:
document .addEventListener ( backbutton, function (e ){
这里写代码来处理后退按钮
}, false );
这是phonegap设备API所以添加cordova / phonegap JS并在设备下添加此代码准备
<小时EF = http://docs.phonegap.com/en/2.9.0/cordova_events_events.md.html#backbutton> http://docs.phonegap.com/en/2.9.0/cordova_events_events.md.html#后退按钮 [ ^ 一>
hi i doing a function under play/pause using href ..
my problm is when i press play it plays.. even if i again press the same button it pauses..
problm was when i click back button it not pausing.. it plays continuously .. may i know why... kindly explain me with code.....
thanks in advance
hi you can add listener to back button and write code to handle back button event ex:
document.addEventListener("backbutton", function(e){ write code here to handle back button }, false);
This is phonegap device API so add cordova/phonegap JS and add this code under device on ready
http://docs.phonegap.com/en/2.9.0/cordova_events_events.md.html#backbutton[^]
这篇关于单击后退按钮时如何停止播放功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!