Camera and video control with HTML5 form android webview - html

I use this guide : Camera and video control with HTML5
This example work excellent on Google Chrome but i can not make it work on Android webview. I also use permission : android.permission.CAMERA.

Did you remember to add this to your onCreate
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setAllowFileAccessFromFileURLs(true);
webSettings.setAllowUniversalAccessFromFileURLs(true);
You are probably missing the last two lines in your code.
Here is a working example

Webview/ Android browser till recently support ways to access camera via webview. Thankfully now getUserMedia is supported
http://caniuse.com/#search=Accept
http://caniuse.com/#feat=stream

Related

Does the YouTube Upload Widget uses Flash or HTML5

Reading its documentation one might think that it uses HTML5 especially if focusing on this text:
The widget uses HTML5's postMessage support to send messages back to
your website regarding videos uploaded via the widget.
In addition, when I read the "Note" where it says it loads the same JavaScript file as the IFrame Player API, I thought it really does use HTML5 as the IFrame player API do.
However, when I try the widget on a mobile device I was presented with a "You need to upgrade your Adobe Flash Player..." error. Unfortunately, both iPhone and Android devices do not support it.
So the question is, does the widget use a Adobe Flash or HTML5. If the latter, can it be controlled via settings that was not defined in the doc?
As mentioned in your question, the Youtube Upload Widget uses
HTML5's postMessage support to send messages back to your website regarding videos uploaded via the widget.
So yes it's using HTML5 for this task, but for the video capturing part, the widget uses flash and that's why in mobile or even in desktop browser with flash player disabled, you will get the message that invite you to install flash player.
For the widget parameters, there is nothing, in my knowledge at least, to force it to load a HTML5 version which, I think, didn't exist yet now.
Hope that can help.

swfobject not working on iOS

I'm trying to embed Twitch player using Javascript API - here is documentation how to embed a player using swfobject - https://github.com/justintv/Twitch-API/blob/master/player.md. My Problem is that the code works great on desktop, but on mobile browsers - iOS (I haven't had a chance to check Android yet) script simply doesn't embed a video. It works when I use iframe method though. Is there any fix for iOS to make this works using JS API and swfobject?
swfobject is the flash player (swf = ShockWave Flash). Flash does not, and never will, work on iOS. The iframe method runs coder that detects the OS, and loads the native iOS player on iOS, and flash for everything else. You need to duplicate that functionality.

flash content on html 5 native app on android and ios

How can we run swf file inside native app of android and Ios. I want to run swf inside html5 app. Presently I am using PhoneGap or Cardova for this app.
Is there any option for html5 than please suggest.
No, you can't. Especially not on iOS that does not have any flash support at all.
Have you tried Google Swiffy? It allows to convert SWF into HTML5.
If you want to use SWF for playing animation on HTML5, you also can use LWF (an animation sample on HTML5), it works well on Android and iOS.
you can use Puffin browser for IOS and Android,
works very well for all flash swf, AS1/AS2/AS3 included

Using phonegap and html5 video tag: caveats?

I am planning to build a JavaScript/HTML5 app, and wrap it with phonegap to be installed on an android tablet.
In it, I want to show a video file.
Is it just a matter of creating an index.html file, and putting a mymov.ogv file in the same directory, and then using:
<video src="mymov.ogv"...>
and it will work on Android?
I have read about some problems with this, but my quest got me confused.
What are the caveats, if any?
PS: the video should be packaged within phonegap, such that the video is shown when the app is not connected to wifi. So it's a local file.
PPS: Since it's for internal use, I am able to choose a particular modern android version (if that makes any difference). There is no need to support old android versions whatsoever.
According to this resource: http://caniuse.com/ogv There is not support for ogv format in Android. Remember that Phonegap applications are just display in a rapped browser window-- So if the browser doesn't support it, you can't use it. Whether the video is on-board the device or streamed, doesn't matter.
You can certainly embed with the tag, but you might want to use the associated Javascript API to provide some control over the video.

is it possible to play m3u8 video in google chrome?

Is there any way via extension / hack / or otherwise to play an m3u8 video from google chrome? I'm having some trouble getting the official word on m3u8 support, though I'm pretty sure its unsupported.
I'm working on a video player with live playback (using flash for standard browser apps) so I'm using m3u8's to get everything working on mobile, but the debugging tools on mobile leave a lot to be desired. I was wondering if there was any workaround to getting these videos to work so I could use the browser debuggers. (I'm on windows 7).
There's a new appendBytes/sourceBuffer proposal in the spec, and I saw a chrome evangelist mention that there was a beta implementation in chrome canary. With that you would have to write a ton of javascript to read the m3u8 file, get the video segments, parse the data, and push them into the media element manually. I'm guessing that's more than you want to do for testing.
What you probably want is something like Weinre.