You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
npm install --save videojs-hlsjs-plugin
This gave the warning:
npm WARN deprecated [email protected]: Deprecated in favor of @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:
import videojs from "video.js";
import hlsPlugin from "videojs-hlsjs-plugin";
hlsPlugin.register(videojs);
I updated videojs-hlsjs-plugin to @streamroot/videojs-hlsjs-plugin and my video failed to load, throwing the error:
TypeError: hlsPlugin.register is not a function
I tried using require instead of import per the README, but got the same error:
import videojs from "video.js";
const hlsPlugin = require("@streamroot/videojs-hlsjs-plugin");
hlsPlugin.register(videojs);
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 like Hls.Events.MANIFEST_LOADED).
The text was updated successfully, but these errors were encountered:
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
).The text was updated successfully, but these errors were encountered: