HTML5 Video not working in Android - html5-video

I am building a little application to display a video for users and I am having a lot of issues with mobile devices. It seems to work perfectly on desktop, and hit and miss on mobile. It works on one iPhone, but not another and it definitely does not work on my android even when i navigate directly to the files.
Here is my code.
<video id="video1" width="600" controls="">
<source src="~/Content/Video/mov_bbb.mp4" type="video/mp4">
<source src="/Content/Video/mov_bbb.ogg" type="video/ogg">
Your browser does not support HTML5 video.
</video>
its ripped right from the example from w3schools http://www.w3schools.com/html/html5_video.asp files and everything. When I visit that site on the mobile device, it works, when hosted on my site it doesn't.
here is a screen shot of the android device, the player shows up but nothing i can do will play the video
I am running windows server 2012, and the android device is Android 4.4.4; SM-N900V Build/KTU84P, Chrome 41.0.2272.96.
because these files and code are ripped directly from another source that seems to work the only thing I can think of is that something on the server is not set up correctly.
thanks!

The tag is only supported by modern browsers. The problem you are facing is with browsers running on the client mobile or desktop and not your servers.
See browser support to understand which versions are supported: http://en.m.wikipedia.org/wiki/HTML5_video

Related

Bigcommerce main banner Video not working on IOS devices only

Here is the link to the bigcommerce store I'm working on. It shows background video on all the devices except IOS devices on any browser.
https://axict.mybigcommerce.com/
Looking for help in this weird issue.
Thanks in advance.
Here is the video element code,
<video id="bannerVideo" class="bgVideovideo" autoplay loop muted playsinline>
<source src="https://store-1anxrygvum.mybigcommerce.com/content/banner-video.webm"
type='video/webm;codecs="vp8, vorbis"' />
<source src="https://store-1anxrygvum.mybigcommerce.com/content/banner-video.mp4"
type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"' />
Your browser does not support the video tag.
</video>
From a quick check this actually does not work on Safari on MacOS either and it does on Chrome on the same Mac.
Looking at the network traffic you can see the server responds with a '200' to the byte range request from the browser for the video, which Safari does not handle well, although Chrome does:
The most common root cause of this issue appears to be servers that are not configured to handle range requests in what Safari consider the correct manner. It expects to see a '206' response when it sends a request with a byte range.
There is more discussion and examples in the answer here: https://stackoverflow.com/a/32998689/334402
Looks like you've uploaded the video to WebDAV - just like Mick's answer, the file hosting server that BigCommerce WebDAV uses is not configured to send the correct request type that IOS/Safari is looking for when loading a <video> element's source.
When I ran into this, I had to upload the video to AWS S3 Storage. You should be able to get 5GB permanently on the free tier.

Safari HTML5 video no longer autoplays

