jhiesey / videostream

Play html5 video when from a file-like object
MIT License
243 stars 74 forks source link

Remove unexpected 'error' events #25

Closed feross closed 8 years ago

feross commented 8 years ago

The top-level VideoStream class isn't actually a stream, so the usual pattern of accepting an Error object in the destroy() method and emitting an 'error' event was surprising to me.

This PR changes VideoStream to no longer be an EventEmitter, and fires all errors on the media element directly. The muxer errors were already being handled this way, so this PR just does the same thing for the MediaSource errors.

This way the user doesn't need 2 sets of 'error' listeners (one on the media element and one on the stream) anymore.

feross commented 8 years ago

Updated based on your feedback. Want me to merge and publish?

jhiesey commented 8 years ago

I'll merge, but you can publish.

feross commented 8 years ago

Sure thing :)

On Sat, 13 Feb 2016 at 19:04 John Hiesey notifications@github.com wrote:

I'll merge, but you can publish.

— Reply to this email directly or view it on GitHub https://github.com/jhiesey/videostream/pull/25#issuecomment-183810418.

feross commented 8 years ago

Going with a minor release, since the bit about VideoStream being an EventEmitter was never documented or necessary to use.

2.1.0.