videocontext
Advanced tools
Comparing version 0.15.3 to 0.17.0
{ | ||
"name": "videocontext", | ||
"version": "0.15.3", | ||
"version": "0.17.0", | ||
"description": "A WebGL & HTML5 graph based video composition library", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
@@ -52,2 +52,3 @@ //Matthew Shotton, R&D User Experience,© BBC 2015 | ||
this._insertTransitionInTimeline(transition); | ||
return true; | ||
} | ||
@@ -68,2 +69,23 @@ | ||
/** | ||
* Clear a transistion on the passed property that the specified time lies within. | ||
* | ||
* @param {String} propertyName - The name of the property to clear a transition on. | ||
* @param {number} time - A time which lies within the property you're trying to clear. | ||
*/ | ||
clearTransition(propertyName, time){ | ||
let transitionIndex = undefined; | ||
for (var i = 0; i < this._transitions[propertyName].length; i++) { | ||
let transition = this._transitions[propertyName][i]; | ||
if (time > transition.start && time < transition.end){ | ||
transitionIndex = i; | ||
} | ||
} | ||
if(transitionIndex !== undefined){ | ||
this._transitions[propertyName].splice(transitionIndex, 1); | ||
return true; | ||
} | ||
return false; | ||
} | ||
_update(currentTime){ | ||
@@ -70,0 +92,0 @@ super._update(currentTime); |
@@ -137,3 +137,2 @@ //Matthew Shotton, R&D User Experience,© BBC 2015 | ||
if (this._stretchPaused){ | ||
console.log("STRTCH PAUSING!!!"); | ||
this._element.pause(); | ||
@@ -140,0 +139,0 @@ } |
@@ -54,2 +54,4 @@ //Matthew Shotton, R&D User Experience,© BBC 2015 | ||
this.endOnLastSourceEnd = true; | ||
this._renderGraph = new RenderGraph(); | ||
@@ -637,3 +639,3 @@ this._sourceNodes = []; | ||
this._currentTime += dt * this._playbackRate; | ||
if(this._currentTime > this.duration){ | ||
if(this._currentTime > this.duration && this._endOnLastSourceEnd){ | ||
this._callCallbacks("ended"); | ||
@@ -640,0 +642,0 @@ this._state = VideoContext.STATE.ENDED; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2038475
11390