Skip to content
This repository has been archived by the owner on Nov 11, 2017. It is now read-only.

Build as a library that can be used externally #15

Closed
wants to merge 3 commits into from

Conversation

andyjcross
Copy link

Greetings -
This project works great and I thought it'd be cool to make it usable in other projects.
I'm new to gulp, so I can't guarantee that the build tasks are ideal, but it is now creating a single redistributable file that has everything mpegts needs to run (including the WebWorker code) built in. I've tried to minimize changes to existing code. There's an example usage of the library in index-lib.html.

Thanks!
Andy

Andrew Cross added 2 commits March 19, 2015 11:57
…le for using mpegts as an external library
…he player that stops the video and terminates the worker.
@RReverser
Copy link
Owner

I don't really see what exact problem this PR solves while adding additional complexity through yet another dependency management (Bower). This library is already exposed to npm and can be used externally from there, and is very well built with browserify/webpack/whatever.

@andyjcross
Copy link
Author

The addition of bower wasn't totally necessary, for sure, but the idea of the PR is to package up the library to be used externally in websites (i.e. not in a node.js environment). The existing browser example had a bit of necessary glue code that is now nicely encapsulated - all you need to do is create a canvas and decorate it with the HLSPlayer() method.

I totally get it if this obscures the purpose here (demoing the technique), so definitely disregard the PR if it's not worth it.

@RReverser
Copy link
Owner

Well, I like the separate HLSPlayer, but I don't really want to use any extra dependency manager nor builder in this example.

@andyjcross andyjcross closed this Mar 27, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants