I have a videocontext graph that sometimes produces this error on loading
Uncaught TypeError: Cannot set property 'playbackRate' of undefined
This error occurs in videonode.js if, on loading, this._startTime === this._currentTime, This prevents this._load() being called before this._state is set to playing in sourcenode.js
I have a videocontext graph that sometimes produces this error on loading
Uncaught TypeError: Cannot set property 'playbackRate' of undefined
This error occurs in
videonode.js
if, on loading,this._startTime === this._currentTime
, This preventsthis._load()
being called beforethis._state
is set toplaying
insourcenode.js
this._load
is only called ifthis._startTime - this._currentTime < this._preloadTime
(https://github.com/bbc/VideoContext/blob/master/src/SourceNodes/videonode.js#L172), so this can be fixed by changing this condition to "less than or equal to"this._startTime - this._currentTime <= this._preloadTime
Or, if the bug is that
playing
is set prematurely, you could update the condition that sets the playing state https://github.com/bbc/VideoContext/blob/master/src/SourceNodes/sourcenode.js#L354 to be less than (but not equal to)