The mimetype settings look like this:
mimetypes: ['audio/*'],
Firefox on windows 7 cannot upload mp3 files, other browsers work fine. They get the "not audio file" error.
Is this a bug with filepicker?
Most likely this is an issue with the way that firefox is reporting the mimetypes of mp3 files - I'd recommend trying filtering by extension instead. There are times when mimetypes are more appropriate and times where they break down due to differing implementations, which is why we provide both mechanisms.
Related
I need to play an mp3 file; something like
var sound = new Audio('http://.......');
snd.play();
does work in Chrome and Firefox on Windows but not in Firefox on Mac, can you confirm it is the normal behaviour?
From here:
https://bugzilla.mozilla.org/show_bug.cgi?id=799318
it seems that on Mac the feature has been just added (so probably the current release of Firefox doesn't provide it) but there are a lot of messages about and I'm a bit confused...
Is it normal that if I just put the mp3 URL in the URL bar it works?
So if you confirm that it is the normal behaviour can you tell me which are the alternatives?
1) flash fallback ?
2) convert mp3 to oog (supported by firefox) on the fly?
Can you explain how to implement both?
Thanks.
Yes that is the normal behavior. See here: https://bugzilla.mozilla.org/show_bug.cgi?id=851290
A Flash fallback would probably be easier. I'd recommend using SoundManager2 as it will provide you with a uniform API without having to worry about which codecs the browser supports.
Look into this. https://github.com/nddrylliog/jsmad#readme
It coverts it on the fly.
You can use a wrapper around the URLs you use to play audio, since different browsers support different codecs. The audio object has a canPlayType method which you can use (with understandably more verbose codec names unfortunately) to determine what type is supported by a browser. With this, you can make a function that takes a URL path and modifies the extension.
// If you wanted to provide only ogg and mp3:
function getSoundURL (url) {
var audio = document.createElement('audio');
if (!audio.canPlayType) return null;
if (audio.canPlayType('audio/ogg; codecs="vorbis"').replace(/no/, ''))
return url + '.ogg';
if (audio.canPlayType('audio/mpeg;').replace(/no/, ''))
return url + '.ogg';
return null;
}
More info on canPlayType and codecs.
There are also some tools to easily detect what types are supported, one being allen which I use frequently for audio projects. disclaimer: I made it :p
Flash alternatives would work (SoundManager2 mentioned above is good), and transcoding on the server is possible, with something like FFMPEG, depending on your server.
I'm working with an existing ActiveX control, we have a NPAPI for it, and it works well for the most part in FireFox.
It supports viewing image types, one type, TIFF works well but for some reason JPG doesn't.
So I simplified MIMEType in my .rc file to be simply "image/tiff". That works well, I can drag a *.tif file into FireFox and the plugin loads.
However when I my MIMEType is defined as simply "image/jpeg", it doesn't work for *.jpg files and FF just natively displays the JPG instead of letting my plugin do it. I tried "image/jpe" and that works for *.jpe files. I also tried "image/jpg", but no luck. Is JPG a special case for NPAPI?
Additionally, I can get my plugin to load for *.jp2 files when I specify "image/jp2". I don't seem to have any other plugin installed that would be loading the JPG instead. In fact, plugin-container.exe doesn't even load when FireFox displays the JPG so that makes me think it has something to do with FF's native display overriding my plugin.
For supported (built-in) image types, plugins are not considered (i don't think any browser does that).
TIFF is not a supported image type for Firefox, hence plugins are used if they handle that mimetype/extension.
Note: When handling image mimetypes you are prone to colliding with other plugins (Quicktime specifically) - there are no real guarantees on which plugin will be used if more than one supports a specific mimetype or extension.
It wouldn't surprise me at all if Firefox is overriding your plugin; the last thing they want is for a plugin to be able to take over viewing basic filetypes. I'm kinda surprised overriding tiff worked, to be honest.
I am trying to use the mediaelement.js library with Drupal. When I install the mediaelement drupal module and js library I am able to play MP3 files on all browsers except Firefox. It appears there is an issue with the Flash Fallback. But on the mediaelement.js page I see the MP3 player working in FF.
How can I diagnose this issue? What steps can I talk to find out if it is this version of the JS library, the Drupal module, or something I am doing.
I had the same issue, there are 2 things I suggest:
Add MIME-Type:
Add new mime type for your media types into your server config or directly in .htaccess
E.g. in my case I added
AddType video/mp4 .mp4
at the end of .htaccess to make it work in FF
Make sure that mediaplayer is initialized correctly and that all paths are set
up correctly. Check pluginPath and flashName properties.
Check http://mediaelementjs.com/#installation for more info.
I'm trying to use the new fancy html5 video player element and I was wondering:
I encoded a high resolution .mov container in VLC v1.1.9 to WebM format (although an FFMPEG command line would be extremely valuable if you have one handy) and it plays just fine in Chrome, but it won't open in Firefox. Would anyone have any ideas or in what direction I should be looking?
I had this problem and the fix was to change the apache server config to associate *.webm files with the video/webm mime type. This was done by creating a .htaccess file, or could be done in the apache mime types config.
I have the following code:
<video width="640" height="360" controls id="video-player" poster="/movies/poster.png">
<source src="/movies/640x360.m4v" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
<source src="/movies/640x360.ogv" type='video/ogg; codecs="theora, vorbis"'>
</video>
I'm using Rails (Mongrel in development and Mongrel+Apache in production).
Chrome (Mac and Win) can play either file (tested by one then the other source tags) whether locally or from my production servers.
Safari (Mac and Win) can play the mp4 file fine locally but not from production.
Firefox 3.6 won't play the video in either OS. I just get a grey cross in the middle of the video player area.
I've made sure that both Mongrel and Apache in each case have the right MIME types set.
From Chrome's results I know there is nothing inherently wrong with my video files or the way the files are being asked for or delivered.
For Firefox I looked at https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox where it refers to an 'error' event and an 'error' attribute. It seems the 'error' event is thrown pretty well straightaway and at that time there is no error attribute. Does anyone know how to diagnose the problem?
The HTTP Content-Type for .ogg should be application/ogg (video/ogg for .ogv) and for .mp4 it should be video/mp4. You can check using the Web Sniffer.
Add these lines in your .htaccess file and it will work for all browsers. Works for me.
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
If you dun have .htaccess file in your site then create new one :) its obvious i guess.
Incidentally, .ogv files are video, so "video/ogg", .ogg files are Vorbis audio, so "audio/ogg" and .oga files are general Ogg audio, so also "audio/ogg". Checked in Firefox and work. "application/ogg" is deprecated for all audio or video uses. See http://www.rfc-editor.org/rfc/rfc5334.txt
I see in the documentation page an example like this:
<source src="foo.ogg" type="video/ogg; codecs="dirac, speex"">
Maybe you should enclose the codec information with " entities instead of actual quotes and the type attribute with quotes instead of apostrophes.
You can also try removing the codec info altogether.
Just remove the inner quotes - they confuse Firefox. You can just use "video/ogg; codecs=theora,vorbis".
Also, that markup works in my Minefiled 3.7a5pre, so if your ogv file doesn't play, it may be a bogus file. How did you create it? You might want to register a bug with Firefox.
Just need to change one letter:),
rename 640x360.ogv to 640x360.ogg,
it will work for all the 3 browers.