8

YouTube の URL があります。

<iframe class="embed-responsive-item" ng-src="https://www.youtube.com/embed/s7gJ74ARN84" allowfullscreen=""></iframe>

これをローカルの html ファイルで使用すると、うまく再生されます。しかし、同じものをphonegap ios app htmlページに貼り付けてiosシミュレーターで実行すると、ビデオをクリックすると以下のエラーが表示されます:

Blocked a frame with origin "https://www.youtube.com" from accessing a frame with origin "file://".  

The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "file". Protocols must match.

解決:

それはシミュレーターではなく、モバイルで動作することであり、それが私の最終的な目標でした。

4

4 に答える 4