Soukie's Place

keeping track of random thoughts

Degradable HTML5 audio and video Plugin

Screenshots of the plugin

Screenshots of HTML5 video and audio in action

Wordpress plugin for html 5 audio and video allows you to embed media for native playback in supported browsers and offers a graceful degradation for unsupported browsers. Feel free to download the plugin, and use the Comments section to leave feedback or feature requests.

Download the plugin and follow the installation instructions, or use the feature Add New under Plugins in your WordPress installation to search for this plugin for an automated installation.

You can take a look at the plugin in action with audio and video playback. Try them out with different browsers.

Description and Features

Embed video and audio on your website using shortcodes. The plugin enables html5 native playback for users with compatible browsers while offering an elegant degradation to other users through very lightweight Flash players. For html5 playback, it auto-detects and offers different alternatives, or degrades to Flash, and (failing even that) to download links.

Typical usage is simply [audio src="http://myblog.com/wp-content/uploads/2009/09/mysong"]

The plugin will make sure this does the following:

  1. If the user has an HTML5 support for video and audio, it will play the media natively in an appropriate format.
  2. Otherwise, if the user has Flash, it will play the media in lightweight Flash players.
  3. Otherwise, there will be a link for the audio or video files so that the user can still play them using their installed software players.

The plugin also allows you to provide only one version of the file (and force Firefox to fallback to Flash).

Codecs and browsers: The current situation with HTML5 is not ideal. For video, you should supply two formats to support all browsers. But if you do not mind forcing Firefox to fall back to Flash, you can provide H.264 version only. See the tables below to see what file will be played based on the support in the current browsers.

VIDEO           Flash   H.264   Ogg Theora
                .flv     .m4v      .ogv
Firefox 3.6      -          -        X
Safari 4.0       -          X        -
Chrome 4.0       -          X        X
Other (Flash)    X          X        -

When a browser supports multiple formats and the files are available, the preference goes from left to right (e.g. Chrome will prefer the H.264 format; reflecting the quality of the codecs). The FLV format is optional and it is provided for backwards compatibility to play older FLV-only videos either alone (no HTML5 video) or as a preferred fallback version when used alongside versions converted to H.264 and Ogg.

AUDIO         WAVE   MPEG-4   Ogg Vorbis   MPEG
              .wav    .m4a       .oga      .mp3
Firefox 3.6     X       -          X         -
Safari 4.0      X       X          -         X
Chrome 4.0      -       X          X         X
Other (Flash)   -       -          -         X`

For audio, you have to include at least .mp3 and .oga/.ogg versions to cover all browsers. (Or, you can supply .mp3 only which will force Firefox to fall back to Flash). Other formats are optional. Again, the preference for multiple available files in browsers supporting multiple codecs is left to right.

The Flash players used are a standalone version of WordPress Audio Player by Martin Laine, and Videoplayer by Mr.doob.

Usage Instructions

Currently, there is no settings panel. All you need is the syntax for the shortcodes explained below.

Audio
Basic syntax: [audio src="File URL/path"]
Advanced syntax: [audio src="File URL/path" options="special string" id="string" format="special string"]

Example:
[audio src="http://myblog.com/wp-content/uploads/2009/09/mysong" options="autoplay loop controls" id="header-audio"]

  • src is required. It must be an absolute or relative path to audio with the file name (“mysong”, in the above example). The files need to be located somewhere in your content folder (usually ‘wp-content’) unless you specify the files using the format option. File extension can be omitted. Upload “mysong.mp3”, “mysong.ogg” etc. as applicable to the specified location.
  • options is optional. It is a space-separated list of attributes defining the player behavior: autoplay to start playback automatically; autobuffer to start preparing the playback, controls to display the built-in playback controls (otherwise you can build and hook up your own), and loop to start from the beginning when the end is reached. The default value is "controls autobuffer".
  • id is optional. If you do not include one, the audio tag will have an automatically generated ID of html5audio-number. The IDs for the Flash players are prefixed with f-.
  • format is optional. It is a space-separated list of available file formats. (Recognized values are auto, m4a, mp3, oga, ogg and wav.) The default value is auto which autodetects the formats. You can specify a list of available formats manually instead (e.g. format="oga mp3 wav").

Video
Basic syntax: [video src="File URL/path"]
Advanced syntax: [video src="File URL/path" width="pixel size" height="pixel size" options="special string" id="string" format="special string"]

Example:
[video src="http://myblog.com/videos/vidclip" poster="http://myblog.com/wp-content/uploads/2009/09/clip-teaser.jpg" width="320" height="240" options="autoplay" id="vid-1"]

  • src is required. It must be an absolute or relative path to video with the file name (“vidclip”, in this example). The files need to be located somewhere in your content folder (usually ‘wp-content’) unless you specify the files using the format option. File extension can be omitted. Upload “vidclip.ogg” (in Ogg Theora format) and “vidclip.m4v” (in mp4 format) to the specified location.
  • poster is optional. It is a URL to the image you want to display before the video loads/starts playback. (If a jpg with the same file name can be detected, it will be used when ‘poster’ is not specified.)
  • width and height are optional. The default size is 480×320 (which is the resolution of iPhone; larger videos might not play back on iPhone/iPod Touch).
  • options is optional. It is a space-separated list of attributes defining the player behavior: autoplay to start playback automatically; autobuffer to start preparing the playback, controls to display the built-in playback controls (otherwise you can build and hook up your own), and loop to start from the beginning when the end is reached. The default value is "controls autobuffer".
  • id is optional. If you do not include one, the video tag will have an automatically generated ID of html5video-number. The IDs for the Flash players are prefixed with f-.
  • format is optional. It is a space-separated list of available file formats. (Recognized values are auto, flv, m4v, ogg and ogv.) The default value is auto which autodetects the formats. You can specify a list of available formats manually instead (e.g. format="ogg m4v").

If you find this plugin useful, you can rate it and link to this page. If you don’t like it for some reason or have suggestions, feel free to leave feedback and comments on this page.

Manual Installation

  1. Download the file and upload the unzipped folder degradable-html5-audio-and-video to your plugins directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. And then follow the usage instructions above

Frequently Asked Questions

If your files do not play properly, check the following points:

So what file formats are required?
Only mp3 for audio, and m4v for video. When ogg versions are missing, JavaScript is used to force Forefox to fall back to Flash. To fully support HTML5 audio and video and bypass JavaScript, include the Ogg versions. All other audio formats are optional. To support migration from legacy video files, it is also possible to use this plugin for playback of FLV files only.

The final html code looks fine but doesn’t play in Firefox/Safari
The server needs to be configured to serve the video files with the proper MIME type. (Setting the type through HTML code alone is not sufficient.) On a Linux host, you can add the following lines to the .htaccess file:
AddType video/ogg ogg ogv
AddType video/mp4 mp4

Are there limitations on formats and extensions?
The plugin requires specific file formats and extensions. For Ogg formats, the extension has to be .ogv or .ogg for video, and .oga or .ogg for audio. H.264 format needs the extension .m4v, and MPEG-4 audio m4a. Follow the instructions for the best results. If you decide not to create two versions of video (using e.g. ffmpeg2theora), and you provide only the H.264 file, the plugin will detect this and will use JavaScript to play the file in Firefox using the fallback player.

The plugin does not recognize the location of the files
This should not happen if you follow the instructions. The current version of the plugin will fail if you link to the audio or video using the attachment ID. If you store the files on a different server, use the format option to manually specify the available file formats; this bypasses the autodetection that requires the files to be present within the content directory of WordPress.

Can I change the look or behavior of the fallback players?
For audio, you can. Refer to the available options and add lines to the file degradable-html5-audio-and-video.php under the heading Format the player by inserting lines here.

What if the plugin conflicts with another plugin?
There is a known conflict with Viper’s Video Quicktags. If you use that, download a modified version of Degradable HTML5 plugin from my website. This uses syntax [html5audio ...] and [html5video ...] to prevent the conflict. Audio Player might also not work but you can use Degradable HTML5 plugin to play the audio files instead (it uses the same Flash player and will give the users native HTML5 playback on supported browsers). If you experience problems, try deactivating plugins to determine if there is a conflict.

Changelog

Feel free to leave comments with requests for features or changes. My goal is to keep the plugin lightweight but I am open to ideas.

1.8.0

  • Added support of FLV videos (works either as simple Flash playback, or as a prefered version of fallback player when H.264/Ogg versions exist)
  • Added support of .ogv and .oga extensions in autodetection and manual format setting (.ogg continues to work)

1.7.1

  • mp3 only is now acceptable for audio. See “So what file formats are required?” in FAQ
  • Updated the Flash Audio Player to the latest version
  • Added “What if the plugin conflicts with another plugin?” to FAQ
  • Fixed the compatibility table: Chrome can play MP3 using HTML5
  • Added a call to enqueue jQuery (needed if ‘avoiding’ Firefox)

1.6.1

  • For a video poster, the plugin will attempt to detect a jpg with the same file name and use it when ‘poster’ is not specified
  • Fixed a bug where H.264-only videos would not play in IE8

1.6.0

  • For audio, you now do not need to provide the Ogg files (This uses JavaScript to force Firefox to the Flash fallback.)
  • New format option to manually specify available file formats (avoids auto-detection and allows storage anywhere)

1.5.1

  • For video, you now do not need to provide the Ogg Theora files. If only H.264 version is available, Firefox will be served with the Flash fallback.
  • Due to the auto-detection involved, video files should be somewhere under your content folder (usually ‘wp-content’). UPDATE: Unless you use manually override this (using v.1.6.0).

1.4.2

  • Compatibility with WordPress 2.9 and 2.9.1

1.4.1

  • The width and height of the HTML5 video element is now explicitly set

1.4.0

  • The autoplay and loop options (if used) are also applied to the Flash fallback audio player
  • The plugin accepts relative paths (e.g.`/wp-content/uploads/2009/09/new_world` in addition to `http://soukie.net/wp-content/…`)
  • If the path and name to media includes the file extension (‘.mp3′ etc.), it will be ignored and the media will function properly

1.3.0

  • Fixed a problem with the audio Flash player introduced by incorrect upload of v1.2 (affected some users). Apologies!
  • Switched to a three-digit version numbering.

v1.2

  • The audio files no longer need to be under the ‘uploads’ directory but anywhere within your content (usually ‘wp-content’).
  • Updated the way IDs are applied to the fallback Flash players (they use the supplied or generated ID prefixed with ‘f-’).

v1.1

  • Added optional attribute options to define the player behavior (default is: show built-in controls, buffer media when page loads but do not start autoplay and do not loop).
  • Added support for .wav (wave) audio (the preferred source, if present).
  • Fixed bug with incorrect IDs of the fallback Flash players.
  • Expanded documentation to cover available codecs, Google Chrome 3.0 and options.

v1.0

  • Initial version.

96 Comments »

feed icon Feed

thank u for this plugins , i really needet that :)

Andreas Koutsoukos, September 22, 2009:

Hello.
I just try to test te plugin, but there is something bug.

I just write blog post and in the html i write this
[audio src="http://www.skenevisuals.com/andreas/wordpress/wp-content/themes/blogi/audio/test" options="autoplay loop controls" id="header-audio"] but in the site it says this “No audio files uploaded, make sure you added it as audio.” what i do wrong.

Pavel Soukenik, September 22, 2009:

Hello Andreas, there was a limitation for [audio] that the file needed to be somewhere in the “uploads” directory of your WP content. I fixed this to allow audio anywhere within the content directory. (The plugin did and does allow for custom name of the wp-content.) Thanks for pointing this out!

shareAll, September 22, 2009:

After installing on Wordpress page, I get preloader but no audio loads.

I’m using an mp3 file in the uploads directory.

[audio src="http://www.pameladunn.org/wp-content/uploads/BrightFuture" options="controls autobuffer" id="header-audio"]

Any suggestions?

Pavel Soukenik, September 22, 2009:

It seems you did not provide an .ogg version; so it will only work with Safari or Chrome but not in Firefox. (And Explorer should use the Flash player anyway). There are many tools that allow you to convert an MP3 to OGG. Simply create the .ogg version with the same name and upload to the same folder as the MP3. Hope this helps.

Just a side note that [audio src="http://www.pameladunn.org/wp-content/uploads/BrightFuture"] should be sufficient for you. (controls and autobuffer are the default when you leave out the options, and unless you plan to specially control or format the players, you do not need to specify the ID either).

Paulius, September 23, 2009:

I added poster, but with Firefox 3.5.3 I can’t see it. Firstly I thought that .png format is not supported, but .jpg did not help me.
Any suggestions?

Pavel Soukenik, September 23, 2009:

Unfortunately, Firefox will support the poster attribute only from version 3.6. Also, the HTML5 working draft specifies that the browsers (after the video media loads) can choose to display either the poster, or the first frame of video “at [their] discretion.” (Which I think is unfortunate; e.g. Safari supports ‘poster’ and switches to the first frame when it can.)

