我有以下问题:
我有一个带有wordpress的“博客”文章。
如果我想在我的phonegap应用中打开它,它不会嵌入youtube。相反,它会在safari中打开一个新选项卡,并在全屏幕中打开youtube。
我已经尝试更改config.xml中的首选项,但它不起作用。有没有人有办法解决吗 ?
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.test.test2" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<preference name="AllowInlineMediaPlayback" value="false" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="BackupWebStorage" value="none" />
<preference name="DisallowOverscroll" value="true" />
<preference name="EnableViewportScale" value="false" />
<preference name="FadeSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value=".25" />
<preference name="KeyboardDisplayRequiresUserAction" value="true" />
<preference name="MediaPlaybackRequiresUserAction" value="false" />
<preference name="ShowSplashScreenSpinner" value="true" />
<preference name="SuppressesIncrementalRendering" value="false" />
<preference name="TopActivityIndicator" value="gray" />
<preference name="GapBetweenPages" value="0" />
<preference name="PageLength" value="0" />
<preference name="PaginationBreakingMode" value="page" />
<preference name="PaginationMode" value="unpaginated" />
<preference name="stay-in-webview" value="true"/>
<feature name="LocalStorage">
<param name="ios-package" value="CDVLocalStorage" />
</feature>
<name>Diessner App</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<access origin="*" />
<access origin="http://*.youtube.com" />
<feature name="Console">
<param name="ios-package" value="CDVLogger" />
</feature>
<feature name="NetworkStatus">
<param name="ios-package" value="CDVConnection" />
</feature>
<feature name="Geolocation">
<param name="ios-package" value="CDVLocation" />
</feature>
这是wordpress中的代码:
<iframe sandbox="allow-forms allow-same-origin allow-scripts" src="https://www.youtube.com/embed/yATi9gtGu00?list=PLEGN1LNTeit5Dsvn4wEH7zR1gCwOZTKEP?rel=0" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe>