stephaneeybert — 2012-10-01T06:50:40-04:00 — #1
I have seen the audio player at http://next.liberation.fr/musique/2012/09/22/dans-ton-casque-sylvain-22-ans_847686 and tried to use it on my website at http://www.learnintouch.com/elearning/exercise/55/page/194/subscription/ but it does not want to play the audio file. This happens to the latest Firefox 15.0.1 only. You need it to see the issue. I guess it is related to the Flash version within the browser. But I can't see why my markup code does not work, when the other one does.
Thanks for any tip !
eastcoast — 2012-10-02T10:16:18-04:00 — #2
Doesn't work for me on chrome either. Probably a path issue to the mp3 file rather than a flash issue.
serverstorm — 2012-10-02T10:34:39-04:00 — #3
Bonjour (Hi) Stephane,
It works on my Linux Firefox as well as my Linux Chrome and my VMS that run Win7, WinXP, and OSX running the latest version of firefox. Could it be a problem with the flash encoding maybe? This will explain why I can hear it but you and EastCoast cannot.
Have you considered using HTML5 audio that can have a fallback to Flash and then support a range of different codecs that have a better chance of matching what audio codecs people have on their own OS.
There are quite a few tutorials on HTML 5 audio (with Flash fallback) the only things that would need to change are the Doctype and then implement the controls. Here are a few googled tutorials: [HTML 5 Video and Audio in Modern Browsers, [URL="http://www.html5rocks.com/en/tutorials/audio/quick/"]HTML 5 Audo Rocks](http://www.sitepoint.com/using-html5-video-and-audio-in-modern-browsers/),
stephaneeybert — 2012-10-02T10:54:26-04:00 — #4
Remember that the audio file can be played by my Firefox 12.0.1 on Linux.
You mean you think that explains why it works on some browsers and not others ? Can the path be parsed by some and not others ? Anything wrong with the path as it is ? Thanks for your input !
stephaneeybert — 2012-10-02T10:56:50-04:00 — #5
1- What is it you call the Flash encoding ?
2- I have tried on some HTML5 tutorial, maybe not that I tried my hardest, but it seemed it would not play the mp3 format, and I cannot ask my end users to reformat and upload all their files in their CMS.
eastcoast — 2012-10-02T11:59:03-04:00 — #6
The flash player plays the same external mp3 file, there's no need to encode to a specific audio swf (as this would just be an mp3 in a wrapper)
There used to be issues with mp3s played back in flash when the sampling rate wasn't a multiple of 11khz (i.e 22/44) but this usually manifested itself as wrong playback speed or glitching rather than complete silence.
serverstorm — 2012-10-02T12:02:58-04:00 — #7
Encoding means saving the audio in different formats. HTML 5 can use mp3, aac, Again, iP4, and wav plus a few other formats as well. These are listed in the HTML 5 Video and Audio in Modern Browsers, link I provided (near the bottom of the article)
Keep in mind that your browser may not have been able to play mp3 as it didn't have a codec that supported it. That is the main point of using multiple HTML5 audio formats so that the user DOES NOT have to choose the code selects whatever is supported. If none of the native codecs don't work for someone then you can set HTML5 audio to fallback to flash so you can have your audio in a Flash file you serve.
eastcoast — 2012-10-02T12:04:45-04:00 — #8
stephaneeybert — 2012-10-02T12:20:35-04:00 — #9
Thanks for the missing js file note, I fixed that now.
My CMS users only upload mp3 files so I guess using HTML5 will not help me much.
serverstorm — 2012-10-02T17:06:15-04:00 — #10
Keep in mind that HTML5 will support mp3 files. The HTML5 native player will be faster performing then the SWF as it is native code rather than a plugin. Plus the HTML5 audio can use hardware acceleration to offload the processing and typically will give better performance.
Are you sure that you did the HTML 5 audio correctly? Keep in mind that the src attribute can be a URL of the audio file (so you can type in the full path in your browser and it will launch your default audio player) or it can be a path to the file on the local system.
By using HTML 5 you can use a non-flash mp3 file and don't need the flash version as EastCoast mentioned in Post #6.
stephaneeybert — 2012-10-02T17:23:34-04:00 — #11
I'm sorry not to be able to act so easily on your input, I'm still confused by the different components at play here.
Can I quote you ?
You say: "you can use a non-flash mp3 file"
Is there such a thing as a Flash mp3 and a non Flash mp3 ?
You say: "HTML5 will support mp3"
Is it supported as of today or in the future ?
I understand also that this support of mp3 by HTML5 is one thing but there still needs to be another thing in place, ie the codec in the browser. Am I right ?
Thanks to you two for your shedding some light on my dark workbench.
serverstorm — 2012-10-03T13:23:04-04:00 — #12
SWF that is linked to an mp3 (like you have now) is in a way wrapped using SWF. It plays because the SWF player is a plugin that knows what to do with the .mp3 MIME type. If you don't use SWF then not all browsers support .mp3 (like Firefox) so you can't play them.
HTML5 <audio> does today support mp3; however not all browsers support it, so the browsers are the limiting factor.
As of today Oct 03, 2012 Firefox does not natively play an MP3 file due to patent licences from a number of organisations (Technicolor/Thomson Consumer Electronics, the Fraunhofer Institute, Alcatel-Lucent, and Sisvel). In March Mozilla announced that they would support html 5 and mp3 native formats but as of now it has not yet been integrated into Firefox. Mozilla is trying to keep their browser open-source and it is harder to do when supporting such proprietary formats. Mozillia appears to plan to put it in Droid. So in Firefox (and other Mozillia browsers) you still need to fall back to a SWF audio wrapped file.
Well there are two parts to this.[INDENT]1) Your web server needs to have the proper mime-types associated with your site. If you use Apache as your webserver you can define these MIME types in a .htaccess file like:
<font color='#880000'><font face='andale mono'># AddType TYPE/SUBTYPE EXTENSION
</font></font><font color='#660066'><font face='andale mono'>AddType</font></font><font color='#000000'><font face='andale mono'> audio</font></font><font color='#666600'><font face='andale mono'>/</font></font><font color='#000000'><font face='andale mono'>mpeg mp3
</font></font><font color='#000000'><font face='andale mono'><font color='#660066'>AddType audio/ogg</font> ogg
[INDENT]2) Your browser needs to support mp3. As mentioned above Firefox doesn't support it yet, but supposedly will in the future.
It is because of this - not all peoples browsers support the same MIME audio types - that html5 audio should not be served with just one audio type. The HTML5 spec allows the browser to detect if it supports one format and if not then will try the next format. I do however understand that you are exclusively using .mp3, so I'm not sure that HTML 5 audio does make sense for you; however it has many advantage so it is a shame.
For more info go to the Mozillia developer network
stephaneeybert — 2012-10-03T14:33:01-04:00 — #13
Hi Steve, thanks for that, it was quite educative !
stephaneeybert — 2012-10-15T10:17:55-04:00 — #14
My user just told me that the player does not even show up on his new iPad
He cannot see the player at http://www.learnintouch.com/elearning/exercise/55/page/194/subscription/
He got his brand new iPad a few days ago.
shyflower — 2012-10-15T12:13:15-04:00 — #15
I would think if it works for others and not for your user, then he must have something in his iPad settings that he needs to change.
stephaneeybert — 2012-10-15T12:48:17-04:00 — #16
Thanks for that. I have a few questions..
1- You have seen the player of the specified page on your iPad ?
2- Does one need to install Flash on the iPad ? As a note, I did not have to install it on my iPod and my user did not have to install it on his iPhone and still the player showed up and played fine on both of these devices.
technobear — 2012-10-15T12:52:41-04:00 — #17
As I understand it, iPad and iPhone have no support for Flash. (I use neither, so I may be wrong here.)
Adobe first offered the Flash Player for smartphones in 2010 but faced a setback when Apple refused to allow it to be installed on iPhones and iPads.
stephaneeybert — 2012-10-15T13:13:33-04:00 — #18
In fact, the iPod and iPhone were using another player.. my mistake, sorry !
It is a similar player but maybe does not use Flash.
shyflower — 2012-10-15T14:20:06-04:00 — #19
Like TechnoBear, I use neither. I see you have resolved the issue, though. Thanks for letting us know!
stephaneeybert — 2012-10-15T15:58:50-04:00 — #20
Sure. My wrong assumption was because the two players originate from the same provider, the dewplayer at http://www.alsacreations.fr/dewplayer.html
next page →