rtsp-relay
rtsp-relay copied to clipboard
Making available offline
Hi! Thanks for the great library @k-yle I have a use case that involves using the browser while being offline. It would be great if we could include the original jsmpeg library as a dependency so that it doesn't look for the CDN and fail when offline.
Currently I use a work around where I just have the original minified jsmpeg source in a separate js file as browser file checks if it is avaliable.
if (window.JSMpeg) {
resolve(); // already loaded
return;
}
Hi @kyeshmz, jsmpeg isn't available on npm so we can't easily bundle it, besides from copy-pasting the js file. This is something we should consider though.
For now, if you want to use a local copy of jsmpeg, you can load it using <script src="./path/to/jsmpeg.js"></script>. As you've discovered, rtsp-relay is designed to use the version of jsmpeg that you've loaded yourself.
I was thinking of just adding it as a git submodule or something like that and like to the github avaliable