mike, September 23, 2009:

Hi there,
I’m testing this out for a site at the mo to play mp3’s, it works well and looks great (kudos) except that the ‘options’ don’t seem to get implemented- they are left hanging in the audio tag. Any thoughts? cheers!

Pavel Soukenik, September 23, 2009:

Hi Mike, that is actually on purpose. If you’re looking at the generated HTML, and see something like audio autoplay loop controls id="html5audio-0" … at the beginning, that’s perfectly fine and proper syntax. (This example would be the result of specifying options="autoplay loop controls" as part of the shortcode.)

Adam Zaninovich, September 29, 2009:

On my text server, the plugin was working great. Not so much after moving to wordpress linux hosting. I have both m4a and ogg copies of the files (working on mp3) but they don’t load on safari4 or ff3.5. When I look at the generated code, it only has the line for an mp3 file… m4a and ogg are missing. What’s wrong? As a test I wrote a correctly formatted html5 audio page to make sure the server can serve up the correct file types. Check it out if you want: http://thezanino.com/test/

Pavel Soukenik, September 30, 2009:

Hi Adam, can you send me the complete text of the shortcode you were using? It seems the plugin has trouble verifying the existence of the m4a and other versions. And yes, I checked the test page you created and it’s working fine. Thanks for being persistent! Update: We diagnosed it and it was caused by not using the exact required syntax for the “src”. That being said, the new version now allows relative paths and tolerates file extensions.

VVOR, October 2, 2009:

STUNNING PLUG ! Tnx

Vlad, October 7, 2009:

Halla everyone.
I just installed the player, also uploaded the mp3 file and ogg file into uploads folder but it doesn’t work.
The browser sees the player, but it gets an error like: Connecting… File not found.
Any suggestions ? What can be done ?

Pavel Soukenik, October 7, 2009:

Hi Vlad, can you email me with the text of the shortcode you are using in the post?

Jordi Petit, October 8, 2009:

Hello,

I have a bug report on v1.4.0: Handling of audio files is incorrect, as the $filename is not constrcuted correctly.

The following lines do now work for something like [audio src="/audio/file"], whereas the [video] handler works well in this case (its code is much simpler).

Pavel Soukenik, October 8, 2009:

Hi Jordi, the audio code needs to check for the existence of the possible files (wav, mp3, ogg…). As a limitation, the file must be located somewhere in your wp-content. It should work correctly with both absolute and relative paths, and also with custom locations of the content directory. Let me know if this is not working for you.

Jordi Petit, October 8, 2009:

Hello. Another bug report

In videos, width and height are not taken into account (at least under firefox 3.5). Solutions is simple:

$output = ‘<video width='.$width.' height='.$height.' '. $options;

Pavel Soukenik, October 8, 2009:

You are correct, the size was not explicitly set and was taken from the poster/video file. I have fixed it so you can now override the size. (I had overlooked this code was defined only for the fallback player.)

Adam, October 10, 2009:

Tried to embed a Youtube video on my site. It appears to show the player controls at first and then it gets lost with a big x in the middle. Here is my shortcode: [video src="http://www.youtube.com/watch?v=IOIJHh3mKcQ" poster="http://i2.ytimg.com/vi/IOIJHh3mKcQ/default.jpg" width="380" height="344"]

Looks like a great plugin!

Pavel Soukenik, October 11, 2009:

Hi Adam, unfortunately, this plugin is not designed to embed YouTube. Technically, it could be done but without the ogg format present, the value would be limited. I would recommend that you use one of the YouTube plugins for that, and my plugin for your own videos.

John, October 21, 2009:

Hi I’ve installed your plugin and have tested it with an mp3 I had lying around. It seems to work in everything on PC, but with firefox 3.5.3 on my macbook I get a dark grey box with a faint ‘x’ in the middle. Other browsers on the mac seem fine. HTML and PHP I can handle, but I have no idea about audio files. Any ideas? Cheers.

Pavel Soukenik, October 25, 2009:

Hi John, sorry for the late reply. You need to convert the mp3 to an ogg format and save it in the same location. Firefox does not support mp3 playback in native HTML5. See the format compatibility table.

wille, October 28, 2009:

Would be cool if the plugin had support for audio located in others servers. I prefer update great files in public servers, like archive.org.

Pavel Soukenik, October 29, 2009:

Thanks for the suggestion. I’ll think about a good way to do that and will implement this in the next update.

Shazron, October 30, 2009:

Awesome plugin – just reporting an OS quirk:

When I set the poster attribute for video, on Leopard h.264 plays fine under Safari 4.0.3.

However on Snow Leopard with Safari 4.0.3, when the poster attribute is set, playing h.264 only shows the poster, and the video cannot be played.

My guess is this is a quirk with Quicktime Player X.

Ben, November 13, 2009:

Neat plugin, though I question your choice of FLV player; it doesn’t keep parity with the browser-native players– no play/pause/stop buttons, no time, no loading indicators.

Might I suggest OS-FLV?

Pavel Soukenik, November 13, 2009:

Thanks for the suggestion Ben! I took a look at the plugin (because I would also love a better-featured fallback player for the video) but it does not seem to support either .m4v (H.264) or .ogg (Ogg Theora) format and therefore, for it to work as a fallback to HTML5 formats, you would need to supply yet another version of the video file. Anyway, let me know if I overlooked the m4v or ogg support, or if you run across any other suitable player. Thanks again!

Markus, November 19, 2009:

Thanks for your plugin! It works great in FF, Opera, Safari an IE. But the flash-player doesnt wrap right and looks not very nice. Did you test it?

And: it ist possible to style mye own flash-player/use another flash-player?

Thanks for your time & work!
Markus

Pavel Soukenik, November 19, 2009:

Hi Markus, is the first issue related to the audio or video Flash player? For styling the player, see the answer in FAQ (above). Currently, it is not possible to use your own player without modifying the plugin. Do you have any suggestions for alternative players? Thanks, Pavel

JSDK, November 21, 2009:

in my site, mp3 and movies don’t load ;/ Firefox and Chrome pls help http://jsdk.pl

np http://jsdk.pl/index.php/moje/rapowanie/zniszczony-przez-wojne/

Christiaan, December 1, 2009:

Hi Pavel, what should I be doing if I want to add a style class to the video tag, such as for aligning the video on my page?

If I add it to the shortcode it seems to get removed by the plugin. Any ideas?

Christiaan, December 13, 2009:

It would be nice to have some settings to alter the text people see when they can’t view the video.

doeme, January 5, 2010:

hi

i tried to use your plugin on my blog. when i implement a mp3 file from another website it works, but not with files from my page, i only see a big X.

when i try to show a video, i only get “[ERROR: No URL was passed to the generic video BBCode]”

what am i doing wrong :( ?

Patrick, January 6, 2010:

You know what would be great? A plugin to automatically convert M4V to OGG, or the other way round, depending on what you upload. Of course that would need ffmpeg or something like that on the server, but it could be done. It would be extremely useful in conjunction with this plugin. Maybe it could even be built into this plugin?
Anyway, love it! Thanks for the great work!

Pavel Soukenik, January 16, 2010:

Sorry for not responding for so long!
@JSDK and @doeme: I’ll get in touch with you via email.
@Christiaan: Good points. For styling, you can assign the your own ‘id’ (or use the generated one) and use that to style video in CSS. For message, do you mean the “Could not use HTML 5 or Flash for playback…”?
@Patrick: Thanks! Programming what you suggest is beyond my skills. And it would likely be too intense to carry out in real-time. Let me know if someone does this.

Flo, January 23, 2010:

hi,
thanks for the plugin, that is exactly what I was looking for.

I would have a feature request, it would be nice if the fallback variants could be choosen by the user. i.e. I don’t want to encode my videos in different formats, I just provide the ogg version, and all people with a browser not capable of viewing it, should get a simple download link.

so, a little form, where you can arrange the fallbacks in order or disable it at all, with custom text to show if disabled, would be my idea.

Pavel Soukenik, January 23, 2010:

Yes, this is a good suggestion! It’s not that difficult, so I am going to implement this in the next couple of days.

Nate Steiner, January 28, 2010:

I’d love to use this plugin, but hosting video files on the same server as my WP is a no-go for me. Is there a way to turn off the auto-detect so I can point to files on an S3 server or whatnot? Excellent work regardless!

Pavel Soukenik, January 28, 2010:

I see. I will adapt it so you could override this and provide the list of available formats manually (for both video and audio).

Pavel Soukenik, January 28, 2010:

The download on this page is now 1.6.0. It allows leaving out ogg also in audio, and if you need to store media files anywhere, use the optional manual specification of formats: [video
src="http://file.goes/here" format="ogg m4v"] [audio
src="http://file.goes/here" format="mp3 ogg m4v"]
. Documentation update and automatic upgrade coming soon.

CoSTa, February 1, 2010:

Hello
I’m trying to use your plugin but I have problems. It works under Firefox and Safari but when it comes to Flash (Opera, IE), the Flash player does not load :/. IE anounces an error in format like this: http://img.skitch.com/20100201-xm5w2arxganc64ir3tqnnbf1pt.jpg (I know, it’s in Polish but you should be able to figure out what it says).

I don’t know how to solve this problem. Please, help!

Pavel Soukenik, February 1, 2010:

CoSTa, can you put it on a page (so it’s not visible as a post) and mail me a link to it together with the shortcode used? I’ll check it.

Bill, February 2, 2010:

Using the latest version, all I can get is:
[ERROR: No URL was passed to the generic video BBCode]

My Page:
http://ripple.ca/?page_id=3786

Can you help? Thanks.

Pavel Soukenik, February 2, 2010:

I don’t see any video or error message but from the code, it seems you might have a conflict with the Viper’s video plugin. I will email you a “renamed” version to see if it will work then.

Bill, February 3, 2010:

Thank you for your fast reply, Pavel! I think you are right about the Viper conflict. The plugin works now for Safari but does not yet fall back to Flash in Firefox. I am going to try an ogg version of my video and see if that makes Firefox happy. Your help is much appreciated.

CoSTa, February 3, 2010:

Thank you Pavel for the fast reply! It seems like the last update solved my problem. Now for some more testing with IE and if it will be all right, off we go with you plugin :)

