Media Players in Drupal 7

I was tempted to call this “The Sorry State of Media Players in Drupal 7,” but I’m perhaps being too harsh. I probably have different requirements that nobody else has, so that’s why none (as far as I’ve been able to find) work for one of my current projects.

The project involves converting to Drupal a site for an independent record label which licenses tracks for use in commercials, television shows and movies. As this was a straight conversion, I wasn’t going to be adding any additional functionality at this point; the primary reason for the conversion was to allow them to make updates themselves so that new tracks could be immediately found by directors and producers.

Toward the end of the project, though, the guys behind the label had produced a set of tracks suitable for movie trailers and they wanted to feature these separately from the others in a player. Previously tracks were either listed statically on artist and album pages or dynamically generated in search results and they would play natively in the browser. (This project brought those tracks into Drupal and displayed them as needed using Views.)

I was hoping that at some later time I could add a video player for playback of their placements (clips from commercials and television shows) and now I had a reason to better integrate audio and video into the site – and specifically with Drupal.

I started out by looking at a few HTML5 players and then downloading and installing Drupal modules that integrated those players. I had a few meager criteria when evaluating these modules/players:

  • The player needed to be HTML5-compliant, with Flash fallback as an option, rather than a strictly Flash player. I wanted the media to be available to as many browsers and devices as possible.

  • The player needed to support both video and audio. I wanted to have a similar look and feel between players and thus didn’t want two different players. And by “audio player” I mean a skin that does not include a viewer for video.

  • The module and/or player needed to support playlists.

  • The module needed Views integration. Specifically, a Views display style for the player and support for generating a playlist from a view.

Here’s what I found in the universe of Drupal 7 modules:

MediaElement

Uses the MediaElement.js player.
Has an audio player: YES
Has playlist support: NO
Has Views integration: NO


Projekktor

Uses the Projekktor player.
Has an audio player: NO
Has playlist support: YES
Has Views integration: YES

Using the player for audio could work if I used a poster in the viewer. However, the controller currently shows the filename of the media rather than its title and images aren’t being loaded from a Views relationship.


Video.js (HTML5 Video Player)

Uses the Video.js player.
Has an audio player: NO
Has playlist support: NO
Has Views integration: NO

This module’s documentation is pretty light.


MediaFront

Uses the Open Source Media Player
Has an audio player: YES
Has playlist support: YES
Has Views integration: YES

Documentation is spotty, but it’s currently being updated.


jPlayer

Uses the jPlayer player.
Has an audio player: YES
Has playlist support: UNKNOWN
Has Views integration: YES

There are some bugs that made it impossible to fully test.


JW Player

Uses JW Player.
Has an audio player: UNKNOWN
Has playlist support: NO
Has Views integration: NO

There is some work being done on playlist and Views integration.


SublimeVideo Player

Uses SublimeVideo.
Has an audio player: UNKNOWN
Has playlist support: NO
Has Views integration: NO

I’m not sure that any work is being done on this module.


Kaltura

Uses Kaltura.

Because the management interface for this doesn’t fit with the site’s theme, I didn’t even consider using the module.


Yahoo! Webplayer

Uses Yahoo! WebPlayer.
Has an audio player: YES
Has playlist support: NO
Has Views integration: NO

Video playback is limited to videos on Yahoo! Movies.


As you might gather from the list above, MediaFront is the only module that clearly met my requirements. And it’s very cool in that I can create custom templates and add additional information to a playlist, like a description of each track available on my client’s site.

Unfortunately I can’t use the player on the site, mostly because getting the audio player to work is still a hack at this point. Although you can define the player to only show the controller, doing so will also disable the playlist. Also with this setting, the volume slider is unusable.

I thought I might get around the playlist issue either by putting the player in a Views header and make the playlist the view content or by making the player the view content and putting the playlist in an attachment, but because the player to player feature is broken I can’t get the player to switch tracks when the playlist is clicked.

Okay, so how about making do with showing a poster image while the track is playing? No, that won’t work, because the poster image disappears while playing audio files.

In the end, it seems that I can’t use any of the available modules for this client and I’m going to have to outsource the player to SoundCloud. (There is a module for that service, but it isn’t designed with my purpose in mind.) It looks great, but each player must be created and populated manually using media that’s uploaded to a third party.

I’m still holding out hope that MediaFront will be ready when the client does the next site update, and I’m also looking at a couple modules that will provide some additional functionality:

Media HTML5 video (transcodes uploaded media into HTML5-ready versions)
Video (similar to Media HTML5 video, plus more)