diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2014-12-30 03:07:02 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2014-12-30 03:07:02 +0300 |
commit | 3db656bd9b427339bcbd1ec38b0fe2e50d5588e8 (patch) | |
tree | fb54409d5ad8456065dff76866a6f19b375bb531 /lib | |
parent | 4b7bb145371e2be6910d8e324bc18b151e060473 (diff) |
propagate initial mediasource errors
Diffstat (limited to 'lib')
-rw-r--r-- | lib/video-stream.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/video-stream.js b/lib/video-stream.js index b799513..821b044 100644 --- a/lib/video-stream.js +++ b/lib/video-stream.js @@ -45,10 +45,13 @@ function VideoStream (video, opts) { VideoStream.prototype._write = function (chunk, encoding, cb) { var self = this - if (!self._sourceBuffer) - return self._cb = function () { + if (!self._sourceBuffer) { + self._cb = function (err) { + if (err) return cb(err) self._write(chunk, encoding, cb) } + return + } if (self._sourceBuffer.updating) return cb(new Error('Cannot append buffer while source buffer updating')) |