hanchang / friar

Friar Framework helps you make beautiful Android 2.2+ apps out of HTML5 content. Inspired by the Baker Framework for iOS.
http://www.friarframework.com
75 stars 19 forks source link

Embedding youtube video on a page #15

Open nicolastilly opened 11 years ago

nicolastilly commented 11 years ago

Hi all,

I can not embed a video from YouTube in a page. I use the classic integration (with iframe) and video works correctly in a browser. But when I go through friar/android sdk the video does not appear as if it was offline, yet my Nexus 7 is connected to wi-fi.

What is the procedure to embed a video from youtube in a book with Friar?

Thank you very much! Nicolas

nicolastilly commented 11 years ago

Nobody can help me?

rossellap commented 11 years ago

I noticed the same problem. May it work when the app is released? I thought it was a problem of the simulator.

Selman555 commented 10 years ago

Has anyone come up with a solution? I'm experiencing the same problem. I'm debugging on a galaxy note 3 (4.4.2) and the only thing I can see is a message saying that the url is unavailable. Minimum sdk is 8 so I can't use hardwareAccelerated='true' in my manifest.

albertora commented 10 years ago

For see a video on html5 hardwareAccelerated is needed... You can try this:

Make sure that you have<uses-permission android:name="android.permission.INTERNET" /> in manifest.xml

Use the youtube old insertion code, example: <object width="480" height="330"><param name="movie" value="http://www.youtube.com/v/"here is your video id"?version=3&amp;hl=pt_BR&amp;rel=0"> </param><param name="allowFullScreen" value="true"></param> <param name="allowscriptaccess" value="always"></param> <embed src="http://www.youtube.com/v/"here is your video id"?version=3&amp;hl=pt_BR&amp;rel=0" type="application/x-shockwave-flash" width="480" height="330" allowscriptaccess="always" allowfullscreen="true" /></object>

And add this settings to the web view:

webview.getSettings().setPluginsEnabled(true);
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setAllowFileAccess(true);```