cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Busch (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CB-11025) YouTube API failing on iOS
Date Thu, 23 Jun 2016 02:39:16 GMT

    [ https://issues.apache.org/jira/browse/CB-11025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15345601#comment-15345601
] 

Andrew Busch edited comment on CB-11025 at 6/23/16 2:38 AM:
------------------------------------------------------------

I found that the above options ({{<meta>}}, {{<access origin>}}, {{<preference>}})
weren't necessary for me for a basic iframe play. I took the code straight from [YouTube API's
sample|https://developers.google.com/youtube/iframe_api_reference#Getting_Started] to ensure
it wasn't my configuration.

All I needed to do was add:

{code}
<allow-navigation href="https://*youtube.com/*"/>
{code}

in my {{config.xml}}.

There's a helpful error message in the iOS app debug logs that reveals this:

{code}
2016-06-23 12:28:48.488 MyApp[11574:5424439] ERROR Internal navigation rejected - <allow-navigation>
not set for url='https://www.youtube.com/embed/M7lc1UVf-VE?enablejsapi=1&widgetid=1'
{code}

This is very adequately handled in my mind, so I'll close this issue.


was (Author: andrew):
I found that the above options ({{<meta>}}, {{<access origin>}}, {{<preference>}})
weren't necessary for me for a basic iframe play. I took the code straight from [YouTube API's
sample|https://developers.google.com/youtube/iframe_api_reference#Getting_Started] to ensure
it wasn't my configuration.

All I needed to do was add:

{code}
<allow-navigation href="https://*youtube.com/*"/>
{code}

in my {{config.xml}}.

There's a helpful error message in the iOS app debug logs that reveals this:

{code}
2016-06-23 12:28:48.488 Big Review TV[11574:5424439] ERROR Internal navigation rejected -
<allow-navigation> not set for url='https://www.youtube.com/embed/M7lc1UVf-VE?enablejsapi=1&widgetid=1'
{code}

This is very adequately handled in my mind, so I'll close this issue.

> YouTube API failing on iOS
> --------------------------
>
>                 Key: CB-11025
>                 URL: https://issues.apache.org/jira/browse/CB-11025
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 6.0.0
>            Reporter: Andrew Busch
>              Labels: triaged
>
> When I inject a YouTube {{<iframe>}} and absorb it with a YT.Player object, the
YouTube video does not load and I get the following message in the browser JavaScript console:
> {{Unable to post message to https://www.youtube.com. Recipient has origin file://.}}
> I've tried the exact same code with Cordova 5.4.1 and it works, but fails for both 6.0.0
and 6.1.1. Issue is restricted to iOS.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message