@antmedia/web_player 2.11.1 → 2.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/browser/web_player.js +4 -6
  2. package/dist/es/{plugin-ca799d0d.js → plugin-50e1316e.js} +134 -144
  3. package/dist/es/{video.es-0951ae41.js → video.es-be70c095.js} +36 -41
  4. package/dist/es/{videojs-webrtc-plugin-327afa5e.js → videojs-webrtc-plugin-7054aa21.js} +1 -1
  5. package/dist/es/videojs-webrtc-plugin-f56e1f9e.js +3 -0
  6. package/dist/es/{video.es-22056625.js → videojs-webrtc-plugin.es-2a0dfc29.js} +14968 -5052
  7. package/dist/es/videojs-webrtc-plugin.es-333788d9.js +7673 -0
  8. package/dist/es/{videojs-webrtc-plugin.es-f41400f7.js → videojs-webrtc-plugin.es-777bf41a.js} +1747 -1697
  9. package/dist/es/{videojs-webrtc-plugin.es-bd0b1a6d.js → videojs-webrtc-plugin.es-9544f6e0.js} +1563 -1672
  10. package/dist/es/web_player.js +7 -9
  11. package/dist/index.d.ts +17 -1
  12. package/dist/{plugin-84ab2cdd.js → plugin-bec9dc4a.js} +136 -146
  13. package/dist/{video.es-474303e7.js → video.es-df9af03d.js} +36 -43
  14. package/dist/{videojs-webrtc-plugin-bdf9fa8b.js → videojs-webrtc-plugin-3becde8c.js} +1 -1
  15. package/dist/videojs-webrtc-plugin-77a9860b.js +5 -0
  16. package/dist/{videojs-webrtc-plugin.es-72234e77.js → videojs-webrtc-plugin.es-0787d11e.js} +1575 -1684
  17. package/dist/{video.es-72122d04.js → videojs-webrtc-plugin.es-493b195e.js} +14964 -5052
  18. package/dist/videojs-webrtc-plugin.es-8f4ea4e4.js +7675 -0
  19. package/dist/{videojs-webrtc-plugin.es-ac81d249.js → videojs-webrtc-plugin.es-ee6d0333.js} +1757 -1707
  20. package/dist/web_player.js +7 -9
  21. package/package.json +3 -5
  22. package/rollup.config.module.cjs +6 -2
  23. package/src/web_player.js +4 -6
  24. package/test/embedded-player.test.js +1 -1
  25. package/tsconfig.json +0 -1
  26. package/dist/aframe-master-42bb78a9.js +0 -7139
  27. package/dist/dash.all.min-84806d51.js +0 -36
  28. package/dist/es/aframe-master-a6146619.js +0 -7137
  29. package/dist/es/dash.all.min-4a2772b6.js +0 -34
  30. package/dist/es/inheritsLoose-91dc2acc.js +0 -15
  31. package/dist/es/video-js.min-8b4dfe88.js +0 -3
  32. package/dist/es/videojs-contrib-quality-levels.es-1ea32822.js +0 -276
  33. package/dist/es/videojs-contrib-quality-levels.es-5f5b5f23.js +0 -287
  34. package/dist/es/videojs-hls-quality-selector.es-3c54e1cd.js +0 -391
  35. package/dist/es/videojs-webrtc-plugin-b9e4da27.js +0 -3
  36. package/dist/inheritsLoose-281376c7.js +0 -17
  37. package/dist/video-js.min-7e4ae47a.js +0 -5
  38. package/dist/videojs-contrib-quality-levels.es-6c3be3eb.js +0 -278
  39. package/dist/videojs-contrib-quality-levels.es-ef3cec9e.js +0 -289
  40. package/dist/videojs-hls-quality-selector.es-562309df.js +0 -393
  41. package/dist/videojs-webrtc-plugin-d30c3e7a.js +0 -5
@@ -706,12 +706,12 @@ class WebPlayer {
706
706
  }
707
707
  loadWebRTCComponents() {
708
708
  if (this.playOrder.includes("webrtc")) {
709
- return Promise.resolve().then(function () { return require('./videojs-webrtc-plugin-bdf9fa8b.js'); }).then(css => {
709
+ return Promise.resolve().then(function () { return require('./videojs-webrtc-plugin-77a9860b.js'); }).then(css => {
710
710
  Logger_1.info("videojs-webrtc-plugin.css is loaded");
711
711
  var styleElement = this.dom.createElement('style');
712
712
  styleElement.textContent = css.default.toString(); // Assuming css module exports a string
713
713
  this.dom.head.appendChild(styleElement);
714
- return Promise.resolve().then(function () { return require('./videojs-webrtc-plugin.es-72234e77.js'); }).then(videojsWebrtcPluginLocal => {
714
+ return Promise.resolve().then(function () { return require('./videojs-webrtc-plugin.es-ee6d0333.js'); }).then(videojsWebrtcPluginLocal => {
715
715
  Logger_1.info("videojs-webrtc-plugin is loaded");
716
716
  });
717
717
  });
@@ -732,14 +732,12 @@ class WebPlayer {
732
732
  styleElement.textContent = css.default.toString(); // Assuming css module exports a string
733
733
  this.dom.head.appendChild(styleElement);
734
734
  }).then(() => {
735
- return Promise.resolve().then(function () { return require('./video.es-474303e7.js'); }).then(function (n) { return n.video_es; });
735
+ return Promise.resolve().then(function () { return require('./video.es-df9af03d.js'); });
736
736
  }).then(videojs => {
737
737
  window.videojs = videojs.default;
738
738
  this.videojsLoaded = true;
739
739
  }).then(() => {
740
- return Promise.resolve().then(function () { return require('./videojs-contrib-quality-levels.es-6c3be3eb.js'); });
741
- }).then(() => {
742
- return Promise.resolve().then(function () { return require('./plugin-84ab2cdd.js'); });
740
+ return Promise.resolve().then(function () { return require('./plugin-bec9dc4a.js'); });
743
741
  }).then(() => {
744
742
  return this.loadWebRTCComponents();
745
743
  });
@@ -802,7 +800,7 @@ class WebPlayer {
802
800
  this.videojsPlayer.pause();
803
801
  setTimeout(() => {
804
802
  this.videojsPlayer.play();
805
- }, 1000);
803
+ }, 2000);
806
804
  }
807
805
  }
808
806
 
@@ -929,8 +927,8 @@ class WebPlayer {
929
927
  };
930
928
  this.videojsPlayer.ready(() => {
931
929
  // If it's already added to player, no need to add again
932
- if (typeof this.videojsPlayer.hlsQualitySelector === "function") {
933
- this.videojsPlayer.hlsQualitySelector({
930
+ if (typeof this.videojsPlayer.qualitySelectorHls === "function") {
931
+ this.videojsPlayer.qualitySelectorHls({
934
932
  displayCurrentQuality: true
935
933
  });
936
934
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antmedia/web_player",
3
- "version": "2.11.1",
3
+ "version": "2.11.2",
4
4
  "description": "Ant Media Server Player that can play WebRTC, HLS, DASH",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/es/index.js",
@@ -29,16 +29,14 @@
29
29
  },
30
30
  "license": "ISC",
31
31
  "dependencies": {
32
- "@antmedia/videojs-webrtc-plugin": "^1.3.0",
32
+ "@antmedia/videojs-webrtc-plugin": "^1.3.1",
33
33
  "@antmedia/webrtc_adaptor": "^2.11.3",
34
34
  "@rollup/plugin-json": "6.1.0",
35
- "@types/videojs-contrib-quality-levels": "^2.0.4",
36
35
  "aframe": "1.5.0",
37
36
  "dashjs": "^4.7.4",
38
37
  "rimraf": "^5.0.5",
39
38
  "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"
42
40
  },
43
41
  "devDependencies": {
44
42
  "@babel/core": "^7.21.5",
@@ -23,8 +23,12 @@ const builds = {
23
23
  }
24
24
  ],
25
25
  plugins: [
26
- babel({ babelHelpers: 'bundled' }),
27
- nodeResolve(),
26
+ babel({
27
+ babelHelpers: 'bundled'
28
+ }),
29
+ nodeResolve({
30
+ dedupe: ['video.js']
31
+ }),
28
32
  commonjs(),
29
33
  json(),
30
34
  css(),
package/src/web_player.js CHANGED
@@ -237,7 +237,6 @@ export class WebPlayer {
237
237
 
238
238
  // Initialize default values
239
239
  this.setDefaults();
240
-
241
240
 
242
241
  // Check if the first argument is a config object or a Window object
243
242
  if (!this.isWindow(configOrWindow)) {
@@ -501,8 +500,7 @@ export class WebPlayer {
501
500
  window.videojs = videojs.default;
502
501
  this.videojsLoaded = true;
503
502
  })
504
- .then(() => { return import('videojs-contrib-quality-levels') } )
505
- .then(() => { return import('videojs-hls-quality-selector') } )
503
+ .then(() => { return import('videojs-quality-selector-hls') } )
506
504
  .then(() => { return this.loadWebRTCComponents(); });
507
505
  }
508
506
  else {
@@ -575,7 +573,7 @@ export class WebPlayer {
575
573
  this.videojsPlayer.pause();
576
574
  setTimeout(() => {
577
575
  this.videojsPlayer.play();
578
- }, 1000);
576
+ }, 2000);
579
577
  }
580
578
  }
581
579
 
@@ -733,8 +731,8 @@ export class WebPlayer {
733
731
  this.videojsPlayer.ready(() => {
734
732
 
735
733
  // If it's already added to player, no need to add again
736
- if (typeof this.videojsPlayer.hlsQualitySelector === "function") {
737
- this.videojsPlayer.hlsQualitySelector({
734
+ if (typeof this.videojsPlayer.qualitySelectorHls === "function") {
735
+ this.videojsPlayer.qualitySelectorHls({
738
736
  displayCurrentQuality: true,
739
737
  });
740
738
  }
@@ -785,7 +785,7 @@ describe("WebPlayer", function() {
785
785
  expect(playMethod.calledOnce).to.be.false;
786
786
 
787
787
 
788
- clock.tick(1500);
788
+ clock.tick(2500);
789
789
 
790
790
  expect(pauseMethod.calledOnce).to.be.true;
791
791
  expect(playMethod.calledOnce).to.be.true;
package/tsconfig.json CHANGED
@@ -21,7 +21,6 @@
21
21
  "node_modules/@types"
22
22
  ],
23
23
  "paths": {
24
- "videojs-contrib-quality-levels": ["./node_modules/@types/videojs-contrib-quality-levels/index.d.ts"]
25
24
  }
26
25
  }
27
26
  }