šŸ”” Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

jQuery plugin for creating video and audio sequences with media source extensions.

HTML5 Plugins Video_Audio

Documentation

jquery.videosequence

Build Status

jQuery plugin for creating video and audio sequences with media source extensions.

Counter

Prerequisites

To avoid stress, please read before using http://wiki.webmproject.org/adaptive-streaming/instructions-to-playback-a-webm-dash-presentation.

Installation

bower install jquery.videosequence 

Usage

With JavaScript:

$('video').videosequence([   {source: '/video-1.webm', timestampOffset: 0},   {source: '/video-2.webm', timestampOffset: 10},   {source: '/video-3.webm', timestampOffset: 20} ]);  $('audio').audiosequence([   {source: '/audio-1.webm', timestampOffset: 0},   {source: '/audio-2.webm', timestampOffset: 10},   {source: '/audio-3.webm', timestampOffset: 20} ]);

Or with data-* attributes:

<video data-rel='videosequence'     data-videosequence-sources='["video-1.webm","video-2.webm","video-3.webm"]'     data-videosequence-offsets='[0,10,20]'></video>  <audio data-rel="audiosequence"     data-audiosequence-sources='["audio-1.webm","audio-2.webm","audio-3.webm"]'     data-audiosequence-offsets='[0,10,20]'></audio>

Normally the initialization with data-* attrs is started on ready (http://api.jquery.com/ready/). But you can also start the initialization manually:

$(document).trigger('videosequence:initialize'); $(document).trigger('audiosequence:initialize');

Testing

Specs

npm install npm install -g bower bower install npm test

Integration

Since MSE is still a bleeding edge technology, there is no way to actually assert that it works, except to try it out in a browser.

The integration specs are not run in the Tranis-CI. Please make sure they all pass in your browser before submitting a pull-request.

  • Go to test/integration.
  • Start test app server with node app.js.
  • Open http://localhost:3000 in a browser supporting media source extensions.
  • You should see a movie counter starting with 5 and counting down to 2 and at 1 it should display an alert.
  • You should also hear the corresponding beeping sound.
  • Then after an alert saying "Now audio!" you should hear 5 times only the sound.
  • After the 5th beeping sound a second alerts says "Done!".

Building

npm install -g gulp gulp build

MIT-License

Copyright 2014 Kostiantyn Kahanskyi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


You May Also Like