Thanks and good work!

Stu Helm, February 8, 2010:

Hi Pavel,

Fantastic plugin, currently trying it out at http://stuhelm.com/2010/02/test-of-html5-audio-for-imp/ for future full scale usage on http://impodcast.tv.

Just a couple of questions, is there a way to force Chrome to fallback to Flash, our podcast will always be just mp3 formatted for audio and of course Chrome doesn’t support this.

Also, will the shortcodes work in the WP templates? What we’re trying to do is build the plugin into our theme so that when we post something under our shows category we use some code to pull the enclosure URL and strip off the extension.

Thanks,

Stu

Glen, February 9, 2010:

Thanks for such a nice piece of work!
I do have a problem though, and that is that when loading the page in IE for some reason the Flash player is not being used to play the video. Using Firefox my post correctly plays the video using Theora, and using Chrome it correctly plays using h.264, but when I visit my post with IE, I don’t get Flash.
If you could take a look and give suggestions, I would be grateful. A test post that is not working in Flash is at: http://www.test.pubscott.com/bloga/?p=6
Thanks!

Pavel Soukenik, February 9, 2010:

@Glen: Yes, there was a bug :-( 1.6.1 fixes this.
@Stu, I can consider this but mp3-only would play HTML5 only on Safari. For templates, I do not think that shortcodes work in template files.

Frank, February 9, 2010:

Pavel,

Great Plugin, Thank you! Would we see a Playlist any time soon….? That would be great..!

Frank

Glen, February 9, 2010:

Wow, that is quick turnaround Pavel!
In 1.6.1 Flash works in IE :-)
HTML5 h.264 works in Chrome :-)
HTML5 Theora doesn’t work with Firefox :-(
1.6 did work fine with Theora and FF.
Thanks for all your help Pavel!

Frank, February 10, 2010:

Pavel,

can you please add the information, that video on the iphone only works with 640×480 resulution – not more.

Frank

Bill, February 10, 2010:

Pavel, I’m the guy you helped with that conflict that was happening with Viper’s plugin. There is also a conflict with Mark Laine’s Audio Player plugin. It cannot find and play a source file if Degradable HTML5 audio and video Plugin is active. I have upgraded to your latrst version (1.6.1).

Also, the [html5video src="..."] tag does not seem to work with the 1.6.1 version.

Pavel Soukenik, February 11, 2010:

I don’t have an elegant solution yet (I don’t want to break the functionality for existing users). For the time being, here is an alternative version of 1.6.1 which has html5audio and html5video shortcodes to prevent conflicts: 1.6.1b

Pavel Soukenik, February 11, 2010:

Thanks for the suggestions, Frank. Playlist is an ambitious goal but let’s see where I get with this.

Bill, February 11, 2010:

Pavel, the [html5video] and [html5audio] fix seems logical to me, elegant or not, but Viper’s plugin and the Audio Player plugin still break if I activate your plugin.
Here’s a broken video example: http://ripple.ca/?p=1807
And a broken audio example:
http://ripple.ca/?p=3844
Your plugin is active and working at:
http://ripple.ca/?page_id=3786

Pavel Soukenik, February 11, 2010:

That’s surprising. I’ll check it tomorrow! (I’m in Europe now so got to go to sleep).

Pavel Soukenik, February 13, 2010:

Version 1.7.1 is available for download on this page now, and should address all known issues. It also allows “MP3 only”. Check the changelog and FAQ.

Frank, February 13, 2010:

Pavel,

maybe this is the playlist you are searching for….
http://plugins.jquery.com/node/12713

Frank

Pavel Soukenik, February 13, 2010:

@Frank: Nice! That script can be used with HTML5 video/audio directly. Extra work will be adapting this so it works in the fallback Flash players, but yes, it’s doable and I’ll give it a go.

Bill, February 13, 2010:

Pavel, your plugin works to deliver H.264 from my server video to an iPod Touch. Since iPhones and the upcoming iPad will not do Flash video, that was one of my chief interests in your work here. Nice going!

Your plugin also works well for Safari, Firefox and Chrome, on my iMac. It is playing all of my MP3 audio as well.

Pavel Soukenik, February 14, 2010:

That’s great Bill! Thank you for helping me troubleshoot the two bugs.

Antonio, February 16, 2010:

Hello Pavel,
since wordpress 2.9.2 the audio player plugin I have seems to be broken, so I looked for an alternative and tried yours.
Now, things don’t seem to work the same in different browsers: Wordpress 2.9.3, Audio player plugin deactivated, Viper’s Video Quicktags plugin activated.

Degradable HTML5 audio and video Plugin (b version) activated (but also worked with the normal version). Page with embeded audio files: http://www.s-oe-s.de/index.php/downloads/medienarchiv/

Firefox 3.5.3 -> Flash, Opera 10.10 (1893) -> broken, Safari 4 Public Beta (528.17) -> broken, Internet Explorer 8.0.6001.18882 -> Flash.

Pavel Soukenik, February 16, 2010:

I’ve checked and it works except for the first audio file (I assume that’s what you meant). Do you use the same syntax for all shortcodes (no typos)? If so, this could be a misbehavior of another plugin (I’ve noticed a JavaScript page tracker that inserts its code into all links, including for the audio playback). Try to deactivate other plugins temporarily to see if it helps.

Stefan Segers, February 19, 2010:

Hi,

I have inserted the code and video’s on my server. Everything seems to work except for the Flash Player.
I want the Flash video player to AUTOPLAY like the HTML5 players do.

Is this something I need to edit in the source code of the plugin?

Stef

Pavel Soukenik, February 19, 2010:

Unfortunately, the Flash video player I’m using (see the link to Google code site in the article) does not support auto-play (as opposed to the audio Flash player). It was supposed to be added. I am not familiar with Flash so I cannot implement this myself.

Stefan Segers, February 19, 2010:

Hi Pavel,

Thanks for the reply. Isn’t there another player that I can embed that will support autoplay?

Stef

Pavel Soukenik, February 19, 2010:

Not really. I could try to find some light-weight alternative, or I could try to change the code to start the playback using JavaScript.

Stefan Segers, February 20, 2010:

what can be the easiest way? JS? If I can help you out, please tell me.

Stef

Pavel Soukenik, February 20, 2010:

I’m sending you an email.

Odin / Vemont, February 22, 2010:

Huh? OGV should work!

I guess it does. You should anyway check for it in the plugin, as it’s the preferred extension AFAIK :-)

