Open stevendesu opened 5 years ago
https://github.com/streamroot/videojs-hlsjs-plugin/pull/94
Probably caused by this, anyway since you forked anyway you can revert this change on your fork I guess.
About the full source code you can use NPM feature to add git dependency on a certain release tag or branch of any repo.
For some context our CI and delivery for this script is majorly as a web script and since umd
export will not "activate" when client has amd
on his page (require.js
) it breaks our intended use case...
Previously I was using a fork of the
videojs-hlsjs-plugin
library in my project so I could update HLS.js and make a few tweaks to the code.I noticed recently that subtitles weren't working (at all) for me, so I decided to try using the latest version of the plugin to see if maybe it's a bug that was fixed, or an incompatibility between my version of the plugin and my version of HLS.js.
At first I installed like so:
This gave the warning:
So I tried out
@streamroot/videojs-hlsjs-plugin
:In my initialization code (I'm using Webpack for building, so ES6 imports work just fine) I originally had the following code, which was working with my fork:
I updated
videojs-hlsjs-plugin
to@streamroot/videojs-hlsjs-plugin
and my video failed to load, throwing the error:I tried using
require
instead ofimport
per the README, but got the same error:At this point I can't get version 1.0.13 of the plugin to work.
Unrelated to the lack of functioning, but related to my reason for forking: Could the package on NPM be updated to include the full source code of the plugin, instead of just a minified and compiled mess? When including the plugin via a
<script>
tag, yes, it makes sense to have the whole bundle combined like that. However I can do my own minification after the fact, and if the original source were made available in the package then Webpack could de-duplicate dependencies between my code and yours (for instance, in a few places where I register HLS.js event listeners, I have to import HLS.js to access constants likeHls.Events.MANIFEST_LOADED
).