@viewlift/player-backup 1.0.1-lighteningjs → 1.0.1

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 (120) hide show
  1. package/cjs/autoNextVideo-823821e8.js +1 -0
  2. package/cjs/bundle.css +657 -0
  3. package/cjs/caption-settings-67212c17.js +1 -0
  4. package/cjs/caption-settings-d42c056e.js +1 -0
  5. package/cjs/debugSelection-cbfdabb7.js +1 -0
  6. package/cjs/dvr_skin-f7f770ae.js +1 -0
  7. package/cjs/error-26d5a3c3.js +1 -0
  8. package/cjs/features-164c3cc6.js +1 -0
  9. package/cjs/generic-8b99b151.js +1 -0
  10. package/cjs/icons-7afb9c13.js +1 -0
  11. package/cjs/index-3dfe6459.js +1 -0
  12. package/cjs/index.js +1 -0
  13. package/cjs/keyboardShortcuts-cfd998c2.js +1 -0
  14. package/cjs/loader-393b838a.js +1 -0
  15. package/cjs/multicam-21c9a90b.js +1 -0
  16. package/cjs/multicam-a41fe4a6.js +1 -0
  17. package/cjs/multicamv2-76d8530b.js +1 -0
  18. package/cjs/multicamv2-c148fa24.js +1 -0
  19. package/cjs/mwebPotrait-3c11d7cf.js +1 -0
  20. package/cjs/mwebPotraitTray-b9d5d45a.js +1 -0
  21. package/cjs/nextEpisodeButton-300afadc.js +1 -0
  22. package/cjs/nextEpisodeButton-b6e6586f.js +1 -0
  23. package/cjs/nondvr_skin-ef2cb3b2.js +1 -0
  24. package/cjs/playlist-925f808b.js +1 -0
  25. package/cjs/playlist-df87ca90.js +1 -0
  26. package/cjs/renditions-bc841552.js +1 -0
  27. package/cjs/resolution-6a9adf54.js +1 -0
  28. package/cjs/series-82ec79d3.js +1 -0
  29. package/cjs/series-9c237975.js +1 -0
  30. package/cjs/series-v2-24855152.js +1 -0
  31. package/cjs/series-v2-70137d8c.js +1 -0
  32. package/cjs/settings-icon-a63f46fc.js +1 -0
  33. package/cjs/settings-icon-e6a8feee.js +1 -0
  34. package/cjs/skin-095cc078.js +1 -0
  35. package/cjs/skin-225252ff.js +1 -0
  36. package/cjs/skin-39ab30e2.js +1 -0
  37. package/cjs/skin-84083352.js +1 -0
  38. package/cjs/skin-93a3e5ae.js +1 -0
  39. package/cjs/skin-983a2ea7.js +1 -0
  40. package/cjs/skin-afbec6d7.js +1 -0
  41. package/cjs/skin-ec49b877.js +1 -0
  42. package/cjs/skin-f225a42e.js +1 -0
  43. package/cjs/skin-fb394911.js +1 -0
  44. package/cjs/util-fa21734a.js +1 -0
  45. package/cjs/videoSelector-01a9ef43.js +1 -0
  46. package/cjs/videoSelector-fcdf11eb.js +1 -0
  47. package/esm/autoNextVideo-1672740e.js +1 -0
  48. package/esm/bundle.css +657 -0
  49. package/esm/caption-settings-2e47813b.js +1 -0
  50. package/esm/caption-settings-3eacf3a0.js +1 -0
  51. package/esm/debugSelection-2601b8b3.js +1 -0
  52. package/esm/dvr_skin-9cc1b144.js +1 -0
  53. package/esm/error-2395864b.js +1 -0
  54. package/esm/features-f86404ce.js +1 -0
  55. package/esm/generic-7c43020f.js +1 -0
  56. package/esm/icons-c18c70b7.js +1 -0
  57. package/esm/index-9f022e82.js +1 -0
  58. package/esm/index.js +1 -0
  59. package/esm/keyboardShortcuts-c06f3c7b.js +1 -0
  60. package/esm/loader-580278fe.js +1 -0
  61. package/esm/multicam-94da3759.js +1 -0
  62. package/esm/multicam-de741974.js +1 -0
  63. package/esm/multicamv2-0105c40f.js +1 -0
  64. package/esm/multicamv2-d006cffa.js +1 -0
  65. package/esm/mwebPotrait-3c1805d8.js +1 -0
  66. package/esm/mwebPotraitTray-5ab39989.js +1 -0
  67. package/esm/nextEpisodeButton-2ea69b56.js +1 -0
  68. package/esm/nextEpisodeButton-a1556cdf.js +1 -0
  69. package/esm/nondvr_skin-64be70e5.js +1 -0
  70. package/esm/playlist-032fbbf3.js +1 -0
  71. package/esm/playlist-7ecf432a.js +1 -0
  72. package/esm/renditions-97276745.js +1 -0
  73. package/esm/resolution-38cd4f5c.js +1 -0
  74. package/esm/series-041152aa.js +1 -0
  75. package/esm/series-977edced.js +1 -0
  76. package/esm/series-v2-0727ee8c.js +1 -0
  77. package/esm/series-v2-516c91c2.js +1 -0
  78. package/esm/settings-icon-0125bffd.js +1 -0
  79. package/esm/settings-icon-2b713fbf.js +1 -0
  80. package/esm/skin-2c638dc1.js +1 -0
  81. package/esm/skin-42c2f81d.js +1 -0
  82. package/esm/skin-5e2fa9d4.js +1 -0
  83. package/esm/skin-6093bfb3.js +1 -0
  84. package/esm/skin-60a41d44.js +1 -0
  85. package/esm/skin-665ec17e.js +1 -0
  86. package/esm/skin-93e320fc.js +1 -0
  87. package/esm/skin-b939c35e.js +1 -0
  88. package/esm/skin-cd537931.js +1 -0
  89. package/esm/skin-d5510f70.js +1 -0
  90. package/esm/util-d9f5a7be.js +1 -0
  91. package/esm/videoSelector-8889c58e.js +1 -0
  92. package/esm/videoSelector-8e258d45.js +1 -0
  93. package/package.json +15 -31
  94. package/.babelrc +0 -8
  95. package/.browserslistrc +0 -2
  96. package/README.md +0 -29
  97. package/babel.config.json +0 -8
  98. package/dist/index.cjs.css +0 -2
  99. package/dist/index.cjs.css.map +0 -1
  100. package/dist/index.cjs.js +0 -1
  101. package/dist/index.d.ts +0 -45
  102. package/dist/index.esm.css +0 -2
  103. package/dist/index.esm.css.map +0 -1
  104. package/dist/index.esm.js +0 -1
  105. package/dist/main-player/player-ui.d.ts +0 -19
  106. package/dist/player-components/player-buttons/playerButtons.d.ts +0 -38
  107. package/dist/player-components/player-seekbar/playerSeekbar.d.ts +0 -25
  108. package/dist/player-ui/player-ui.d.ts +0 -18
  109. package/dist/playerInitializer.d.ts +0 -13
  110. package/rollup.config.mjs +0 -37
  111. package/src/index.ts +0 -242
  112. package/src/main-player/player-ui.ts +0 -65
  113. package/src/player-components/player-buttons/playerButtons.css +0 -0
  114. package/src/player-components/player-buttons/playerButtons.ts +0 -127
  115. package/src/player-components/player-seekbar/playerSeekbar.css +0 -75
  116. package/src/player-components/player-seekbar/playerSeekbar.ts +0 -158
  117. package/src/player-ui/player-ui.css +0 -8
  118. package/src/player-ui/player-ui.ts +0 -79
  119. package/src/playerInitializer.ts +0 -54
  120. package/tsconfig.json +0 -14
@@ -1,79 +0,0 @@
1
- import { Button } from '../player-components/player-buttons/playerButtons';
2
- import { PlayerSeekbar } from '../player-components/player-seekbar/playerSeekbar';
3
- import './player-ui.css';
4
-
5
-
6
- class VideoPlayerUI {
7
- private player: { video: HTMLVideoElement; play: () => void; pause: () => void };
8
- private container: HTMLDivElement;
9
- private playPauseBtn?: Button;
10
- private seekbar?: PlayerSeekbar;
11
-
12
- constructor({ player }: { player: { video: HTMLVideoElement; play: () => void; pause: () => void } }) {
13
- this.player = player;
14
- this.container = document.createElement('div');
15
- this.container.className = 'video-player-ui';
16
- this.createControls();
17
- }
18
-
19
- private createControls() {
20
-
21
- this.playPauseBtn = new Button({
22
- imgSrc: '',
23
- imgAltText: 'Play/Pause',
24
- buttonText: 'Play',
25
- width: 80,
26
- height: 40,
27
- klassname: 'play-pause-btn',
28
- focused: false,
29
- disabled: false,
30
- handleClick: () => {
31
- if (this.player.video.paused) {
32
- this.player.play();
33
- if (this.playPauseBtn && this.playPauseBtn.buttonElement) {
34
- this.playPauseBtn.buttonElement.textContent = 'Pause';
35
- }
36
- } else {
37
- this.player.pause();
38
- if (this.playPauseBtn && this.playPauseBtn.buttonElement) {
39
- this.playPauseBtn.buttonElement.textContent = 'Play';
40
- }
41
- }
42
- }
43
- });
44
- this.playPauseBtn.mount(this.container);
45
- // Attach the video element
46
- this.container.appendChild(this.player.video);
47
- // Add the seekbar below the video
48
- this.seekbar = new PlayerSeekbar(this.player.video);
49
- this.seekbar.mount(this.container);
50
-
51
- if (this.playPauseBtn?.buttonElement && this.seekbar) {
52
- // Down arrow from play button focuses seekbar
53
- this.playPauseBtn.buttonElement.addEventListener('keydown', (e: KeyboardEvent) => {
54
- if (e.key === 'ArrowDown') {
55
- e.preventDefault();
56
- this.seekbar?.focus();
57
- }
58
- });
59
-
60
- // Up arrow from seekbar focuses play button
61
- this.seekbar?.getElement()?.addEventListener('keydown', (e: KeyboardEvent) => {
62
- if (e.key === 'ArrowUp') {
63
- e.preventDefault();
64
- this.playPauseBtn?.focus();
65
- }
66
- });
67
- }
68
- }
69
-
70
- attachTo(parent: HTMLElement) {
71
- parent.appendChild(this.container);
72
- }
73
-
74
- public getElement() {
75
- return this.container;
76
- }
77
- }
78
-
79
- export default VideoPlayerUI;
@@ -1,54 +0,0 @@
1
- import VideoPlayerUI from './player-ui/player-ui';
2
-
3
- // Declare Hls type for CDN usage
4
- declare global {
5
- interface Window {
6
- Hls: any;
7
- }
8
- }
9
-
10
- export interface PlayerInstance {
11
- video: HTMLVideoElement;
12
- play: () => void;
13
- pause: () => void;
14
- ui: VideoPlayerUI;
15
- }
16
-
17
- export function createHlsPlayer(
18
- mountPoint: HTMLElement,
19
- streamUrl: string
20
- ): PlayerInstance {
21
- const video = document.createElement('video');
22
- video.controls = false;
23
- video.style.width = '100%';
24
- video.style.height = '100%';
25
-
26
- let hls: any = null;
27
-
28
- if (window.Hls && window.Hls.isSupported()) {
29
- hls = new window.Hls();
30
- hls.loadSource(streamUrl);
31
- hls.attachMedia(video);
32
- hls.on(window.Hls.Events.MANIFEST_PARSED, function () {
33
- video.play();
34
- });
35
- } else if (video.canPlayType('application/vnd.apple.mpegurl')) {
36
- video.src = streamUrl;
37
- video.addEventListener('loadedmetadata', function () {
38
- video.play();
39
- });
40
- } else {
41
- throw new Error('HLS is not supported in this browser.');
42
- }
43
-
44
- const player = {
45
- video,
46
- play: () => video.play(),
47
- pause: () => video.pause(),
48
- };
49
-
50
- const ui = new VideoPlayerUI({ player });
51
- ui.attachTo(mountPoint);
52
-
53
- return { ...player, ui };
54
- }
package/tsconfig.json DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES5",
4
- "module": "ESNext",
5
- "declaration": true,
6
- "outDir": "dist",
7
- "strict": true,
8
- "esModuleInterop": true,
9
- "moduleResolution": "node",
10
- "skipLibCheck": true,
11
- "lib": ["dom", "es2017"]
12
- },
13
- "include": ["src/**/*"]
14
- }