Git Product home page Git Product logo

mediaelement-markers's Introduction

MediaElement Markers : Markers on the Progress bar

MediaElement marker

Author - Harshita Kasera
license

Official plugin for Mediaelement.js

Introduction

MediaElement-Markers is a MediaElement.js plugin that lets you add Visual Cues in the progress time rail. This plugin also lets you register a custom callback function that will be called everytime the play position reaches a marker. Marker position and a reference to the MediaElement Player object is passed to the registered callback function for any post processing. Marker color is configurable.

This plugin is now merged to the Mediaelement repository.

Demo

Click here to see a working demo of the plugin.

Credits

Thanks to John Dyer, creator of MediaElement Player

Installation & Usage

Installation

<script src="jquery.js"></script>
<script src="mediaelement-and-player.min.js"></script>
<script src="mep-feature-markers.js"></script>
<link rel="stylesheet" href="mediaelementplayer.css" />

Usage

$('#player').mediaelementplayer({
    features: ['playpause','current','progress','duration','markers'], //Adding the feature 'markers' enables this plugin
    markerColor: '#FCD730', // Optional : Specify the color of the marker
    markers:['4','16','20','25','35','40'], // Specify marker times in seconds 
    markerCallback:function(media,time){ // Callback function invoked when a marker position is reached
       /* Your Code */
    }
});

Testing

*IE7 - Flash 
*IE8 - Flash
IE9, IE10 - MP4
Firefox - Ogv
Chrome - Webm
Safari - MP4

* Note Markers will appear only after Play in IE7 and IE8 due to the limitation in Flash Player.

Version History

2.0.0 (2013/04/03)
   Added fullscreen support

1.0.0 (2013/01/14)
   Initial release

mediaelement-markers's People

Contributors

hkasera avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

ahmed-rafiullah

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.