/mediaelementjs_player

A Zenphoto plugin for the Mediaelementjs player

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

mediaelementjs_player

Note: The plugin is not developed actively anymore. Since all modern browsers can display video/audio content via HTML5 natively the only reason is the flashfallback for old browser. Besides that pull requests for fixes are still welcome.

A Zenphoto plugin for the MediaElement.js video and audio player by John Dyer (http://mediaelementjs.com). It will play natively via HTML5 in capable browsers and is responsive.

Installation

Place the file mediaelementjs_player.php and the folder of the same name into your /plugins folder.

Supported file formats

  • Audio: .mp3, .m4a - Counterpart formats .oga and .webma supported (see note below!)
  • Video: .m4v/.mp4, .flv - Counterpart formats .ogv and .webmv supported (see note below!)

IMPORTANT NOTE ON OGG AND WEBM COUNTERPART FORMATS:

The counterpart formats are not valid formats for Zenphoto itself and not recognized as items as that would confuse the management.

Therefore these formats can be uploaded via FTP only.The files need to have the same file name (beware the character case!). In single player usage, the player will check via the file system if a counterpart file exists and if counterpart support is enabled. Firefox seems to prefer the .oga and .ogv while Chrome .webma and .webmv

Since the flash fallback covers all essential formats this is not much of an issue for visitors though.

If you have problems with any format being recognized, you might need to tell your server about the mime types first. See examples on http://mediaelementjs.com under "installation".

Subtitle and chapter support for videos (NOTE: NOT IMPLEMENTED YET!)

It supports .srt files. Like the counterpart formats MUST be uploaded via FTP! They must follow this naming convention: subtitles file: <nameofyourvideo>_subtitles.srt chapters file: <name of your video>_chapters.srt

Example: yourvideo.mp4 with yourvideo_subtitles.srt and yourvideo_chapters.srt

Content Macro

Mediaelementjs attaches to the content_macro MEDIAPLAYER you can use within normal text of Zenpage pages or articles for example.

[MEDIAPLAYER <albumname> <imagefilename> <number> <width> <height>]

Example: [MEDIAPLAYER album1 video.mp4 400 300]

If you are using more than one player on a page you need to pass a 2nd parameter with for example an unique number:

[MEDIAPLAYER album1 video1.mp4 1]
[MEDIAPLAYER album2 video2.mp4 2]

NOTE:This player does not support external albums!

Playlist (beta)

Basic playlist support (adapted from Andrew Berezovsky – https://github.com/duozersk/mep-feature-playlist): Enable the option to load the playlist script support. Then call on your theme's album.php the method

$_zp_multimedia_extension->playlistPlayer();
echo $_zp_multimedia_extension->playlistPlayer('video','',''); //video playlist using all available .mp4, .m4v, .flv files only
echo $_zp_multimedia_extension->playlistPlayer('audio','',''); //audio playlist using all available .mp3, .m4a files only

Additionally you can set a specific albumname on the 2nd parameter to call a playlist outside of album.php

Notes: Mixed audio and video playlists are not possible. Counterpart formats are also not supported. Also the next playlist item does not automatically play.