Audio in html5 not working in FF4/Safari - firefox

I got this audio link in my html5 document:
<audio
src="http://sverigesradio.se/topsy/ljudfil/3017771.m4a"
type="audio/mp4"
controls="true"
preload="metadata"
title="Senaste sändningen från Radiosporten">
Senaste sändningen från Radiosporten</audio>
It renders properly in chrome, but in FF4 it first flashes the controls normally and then I get a big "X". In safari, it seems to hang while reading metadata.
Is there a problem with my audio-tag or with the audio-file? Is the redirect a problem?

Firefox doesn't support MP4 audio, it supports OGG audio only.

See this page for Audio support:
http://html5doctor.com/native-audio-in-the-browser/
UPDATE: concerning m4a format (which is AAC as far as I know), Safari and Chrome should support it, maybe even IE9, but no others.
You might find some useful info here (talks about video, but video also needs audio codecs): http://diveintohtml5.ep.io/video.html
UPDATE 2: And a more up-to-date table posted by Tom Gullen.

Firefox doesn't support mp4, but you can use PCM audio standard like .WAV that supports firefox, safari & chrome.

Related

How can this MP4 be played in Firefox? From what I know Firefox doesn't support MP4

I found this mp4 from the site Giphy. To my surprise it plays in Firefox. Does anyone know how that can be? Normally I have to generate two versions of every video file, mp4 and webm. It would be nice to not have to do that.
Here's the file:
http://media2.giphy.com/media/yoJC2NG0MLnSoEPjIA/giphy.mp4
Firefox will use an mp4 library is a suitable one is on the system that Firefox is running on:
Firefox/Firefox for Android/Firefox OS supports the format in some cases, but only when a third-party decoder is available, and the device hardware can handle the profile used to encode the MP4.
source
If you can use HTML5 I'd suggest the video tag like the following. I figured you'd want controls so I added the controls attribute to the video tag; you could also add autoplay if you want that. I tested it on IE11 and the current versions of Firefox and Chrome. works for all of those. Having alternate versions isn't a bad idea, but mp4 is pretty universal on modern browsers.
<video controls>
<source src="http://media2.giphy.com/media/yoJC2NG0MLnSoEPjIA/giphy.mp4" type="video/mp4">
<source src="http://media2.giphy.com/media/yoJC2NG0MLnSoEPjIA/giphy.webm" type="video/ogg">
Your browser does not support the video tag.
</video>
As to why:
MP4 H.264 (AAC or MP3) The MP4 container format with the H.264 video
codec and the AAC audio codec is natively supported by desktop/mobile
Internet Explorer, Safari and Chrome, but Chromium and Opera do not
support the format. IE and Chrome also support the MP3 audio codec in
the MP4 container, but Safari does not. Firefox/Firefox for
Android/Firefox OS supports the format in some cases, but only when a
third-party decoder is available, and the device hardware can handle
the profile used to encode the MP4.
Note: MP4s encoded with a high profile will not run on lower end
hardware, such as low end Firefox OS phones. The MPEG media formats
are covered by patents, which are not freely licensed. All the
necessary licenses can be bought from MPEG LA. Since H.264 is
currently not a royalty free format, it is unfit for the open web
platform, according to Mozilla [1, 2], Google [1, 2] and Opera.
However, since royalty free formats are not supported by Internet
Explorer and Safari, Mozilla has decided to support the format anyway,
and Google never fulfilled their promise to remove support for it in
Chrome.
Reference: https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats

Can't play video on FireFox and IE

