admin管理员组文章数量:1302887
I'm handling the touchstart and touchend events to determine when an element is clicked. It works very well and is responsive, but I'm missing the default click sound that happens in native apps when you press a button.
Is there a way to trigger this sound with PhoneGap rather then using html5 audio?
I'm handling the touchstart and touchend events to determine when an element is clicked. It works very well and is responsive, but I'm missing the default click sound that happens in native apps when you press a button.
Is there a way to trigger this sound with PhoneGap rather then using html5 audio?
Share Improve this question edited Jul 17, 2013 at 18:19 Hzyf asked Jul 17, 2013 at 17:49 HzyfHzyf 1,0172 gold badges13 silver badges21 bronze badges3 Answers
Reset to default 6Well, I have developed new Cordova plugin a few days ago which provide that you need.
Take look at https://github./VVelda/device-feedback
You can then call native sound response on button click. No any audio media, or any other workaround. I hope it will help you, altough you already set the answer that help you. :-)
Take a look at the Media class.
http://docs.phonegap./en/2.9.0/cordova_media_media.md.html#Media
Have a look at this blog post: http://pieterderycke.wordpress./2014/01/20/native-tick-sound-on-button-click-with-phonegap/
It explains how to develop a PhoneGap plugin that plays the native click sound when pressing a button in HTML5.
本文标签: javascriptNative tick sound on button clicks with PhoneGapStack Overflow
版权声明:本文标题:javascript - Native tick sound on button clicks with PhoneGap - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741703036a2393404.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论