HTML5 video doesn't work in the emulator - android

I have opened many sites that use HTML5 video in the emulator ( android 2.3.3 and android 5 ) but it doesn't work: I can hear the audio but the video doesn't appear. On my smartphone ( samsung s5 with android 5 ) it works.
So why html5 video tag doesn't work well in the emulator ?

I would recommend checking if the encoding format is compatible with the emulator version and the android requirements. That can be done here:
http://developer.android.com/guide/appendix/media-formats.html
Also remember to check beneath the initial grid for the encoding requirements.
To read more about HTML5 videos in android:
http://www.broken-links.com/2010/07/08/making-html5-video-work-on-android-phones/
Hope this helps you understand the problem better. Try and look around on his site for more of his blogs posts on the different subjects. He seems pretty competent.

Related

android chrome embed video shows in full screen only

I made a static website tool that runs in all major browsers and iPad and Android(chrome). I show .mp4 video source with a simple embed tag. This was working just dandy until sometime this weekend. Come monday testing the video in android chrome, it plays audio only when not full screen, and plays correctly when full screen. I tested with the html5 video tag I use in other tools and actually same bug. I converted the video to other formats and codec, same bug. I tested tools that were completed months ago and working perfectly when sold, same bug. Seems likely that it started when chrome updated sometime after the 10/11 over the weekend. But as this project is on the home stretch and I had just debugged the last bugs I am putting it out there hoping for some feedback. I can't be the only one as it is happening with the video tag as well as the embed tag. It has to be chrome that changed my code didn't. Any insights out there?

chrome plays mp3 in base64 format in android 4.0 up without sound

The following snippet plays well in chrome pc version.
var base64Data=results.rows.item(0).vocData; //mp3 in base64 format fetched from webSQL
audioPlayer.src ='data:audio/mp3;base64,'+base64Data;
audioPlayer.load();
audioPlayer.play();
However, when I played it in chrome for Android, it did play without error (audioPlayer.error=null),but without any sound.
Does anyone know what's wrong with the codes, or is there any limitation under Android 4.0.4?
is there any workaound? thanks.
This is most certainly a bug. Any time that you have it working on desktop and it fails to work on Chrome for Android that it is 99.5% likely to be a bug.
I have raised the bug here: https://code.google.com/p/chromium/issues/detail?id=253466 with a demo of the error here: http://jsbin.com/ajocid/latest
Right now there are no workarounds because you can't even load it into a blob and attach it. The only potential solution is to save it up to a server somewhere and then use that URI.... which is less than optimal.

Video tag in Html5, android

Is it possible to play a remote video which is in server using html5 in android.
I have tried playing the local video and it works fine.
Android tag support is very flanky in currently deployed phones. You can search about various problems of it here at stackoverflow.com.
I'd suggest using link to a video file on the remote server which is then opened in a standalone media player. This guarantees that the video will work on all the devices.
works fine in 2.3+ (tested personally on 2.3, 3.0, 3.1 and 3.2)
try absolute paths instead of relative paths, the type attribute should only read "video/mp4" or "video/webm" - nothing more!
check http://caniuse.com/webm and http://caniuse.com/mpeg4 for supported codecs. Ogg-Video is not supported so far.

Video playback capabilities in iOS and Android

I'm in the stage of planning a new application for both iOS and Android platforms (tablet and phone), which will heavily feature streaming video playback.
However, the documentation is not entirely clear about capabilities of these platforms when it comes to video playback. So my questions are:
1.) Can Android and iOS playback HTML5 video from a webpage/webview?
2.) Can HTML5 videos be shown as part of a webpage (non-fullscreen) with an overlay?
3.) Can Android and iOS play videos natively in non-fullscreen mode?
4.) Can I do text/graphcs overlay over a played video if it's a part of native app?
The answers on these questions (if possible, with supported OS versions) would be much appreciated, I can't seem to find conclusive resouces as part of the platform documentation.
Ok let me try to answer as clear as possible since I just had experience with apps for streaming in ios and android.
1.) Can Android and iOS playback HTML5 video from a webpage/webview?
Yes The both can with the <Video> tag
2.) Can HTML5 videos be shown as part of a webpage (non-fullscreen) with an overlay?
This depends more on the device than on the OS. iPad can do it without full-screen but iPhone does apply full-screen, Android Tablets Can some Andorid phones Can't.
Specifically on iOS and iPhones the best way to go would be to create a MPMoviePlayerController (not to be confused with MPMoviewPlayerViewController) and you can set the layout in your viewController and restrict the size of the video so you can see the layout. (This allso works of course in iPad so that could be your best approach for both)
3.) Can Android and iOS play videos natively in non-fullscreen mode?
Yes they can, as explained above would be better if instead of using a WebView you use VideoPlayer's in View Controllers
4.) Can I do text/graphcs overlay over a played video if it's a part of native app?
You can using the above approach since your video will be on your viewcontroller where you manage the size and position of the player in your view, when doing it on a webviewthe device automatically loads the player so you are unable to manage it.
You should play safe and go for min OS requirements iOS 4.0 and Android OS 2.1 because of the improvements both versions made on native video playback
I don't think there can be a definitive answer without testing and even then the answers are likely to change (rapidly, I hope). I looked at the reference video here: http://broken-links.com/tests/video/ which is encoded in three different forms, ensuring it can play correctly in Firefox, which supports ogg, Chrome, which supports webm, and whatever supports m4v.
<video id="video" autobuffer height="240" poster="../images/bbb_poster-360x240.jpg" width="360">
<source src="../media/BigBuck.m4v">
<source src="../media/BigBuck.webm" type="video/webm">
<source src="../media/BigBuck.theora.ogv" type="video/ogg">
</video>
I tested this on an iPad 2 with the latest updates, a Samsung Galaxy Tab with Android 3.1, and a Nexus One with Android 2.3 as well as Firefox 5 and Chrome 12 on OS X 10.6.8. Both Firefox and Chrome played perfectly.
Ipad 2: Played correctly in the browser (non-fullscreen). The only anomaly: time was shown as "1' of NaN'"
Android 3.1: Played correctly in the browser (non-fullscreen.)
Android 2.3: Went to full-screen when I pressed "play." After playing, went back to in-browser, but showed time as "1' of 6000'" Also, it hung for a while before playing, perhaps because of the connection speed, but it didn't feel completely stable.
I hope this is helpful.

Best HTML 5 video solution for mobile devices?

I'm developing a mobile video platform and I have playing in mobile safari and some Android browsers. The problem I'm having is that my solutions thus far (have tried regular HTML 5 video as well as VideoJS) have only worked on about 50% of the Android browsers I've tested.
I have added the three web formats to my video tag (ogv, webm and mp4) as well as provided a fallback flash object but it seems that a lot of the Android mobile browsers still refuse to play any video.
Has anyone had a similar experience that could propose a solution?
Thanks,
gearoid.
Strange resolution with this one. I need to add the video sources in the appropriate order to get multi-device compatability. The sources need to be added to the video tag in the following order:
MP4
WebM
OGV

Categories

Resources