rtsp-relay icon indicating copy to clipboard operation
rtsp-relay copied to clipboard

Making available offline

Open kyeshmz opened this issue 4 years ago • 2 comments

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;
      }

kyeshmz avatar Nov 26 '21 04:11 kyeshmz

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.

k-yle avatar Nov 27 '21 23:11 k-yle

I was thinking of just adding it as a git submodule or something like that and like to the github avaliable

kyeshmz avatar Nov 30 '21 07:11 kyeshmz