Pavel Soukenik, February 23, 2010:

Thank you! I will fix this in the next release.

Pavel Soukenik, February 25, 2010:

Version 1.8.0 is now available for download from this site.

David, February 26, 2010:

Just updated to the latest version, and html5 player shows up in Chrome, but doesnt play. Not sure why.

Pavel Soukenik, February 27, 2010:

Hi David, can you post/email the text of the shortcode and a link to the page?

Tim Noonan, February 28, 2010:

Hi,

I use JAWS a screen reader for people who are blind, and I’m using IE8.

I wanted to let you know that the audio player options on this site are not presented to my speech software, probably due to the flash player being degraded to.

I’d recommend considering switching the degradation behaviour over to the awesome WPAudio WordPress plugin, which is very accessible, and which will itself further degrade to simple download of the audio file if necessary.

You can try out the WPAudio plugin here on my site http://www.vocalbranding.com.au/the-human-voice-is-the-most-influential-sound-on-the-planet

Hope this helps
Tim

Pavel Soukenik, February 28, 2010:

Thank you for the suggestion Tim. The degradation I use also goes all the way to the text but not for users with Flash and the screen reader. I understand the concern and I will address this in the next version. (Likely in the form of an option to display the download links below the video/audio.)

David, March 2, 2010:

I cannot seem to get this working with the sermon browser plugin. I modified the php so the shortcode gets printed on the site like [audio src="http://www.lbcpb.org/teachings?show&file_name=2010-02-28.mp3" format="mp3"]. When I activate the plugin I thought that would be replaced by the player, but it is not. I would love to get this working so iPhone users can also listen to the sermons directly on the site. The original sermon browser code was using [audio:http://www.lbcpb.org/teachings?show&file_name=2010-02-28.mp3] which appears to insert this plugin, but then it says File Not Found when clicking the play button.

Pavel Soukenik, March 3, 2010:

Does it work for you when you change the link as follows? [audio src="http://www.lbcpb.org/media/2010-02-28" format="mp3"] I tried linking to this file from my site with this code and it worked. (The ‘.mp3′ bit may or may not be there, but the thing that apparently makes it fail for you is referencing the file through ‘?show&file_name=xyz’.)

Ben, March 4, 2010:

@Shazron;
“Awesome plugin – just reporting an OS quirk:

When I set the poster attribute for video, on Leopard h.264 plays fine under Safari 4.0.3.

However on Snow Leopard with Safari 4.0.3, when the poster attribute is set, playing h.264 only shows the poster, and the video cannot be played.

My guess is this is a quirk with Quicktime Player X.”

I noticed the same thing. Drove me crazy trying to figure out what was going on.

Pavel Soukenik, March 5, 2010:

Unfortunately, I don’t have a Mac to verify but this indeed seams like an OSX bug. Can you report it somewhere?

David, March 8, 2010:

Hi,

I’m trying to use your (wonderful!) plugin to add video to my blog. If I supply only the h264 .m4v version of a video, it works like a charm in Chrome/Safari, but doesn’t work at all in FF (i.e., doesn’t even fall back to Flash or provide a direct download link.)

My shortcode is simply: [video src='http://wp-sandbox.wanderingjew.net/wp-content/uploads/2010/03/cockroach']

Any suggestions?

Thanks a lot!

Flo, March 8, 2010:

hi,
I have my video in flv and ogv, and would like to have the ogv played first, and onyl if that’s not possible play the flv file.

do I need to write then format=”ogv flv” in the video tag?

Pavel Soukenik, March 8, 2010:

@David, this should definitely work. I’ll email you to investigate a bit more.
@Flo, ogg/m4v has a priority in HTML5 playback. Only fallback Flash prioritizes the optional flv. The thinking behind this is: Nobody is going to create flv movies now so if an flv is supplied, it is probably the original quality file. The reason it does not work for you is that you must provide an m4v version at the moment. See the FAQ.

Adam, March 8, 2010:

Hey – great plugin. I’ve spent a bunch of time today learning about HTML5 compatibility. Anyway…I don’t know why my ogg/ogv file isn’t working in FF. If I don’t upload an ogv file, it falls back to the flash player fine…but if I do upload an ogv file…I just get an “X”.
Am I doing something wrong?

http://www.pplplanner.com/communication

I did modify the htaccess file per your suggestions too…

Pavel Soukenik, March 9, 2010:

Hi Adam, the good news for you is that it is actually working :-) The problem is that after updating the .htaccess, you need to clear the cache in Firefox. I need to update this in the instructions.

Stefan Segers, March 10, 2010:

I am still looking for a way to make the FLASH player in IE get an autoplay function. It works with SAFARI and other modern browsers but not with IE

Another thing is that when I do a autostart of my movie it takes a while to start playing (with empty cache on the mac)

Hope there will be some answers soon :D

Stef

Trackbacks/Pingbacks

Your comment