I tried searching for a solution to this and within three days of browsing the forum I could't find any help.
This is the link where I have my video:
http://www.aguacatesjbr.com/English/Company/company.html
I believe the code is correct because I replaced my source video with the Oceans-Clip video provided by the site. The Oceas-Clip video CAN PLAY on FireFox and IE but not my original video. However, if I type in directly the address of my video it DOES render on FF and IE.
I don´t think it is size problem because I was testing it with a video that weights 4.20MB.
I am having this problem with IE and FireFox in both PC and MAC. Android and Apple devices work perfectly as well with Chrome and Safari.
First of all, you need to serve the videos with the correct mime type, which is video/mp4 for H.264 in mp4, and video/webm for WEBM. See MSDN, MDN.
Right now you serve the .mp4video as video/mpeg.
Then, I your page has a source for video/webm pointing to http://www.aguacatesjbr.com/Videos/JBR_video.webm, which does not exist at the time of writing. Fix that.
Firefox can play back H.264/mp4 on certain platforms only. For a list of currently supported platforms and video support in Firefox in general see "Supported media formats".
Lastly, there will be warning messages regarding video load failures in newer Firefox versions. E.g.:
[20:35:11.515] HTTP "Content-Type" of "video/mpeg" is not supported. Load of media resource http://www.aguacatesjbr.com/Videos/JBR_video.mp4 failed. # http://www.aguacatesjbr.com/English/Company/company.html
[20:35:11.515] All candidate resources failed to load. Media load paused. # http://www.aguacatesjbr.com/English/Company/company.html

safari mac wont stream HTML5 video

I am having a very frustrating issue with HTMl5 video and safari/mac.
I am using html5 video throughout the site where needed and it works/plays on every browsers bar safari on a mac (its fine on safari windows and chrome mac for example)
The videos dont stream and only play once the entire file is downloaded. At first I thought it may be to do with the index of the file being at the end and not the beginning (link html5 video = safari wants to download it all) so i tried qtindexswapper but when loading the MP4 into the program it said the MOOV/Index was in the correct position.
Anyone have any idea why safari mac has this issue?
A.
I've seen HTML5 be very picky with videos. They may play fine in a player, but not play or maybe play with no audio once embedded. This is usually due to a video not properly created/formatted. In most cases, re-creating the file in a professional level program alleviates the issue.

video will play in firefox but not when in html5 video tag?

so we're building a video site with a html5 player (and backup flash for windows).
But what's really stumping me is when i view this file in firefox it plays;
http://www.roguefilms.com.local/media/uploads/2010/07/1495/8_lg-poke.mov (stored locally) but when its in the html video tag is does nothing. It shows the poster but doesn't play the video. It doesn't even show the 'Sorry - your browser is not supported!'
I know ff prefers ogg and we can use the flash backup player but if it can play it as a ht64 .mov without the player why can't it with? Seems a bit daft?
If anyone knows anything it would be great...
<video controls="controls"
id="myVideo"
src="/media/uploads/2010/07/1495/8_lg-poke.mov"
poster="/media/uploads/2010/07/1495/still.jpg"
height="360"
width="640">
Sorry - your browser is not supported!
</video>
best, Dan.
When you just load the .mov file, the content-type your server provides causes Firefox to check and see and see if any plugins handle the content. In this case, QuickTime handles it, which is why it plays.
The video tag doesn't launch plugins to play content, however.
Firefox doesn't support h264, as you mentioned, although am surprised it plays the video in its own, unless its forcing it into a Flash player automatically, which is possible.
To get the "sorry" message to display you'll need to use the source element:
<video controls="controls" id="myVideo" poster="/media/uploads/2010/07/1495/still.jpg" height="360" width="640">
<source src="/media/uploads/2010/07/1495/8_lg-poke.mov">
Sorry - your browser is not supported!
</video>
I wrote this back in April of last year, but it might help: html5laboratory - using the video element.
We once had a similar issue with the web server (Apache, in our case) not sending the proper MIME-type for the video file and Firefox first downloaded it completely before starting to play it. Is it possible that the player would work if you just waited long enough? You could use Firebug to see if your browser transfers anything.

Play ogg inside a page?

I was pretty surprised when i saw http://www.vorbis.com/music/Hydrate-Kenny_Beltrey.ogg link not give me a download option but had a player that was not flash playing the audio back. (FireFox)
Is there a way i can embed this onto a page?
Use the HTML5 Audio tag.
P.S. Although you tagged as firefox, Chrome, Safari and Opera 10.5 also have support for audio
You can use HTML5 to embed this on a page, but it will not play back consistently across browsers.
The only way to get consistent audio/video playback across browsers is to use a plugin and Flash has the widest user penetration.
You're looking for the HTML5 <audio> tag.
Note that it's not supported by IE.

Resources