Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Peter_F_6
Beginner
156 Views

Youtube Video Link Opens in App Webview - can't get back to app

Hi there,

I believe this is an IOS issue, but I'm looking for a fix using XDK since my app is built with it.  My app displays a YouTube video using the Youtube iFrame API. If a link is clicked in the video ie YouTube Logo, or Share URL then the Youtube page is loaded into the current webview and I cannot return to my app. I need to overide the behaviour such that the link launches in an external browser, that way I believe IOS adds a 'Return to {app}' link at the top of the new browser window so the user can get back to my app.

I found a related link which seems to have a solution using hooks:

http://stackoverflow.com/questions/36646014/ionic-external-link-in-iframe-opens-in-webview-embed-you...

Is this the right way to go, or do you know of a better solution?

Thanks in advance!

Tags (2)
0 Kudos
1 Reply
Elroy_A_Intel
Employee
156 Views

I recommend consider using the Cordova Inappbrowser plugin (https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/). You will be able to open a window to YouTube and navigate within it as well as close it at any time. 

Reply