New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

media-sequence

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

media-sequence - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

dist/media-sequence.min.js

4

bower.json
{
"name": "media-sequence",
"version": "0.1.0",
"version": "0.1.1",
"homepage": "https://github.com/oncletom/media-sequence",

@@ -8,3 +8,3 @@ "authors": [

],
"description": "Manual and automatic HTML5 media sequenced playback. And plain JavaScript, no library required.",
"description": "HTML5 media sequenced playback API: play one or multiple sequences of a same audio or video with plain JavaScript.",
"main": "index.js",

@@ -11,0 +11,0 @@ "moduleType": [

@@ -20,2 +20,6 @@ 'use strict';

this.scheduler = null;
this.mediaElement.addEventListener('timeupdate', this.runScheduler.bind(this));
this.sequences = [];

@@ -98,2 +102,6 @@

MediaSequence.prototype.runScheduler = function runScheduler(event){
return this.scheduler && this.scheduler.call(this.scheduler, event);
};
/**

@@ -111,3 +119,3 @@ *

var scheduler = new Scheduler(firstSequence, function onTimeupdate(currentTime){
this.scheduler = new Scheduler(firstSequence, function onTimeupdate(currentTime){
// the current sequence is not over yet, skip the beat.

@@ -131,3 +139,3 @@ if (currentTime < this.getSequence().end) {

selfie.emit('playall.postpone', nextSequence);
scheduler.postponeToSequenceEnd(nextSequence);
this.postponeToSequenceEnd(nextSequence);
return;

@@ -139,8 +147,6 @@ }

selfie.emit('playall.sequence', nextSequence);
scheduler.postponeToSequenceStart(nextSequence);
this.postponeToSequenceStart(nextSequence);
selfie.seek(nextSequence.start);
});
this.mediaElement.addEventListener('timeupdate', scheduler.bind(scheduler));
this.seek(firstSequence.start);

@@ -173,3 +179,3 @@ return this.play();

var scheduler = new Scheduler(endTime, function onTimeupdate(currentTime){
this.scheduler = new Scheduler(endTime, function onTimeupdate(currentTime){
if (currentTime >= this.getEndTime()) {

@@ -185,4 +191,2 @@ selfie.pause();

this.mediaElement.addEventListener('timeupdate', scheduler.bind(scheduler));
return this.play();

@@ -201,3 +205,11 @@ };

if (nextSequence) {
this.playFrom(nextSequence.start, nextSequence.end);
if (this.scheduler) {
this.emit('playnext.sequence', nextSequence);
this.scheduler.postponeToSequenceEnd(nextSequence);
this.seek(nextSequence.start);
this.play();
}
else {
this.playFrom(nextSequence.start, nextSequence.end);
}
}

@@ -204,0 +216,0 @@

@@ -17,3 +17,3 @@ 'use strict';

if (result === true){
event.target.removeEventListener('timeupdate', this);
onTimeupdate = function(){};
}

@@ -20,0 +20,0 @@ };

{
"name": "media-sequence",
"version": "0.1.0",
"description": "Manual and automatic HTML5 media sequenced playback. And plain JavaScript, no library required.",
"version": "0.1.1",
"description": "HTML5 media sequenced playback API: play one or multiple sequences of a same audio or video with plain JavaScript.",
"main": "./index.js",

@@ -33,3 +33,3 @@ "scripts": {

"chai": "^1.9.1",
"karma": "git+https://github.com/karma-runner/karma.git#c071305b08f0dcb3cac1b9a04e6feefbbde13882",
"karma": "^0.12.16",
"karma-bro": "^0.5.0",

@@ -36,0 +36,0 @@ "karma-chai": "^0.1.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc