Skip to content

Commit 39c4a24

Browse files
committed
Fix duplicate videojs, change hls quality selector
1 parent dcbd073 commit 39c4a24

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antmedia/web_player",
3-
"version": "2.11.1",
3+
"version": "2.11.2",
44
"description": "Ant Media Server Player that can play WebRTC, HLS, DASH",
55
"main": "dist/index.js",
66
"module": "dist/es/index.js",
@@ -32,13 +32,11 @@
3232
"@antmedia/videojs-webrtc-plugin": "^1.3.0",
3333
"@antmedia/webrtc_adaptor": "^2.11.3",
3434
"@rollup/plugin-json": "6.1.0",
35-
"@types/videojs-contrib-quality-levels": "^2.0.4",
3635
"aframe": "1.5.0",
3736
"dashjs": "^4.7.4",
3837
"rimraf": "^5.0.5",
3938
"video.js": "^8.17.3",
40-
"videojs-contrib-quality-levels": "^4.1.0",
41-
"videojs-hls-quality-selector": "^2.0.0"
39+
"videojs-quality-selector-hls": "^1.1.1"
4240
},
4341
"devDependencies": {
4442
"@babel/core": "^7.21.5",

rollup.config.module.cjs

+6-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ const builds = {
2323
}
2424
],
2525
plugins: [
26-
babel({ babelHelpers: 'bundled' }),
27-
nodeResolve(),
26+
babel({
27+
babelHelpers: 'bundled'
28+
}),
29+
nodeResolve({
30+
dedupe: ['video.js']
31+
}),
2832
commonjs(),
2933
json(),
3034
css(),

src/web_player.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ export class WebPlayer {
238238
// Initialize default values
239239
this.setDefaults();
240240

241+
Logger.info("config object mode-----");
241242

242243
// Check if the first argument is a config object or a Window object
243244
if (!this.isWindow(configOrWindow)) {
@@ -501,8 +502,7 @@ export class WebPlayer {
501502
window.videojs = videojs.default;
502503
this.videojsLoaded = true;
503504
})
504-
.then(() => { return import('videojs-contrib-quality-levels') } )
505-
.then(() => { return import('videojs-hls-quality-selector') } )
505+
.then(() => { return import('videojs-quality-selector-hls') } )
506506
.then(() => { return this.loadWebRTCComponents(); });
507507
}
508508
else {
@@ -733,8 +733,8 @@ export class WebPlayer {
733733
this.videojsPlayer.ready(() => {
734734

735735
// If it's already added to player, no need to add again
736-
if (typeof this.videojsPlayer.hlsQualitySelector === "function") {
737-
this.videojsPlayer.hlsQualitySelector({
736+
if (typeof this.videojsPlayer.qualitySelectorHls === "function") {
737+
this.videojsPlayer.qualitySelectorHls({
738738
displayCurrentQuality: true,
739739
});
740740
}

tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"node_modules/@types"
2222
],
2323
"paths": {
24-
"videojs-contrib-quality-levels": ["./node_modules/@types/videojs-contrib-quality-levels/index.d.ts"]
2524
}
2625
}
2726
}

0 commit comments

Comments
 (0)