如何禁用PhoneGap Android中的YouTube背景播放 [英] How to disable youtube background playing in phonegap android
问题描述
我的应用程序被playstore拒绝修改您的应用程序以确保它不启用YouTube视频的后台播放",我使用的是Android版phonegap,即使我的应用程序位于后台模式.
My app gets rejected by playstore "modify your app to make sure it doesn't enable background play of YouTube videos", I am using phonegap for android and it seems that the youtube videos are still playing even if my app is in background mode.
我尝试设置:
<preference name="KeepRunning" value="false"/>
但是仍然无法正常工作,我什至尝试为该问题添加暂停"侦听器,即使触发了"deviceready"侦听器也永远不会触发该侦听器.
But still never worked, I even tried to add "pause" listeners for that issue, the listener is never triggered even though the "deviceready" listener is triggered.
请在这里我需要一些帮助.
Please I need some help here.
推荐答案
将插件更新为最新版本(1.5.0),并将shouldPauseOnSuspend
选项设置为yes
Update the plugin to latest version (1.5.0) and use shouldPauseOnSuspend
option set to yes
cordova.InAppBrowser.open('http://youtube.com', '_blank', 'shouldPauseOnSuspend=yes');
这篇关于如何禁用PhoneGap Android中的YouTube背景播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!