Issue playing embedded video in Android InAppBrowser

594 views
Skip to first unread message

Pilch Barnet

unread,
Jun 26, 2014, 3:51:26 PM6/26/14
to phon...@googlegroups.com
I created an Android app using PhoneGap. The App links to one of my sites using the InAppBrowser. The pages that it links to have embedded YouTube videos on them. The problem is that when I go to play the videos, the audio works but the video does not. Also, the audio continues to play after the app has been closed. I have searched the internet for an answer to this, but have not had any luck thus for.

Any help would be appreciated!

Mauro Lomartire

unread,
Jul 12, 2014, 6:35:33 AM7/12/14
to phon...@googlegroups.com
I have similar problem.
If i insert a link like this http://www.youtube.com/watch?v=kuUf4qgL2wI&feature=youtube_gdata_player i can hear only audio, but if i put the video in fullscreen, i can also see the video.

But if i have a link like this http://www.youtube.com/v/kuUf4qgL2wI?version=3&f=user_uploads&app=youtube_gdata it doesn't work. The same link (sended for example by email) it works on the phone: it opens the youtube app and play correctly the video directly in fullscreen mode.

maurelio79

unread,
Jul 16, 2014, 5:26:19 AM7/16/14
to phon...@googlegroups.com
Ok i solved installing inappbrowser plugin. If someone want know:

- cordova plugin add org.apache.cordova.inappbrowser (if you are using CLI)
- Add in config.xml 
<gap:platform name="android" />
        <gap:plugin name="org.apache.cordova.inappbrowser" />

(without version you will always use the last version of plugin)

- call the url you want in this way
<a href="#" onclick="window.open('http://your_url_to_open','_system');">MyUrl</a>

In this way the url will open with system default application. In my case with youtube application and the video start properly in full screen mode. In case of a url site, with default browser.

Regards
Reply all
Reply to author
Forward
0 new messages