科尔多瓦框架工作7 youtube iframe在phonegap构建后未加载到ios中

时间:2018-07-16 10:00:46

标签: cordova iframe youtube-api cordova-plugins html-framework-7

我一直在努力在ios中显示iframe。现在差不多7天了,我一直在尝试在ios中加载youtube iframe。我已经安装了cordova白名单插件,并将*分配给access,allow-intent和allow-navigation。我已将元内容政策设置为

<meta http-equiv="Content-Security-Policy" content="script-src * 'unsafe-eval'; child-src *; connect-src * 'unsafe-eval'; object-src 'self'; style-src * 'unsafe-inline';">

我的iframe代码是

 <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/_upOB_WF2y8?rel=0" style="width: 100%; " allowfullscreen ></iframe>

和xdk构建包后的config.xml

<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:android="http://schemas.android.com/apk/res/android" android-versionCode="1" ios-CFBundleVersion="undefined" version="0.0.1" id="not.yet.specified"  >
<!-- This file was generated by the Intel XDK Cordova Package Build tool. -->
<name>Trinfinity Academy</name>
<description>Trinfinity Academy</description>
<author>trinfinityacademy.com</author>
<content src="index.html"/>
<preference name="android-build-tool" value="gradle" />
<platform name="android" >
    <allow-intent href="*"/>
    <allow-navigation href="*"/>
    <access origin="*"/>
</platform>
<platform name="ios" >
    <allow-intent href="*"/>
    <allow-navigation href="*"/>
    <access origin="*"/>
</platform>
<preference name="phonegap-version" value="cli-6.2.0" />
<preference name="xwalkMultipleApk" value="false" />
<plugin name="cordova-plugin-crosswalk-webview" spec="1.8.0"/>
<plugin name="cordova-plugin-background-app" spec="https://github.com/MobileChromeApps/cordova-plugin-background-app"/> <!-- If available via Cordova registry; consider changing to an NPM reference. -->
<plugin name="cordova-plugin-splashscreen" spec="3.2.2"/>
<plugin name="cordova-plugin-whitelist" spec="1.2.2"/>
<plugin name="cordova-plugin-in-app-youtube" spec="https://github.com/davidefavia/cordova-plugin-in-app-youtube"/> <!-- If available via Cordova registry; consider changing to an NPM reference. -->
<platform name="android" >
    <preference name="android-minSdkVersion" value="16"/>
    <preference name="android-targetSdkVersion" value="23"/>
    <preference name="android-installLocation" value="auto"/>
    <preference name="android-signed" value="true"/>
    <preference name="AndroidLaunchMode" value="singleTop"/>
</platform>
<platform name="ios" >
    <preference name="deployment-target" value="8.0"/>
    <preference name="ios-configuration" value="adhoc"/>
    <preference name="exit-on-suspend" value="false"/>
</platform>
<config-file platform="android" parent="/manifest/application" mode="merge"> 
    <activity android:launchMode="singleTop" />
</config-file>
</widget>

但iframe仍未在iphone 8 plus的ios 11中加载

0 个答案:

没有答案