Recently I have noticed that the video elements on my site no longer autoplay on iOS Safari or desktop Safari.
The current code looks something like this:
<video playsinline autoplay muted loop poster="/path/to/poster.jpg>">
<source src="/path/to/video.mp4" type="video/mp4">
</video>
From my understanding, this is enough to abide by Webkit's new video policies for iOS and MacOS to allow for a video to autoplay.
I have searched for similar questions and not come across a solution. In this question it seems like the source tag itself could be the problem.
This thread suggests that iOS blocks videos from autoplaying on low power mode as well. But I've determined this isn't causing my issue.
Has anyone come across this issue themselves? Do you have a solution? Can someone point me in the direction of some Safari change logs where this breaking change was introduced?
Details
iOS 11.4
MacOS Safari Version 11.1 (13605.1.33.1.2)
EDIT
The video isn't being loaded correctly, when I check the Network panel in Safari dev tools the MP4 shows up under 'Other' with the error "An error occurred trying to load the resource".
If I try to play the video directly in Safari (eg: go to https://my-website.com/path/to/video.mp4) I get the error Failed to load resource: Plug-in handled load
I think it's because my video is a file blob, and Safari expects videos to be from streaming servers (as mentioned in this question)
EDIT 2
Might be something to do with how Safari is introducing the ability to use videos in img tags? See this and this

Cannot view video from publisher using Chrome to iPad with OpenTok

I'm currently trying to set up a connection between my web client and my iOS app, but for some reason my iOS client only sees a black box when using Chrome (version 33). I can see the video just fine if I use Firefox (both in my app and when I put the browsers side-by-side, they can see each other).
This doesn't appear to be a documented known issue with the JavaScript SDK, and I can't see any recent discussion about this on the forums (last post was mine).
The iOS sample can be located here (samples/OpenTokHelloWorld) with the browser page in samples/OpenTokHelloWorld/browser_demo.html
I suggest cd'ing into samples/OpenTokHelloWorld and running python -m SimpleHTTPServer, as it can't be run from a file:/// path.
Here is what my iPad sees:
Chrome:
Firefox:
And Chrome/Firefox (respectively), both publishing video from the same camera
Edit: after testing on other machines, it may be something specific to my environment even though none of my extensions run in Incognito and I don't have any custom plugins installed.
It looks like the OpenTok mobile SDKs with the specific webcam I was using has issues. On Android the video stream will display for a brief moment then segfault, and on iOS there will be no video at all.
I have tested this many times and could not reproduce what you are seeing in your chrome.
Without seeing any console errors or iOS logs the best suggestion is to try clearing your cache, or maybe restarting your computer (longshot)

Safari 5.1 can NOT play HTTP Live Streaming (m3u8 file)

This is my html file, it can play at Safari 5.0.5 (Mac OS X 10.6.8), but when I update the Safari to version 5.1, it can NOT play, can anyone tell me why, and how to solve it in Safari 5.1? Thanks.
<html>
<head>
<title>HTTP Live Streaming</title>
</head>
<body>
<video controls src="http://mysite/index.m3u8">
</video>
</body>
</html>
Updated: I found the solution! When I set in the System Preference > Network > Advanced > proxies > Automatic Proxy Configuration with the proxy I use, I found the HTTP Live Streaming can NOT play, when I remove proxy, it can play now! How does this happen? Why it play well in Safari 5.0.5?
In Safari 5.1, open the Activity window with the Window->Activity menu. That will show you all the URLs it attempts to download as well as whether it downloads successfully. Maybe this will give you a clue.
Also look at the system console by running the Console app that you will find in /Applications/Utilities.
Try it in FireFox, Chrome, and on Windows, Internet Explorer and Safari for Windows.
If all those other browsers play your video OK, and neither the Activity window nor the console yield any insight, file a bug report. The chances are pretty good that, if it is a bug, Apple will fix it in the next release, or if it is not a Safari bug, an Apple engineer will give you a clue as to what you did wrong.

Best desktop browser to test Sencha Touch application?

For testing without an iPhone/Android phone, which desktop browser works best with Sencha Touch? I tried Chrome and Safari, which work fairly well, but both seem to have little issues.
Firefox and IE apparently don't work at all with Sencha Touch. Is there a secret weapon, like a port of a mobile browser, available?
There's a Chrome extension called Ripple that's pretty good, but most things can be tested quite productively in Chrome. Set Ext.is.Phone = true; at the beginning of your script when you need to test the phone UI.
You should be using the iPhone/iPad hardware simulator on a mac, or the Android simulator if you're on Windows. Desktop browsers will get you there - particularly desktop safari -- although there are enough differences that you should really use one of the simulators
A direct link to one ipad simulator online is: http://ipadpeek.com/
On Windows, Google Chrome is my favorite browser. When I'm done developing a section of the app I do test it on my real device, an HTC desire (Android). As expected, the real device is WAY slower than desktop browser, specially notable on animations, e.g sliding tabs and carousels.
I would say Google chrome is the best browser till date.... and its an ideal browser for sencha touch applications to run, since it contains webkit..
Also you can use Titanium (you can download it here) which has iphone/iPad simulater built in but for that you need a Mac and you also have to download ios sdk.
Working on these simulators is an awesome experience.