myetv-player 1.1.6 → 1.3.0

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 (47) hide show
  1. package/css/myetv-player.css +153 -0
  2. package/css/myetv-player.min.css +1 -1
  3. package/dist/myetv-player.js +654 -129
  4. package/dist/myetv-player.min.js +579 -115
  5. package/package.json +35 -16
  6. package/plugins/twitch/myetv-player-twitch-plugin.js +125 -11
  7. package/plugins/vimeo/myetv-player-vimeo.js +80 -49
  8. package/plugins/youtube/README.md +5 -2
  9. package/plugins/youtube/myetv-player-youtube-plugin.js +891 -14
  10. package/.github/workflows/codeql.yml +0 -100
  11. package/.github/workflows/npm-publish.yml +0 -30
  12. package/SECURITY.md +0 -50
  13. package/build.js +0 -195
  14. package/scss/README.md +0 -161
  15. package/scss/_audio-player.scss +0 -21
  16. package/scss/_base.scss +0 -116
  17. package/scss/_controls.scss +0 -188
  18. package/scss/_loading.scss +0 -111
  19. package/scss/_menus.scss +0 -432
  20. package/scss/_mixins.scss +0 -112
  21. package/scss/_poster.scss +0 -8
  22. package/scss/_progress-bar.scss +0 -319
  23. package/scss/_resolution.scss +0 -68
  24. package/scss/_responsive.scss +0 -1360
  25. package/scss/_themes.scss +0 -30
  26. package/scss/_title-overlay.scss +0 -60
  27. package/scss/_tooltips.scss +0 -7
  28. package/scss/_variables.scss +0 -49
  29. package/scss/_video.scss +0 -221
  30. package/scss/_volume.scss +0 -122
  31. package/scss/_watermark.scss +0 -128
  32. package/scss/myetv-player.scss +0 -51
  33. package/scss/package.json +0 -16
  34. package/src/README.md +0 -560
  35. package/src/chapters.js +0 -521
  36. package/src/controls.js +0 -1243
  37. package/src/core.js +0 -1922
  38. package/src/events.js +0 -456
  39. package/src/fullscreen.js +0 -82
  40. package/src/i18n.js +0 -374
  41. package/src/playlist.js +0 -177
  42. package/src/plugins.js +0 -384
  43. package/src/quality.js +0 -963
  44. package/src/streaming.js +0 -346
  45. package/src/subtitles.js +0 -524
  46. package/src/utils.js +0 -65
  47. package/src/watermark.js +0 -246
@@ -1,188 +0,0 @@
1
- // ===================================
2
- // CONTROLS
3
- // ===================================
4
-
5
- @use 'mixins' as *;
6
- @use 'variables' as *;
7
-
8
- /* CONTROLS CONTAINER - IMPROVED RESPONSIVE DESIGN */
9
- .controls {
10
- position: absolute;
11
- bottom: 0;
12
- left: 0;
13
- right: 0;
14
- background: var(--player-bg-controls);
15
- padding: var(--player-controls-padding);
16
- opacity: 0;
17
- transform: translateY(100%);
18
- transition: all var(--player-transition-normal);
19
- z-index: 10;
20
- min-height: 70px !important;
21
- box-sizing: border-box;
22
- }
23
-
24
- .controls.show {
25
- opacity: 1;
26
- transform: translateY(0);
27
- position: absolute !important;
28
- bottom: 0 !important;
29
- z-index: 20 !important;
30
- }
31
-
32
- /* MAIN CONTROLS - IMPROVED RESPONSIVE LAYOUT */
33
- .controls-main {
34
- display: flex;
35
- justify-content: space-between;
36
- align-items: center;
37
- width: 100%;
38
- min-height: 44px !important;
39
- flex-shrink: 0;
40
- }
41
-
42
- .controls-left,
43
- .controls-right {
44
- display: flex;
45
- align-items: center;
46
- gap: 10px;
47
- flex-shrink: 1;
48
- min-width: 0;
49
- }
50
-
51
- /* BUTTONS - IMPROVED RESPONSIVE BEHAVIOR */
52
- .control-btn {
53
- background: none;
54
- border: none;
55
- color: var(--player-button-color);
56
- cursor: pointer;
57
- padding: var(--player-button-padding);
58
- border-radius: 6px;
59
- display: flex;
60
- align-items: center;
61
- gap: 5px;
62
- transition: all var(--player-transition-fast);
63
- font-size: 14px;
64
- font-weight: 500;
65
- position: relative;
66
- flex-shrink: 1;
67
- min-width: 0;
68
- white-space: nowrap;
69
- }
70
-
71
- .control-btn:hover {
72
- background: var(--player-button-hover);
73
- transform: scale(1.05);
74
- }
75
-
76
- .control-btn:active {
77
- transform: scale(0.95);
78
- background: var(--player-button-active);
79
- }
80
-
81
- /* SPECIFIC SUBTITLES BUTTON */
82
- .subtitles-btn {
83
- position: relative;
84
- }
85
-
86
- /* QUALITY BUTTON WITH DUAL DISPLAY */
87
- .quality-btn {
88
- min-height: 36px;
89
- padding: 6px 8px;
90
- }
91
-
92
- .quality-btn-text {
93
- display: flex;
94
- flex-direction: column;
95
- align-items: center;
96
- line-height: 1;
97
- }
98
-
99
- .selected-quality {
100
- font-size: 14px;
101
- font-weight: 500;
102
- color: var(--player-button-color);
103
- }
104
-
105
- .current-quality {
106
- font-size: 10px;
107
- font-weight: 400;
108
- color: var(--player-text-secondary);
109
- opacity: 0.8;
110
- margin-top: 2px;
111
- line-height: 1;
112
- }
113
-
114
- /* TIME DISPLAY - RESPONSIVE */
115
- .time-display {
116
- color: var(--player-text-color);
117
- font-size: 14px;
118
- font-weight: 500;
119
- display: flex;
120
- align-items: center;
121
- gap: 5px;
122
- font-variant-numeric: tabular-nums;
123
- flex-shrink: 2;
124
- min-width: 0;
125
- }
126
-
127
- /* ICONS */
128
- .icon {
129
- width: var(--player-icon-size);
130
- height: var(--player-icon-size);
131
- display: flex;
132
- align-items: center;
133
- justify-content: center;
134
- font-size: 16px;
135
- }
136
-
137
- .hidden {
138
- display: none !important;
139
- }
140
-
141
- /* BRAND LOGO RESPONSIVE */
142
- .controls-right .brand-logo {
143
- height: 44px;
144
- max-width: 120px;
145
- object-fit: contain;
146
- margin-right: 10px;
147
- pointer-events: auto;
148
- opacity: 0.8;
149
- transition: opacity var(--player-transition-fast);
150
- order: -1;
151
- flex-shrink: 1;
152
- }
153
-
154
- .controls-right .brand-logo:hover {
155
- opacity: 1;
156
- }
157
-
158
- .controls-right .brand-logo-link {
159
- order: -1;
160
- margin-right: 10px;
161
- display: inline-block;
162
- text-decoration: none;
163
- }
164
-
165
- .controls-right .brand-logo-link .brand-logo {
166
- margin-right: 0;
167
- }
168
-
169
- /* Hide cursor when controlbar is hidden */
170
- .video-wrapper.hide-cursor {
171
- cursor: none !important;
172
- }
173
-
174
- /* Ensure cursor is visible on controls even when hide-cursor is active */
175
- .video-wrapper.hide-cursor .controls {
176
- cursor: default !important;
177
- }
178
-
179
- /* Ensure cursor is visible on buttons */
180
- .video-wrapper.hide-cursor .control-btn {
181
- cursor: pointer !important;
182
- }
183
-
184
- /* do not hide mouse on iframes */
185
- .video-wrapper.hide-cursor iframe {
186
- cursor: auto !important;
187
- pointer-events: auto !important;
188
- }
@@ -1,111 +0,0 @@
1
- // ===================================
2
- // LOADING & OVERLAYS
3
- // ===================================
4
-
5
- @use 'mixins' as *;
6
- @use 'variables' as *;
7
-
8
- /* INITIAL LOADING */
9
- .initial-loading {
10
- position: absolute;
11
- top: 0;
12
- left: 0;
13
- width: 100%;
14
- height: 100%;
15
- background: var(--player-bg-primary);
16
- display: flex;
17
- align-items: center;
18
- justify-content: center;
19
- z-index: 20;
20
- }
21
-
22
- .video-wrapper.player-initialized .initial-loading {
23
- opacity: 0;
24
- visibility: hidden;
25
- transition: opacity 0.3s ease, visibility 0.3s ease;
26
- transition-delay: 0.2s;
27
- }
28
-
29
- .video-wrapper.player-initialized .initial-loading {
30
- display: none;
31
- transition-delay: 0.5s;
32
- }
33
-
34
- .loading-overlay {
35
- position: absolute;
36
- top: 0;
37
- left: 0;
38
- width: 100%;
39
- height: 100%;
40
- background: var(--player-bg-loading);
41
- display: flex;
42
- align-items: center;
43
- justify-content: center;
44
- opacity: 0;
45
- visibility: hidden;
46
- transition: opacity var(--player-transition-normal);
47
- z-index: 15;
48
- }
49
-
50
- .loading-overlay.active {
51
- opacity: 1;
52
- visibility: visible;
53
- }
54
-
55
- .loading-spinner {
56
- width: 50px;
57
- height: 50px;
58
- border: 3px solid rgba(255, 255, 255, 0.3);
59
- border-top: 3px solid var(--player-primary-color);
60
- border-radius: 50%;
61
- animation: spin 1s linear infinite;
62
- }
63
-
64
- @keyframes spin {
65
- 0% {
66
- transform: rotate(0deg);
67
- }
68
-
69
- 100% {
70
- transform: rotate(360deg);
71
- }
72
- }
73
-
74
- /* TITLE OVERLAY - WITH AUTO-HIDE */
75
- .title-overlay {
76
- position: absolute;
77
- top: 0;
78
- left: 0;
79
- right: 0;
80
- background: var(--player-bg-title-overlay);
81
- padding: var(--player-title-overlay-padding);
82
- opacity: 0;
83
- transform: translateY(-100%);
84
- transition: all var(--player-transition-normal);
85
- z-index: 15;
86
- pointer-events: none;
87
- }
88
-
89
- .title-overlay.show {
90
- opacity: 1;
91
- transform: translateY(0);
92
- }
93
-
94
- .title-overlay.show.persistent {
95
- opacity: 1;
96
- transform: translateY(0);
97
- }
98
-
99
- .title-text {
100
- color: var(--player-text-color);
101
- font-size: 18px;
102
- font-weight: 600;
103
- line-height: 1.3;
104
- margin: 0;
105
- white-space: nowrap;
106
- overflow: hidden;
107
- text-overflow: ellipsis;
108
- text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
109
- -webkit-font-smoothing: antialiased;
110
- -moz-osx-font-smoothing: grayscale;
111
- }
package/scss/_menus.scss DELETED
@@ -1,432 +0,0 @@
1
- // ===================================
2
- // MENUS (Settings, Quality, Speed, Subtitles)
3
- // ===================================
4
-
5
- @use 'mixins' as *;
6
- @use 'variables' as *;
7
-
8
- /* CONTROL MENUS */
9
- .speed-control,
10
- .quality-control,
11
- .subtitles-control {
12
- position: relative;
13
- }
14
-
15
- .speed-menu,
16
- .quality-menu,
17
- .subtitles-menu {
18
- position: absolute;
19
- bottom: 100%;
20
- right: 0;
21
- background: var(--player-bg-menu);
22
- backdrop-filter: blur(10px);
23
- border-radius: 8px;
24
- padding: 8px 0;
25
- margin-bottom: 10px;
26
- opacity: 0;
27
- visibility: hidden;
28
- transition: all var(--player-transition-fast);
29
- min-width: 140px;
30
- border: 1px solid rgba(255, 255, 255, 0.1);
31
- z-index: 100;
32
- box-shadow: var(--player-shadow-menu);
33
- }
34
-
35
- /* Main menus open ONLY with .active (CLICK) */
36
- .speed-menu.active,
37
- .quality-menu.active,
38
- .subtitles-menu.active {
39
- opacity: 1 !important;
40
- visibility: visible !important;
41
- pointer-events: all !important;
42
- }
43
-
44
- .speed-option,
45
- .quality-option,
46
- .subtitles-option {
47
- padding: 8px 16px;
48
- color: var(--player-text-color);
49
- cursor: pointer;
50
- transition: all var(--player-transition-fast);
51
- font-size: 14px;
52
- display: flex;
53
- align-items: center;
54
- justify-content: space-between;
55
- }
56
-
57
- .speed-option:hover,
58
- .quality-option:hover,
59
- .subtitles-option:hover {
60
- background: rgba(255, 255, 255, 0.1);
61
- color: var(--player-primary-color);
62
- }
63
-
64
- .speed-option.active,
65
- .quality-option.active,
66
- .subtitles-option.active {
67
- color: var(--player-primary-color);
68
- font-weight: 600;
69
- background: rgba(255, 255, 255, 0.05);
70
- }
71
-
72
- /* Highlight currently selected subtitle option */
73
- .subtitles-option.selected,
74
- .subtitles-option.active {
75
- color: var(--player-primary-color);
76
- background: rgba(255, 255, 255, 0.1);
77
- position: relative;
78
- }
79
-
80
- .subtitles-option.selected::after,
81
- .subtitles-option.active::after {
82
- content: '✓';
83
- position: absolute;
84
- right: 10px;
85
- font-weight: bold;
86
- }
87
-
88
- /* DUAL QUALITY INDICATORS */
89
- .quality-option.selected {
90
- color: var(--player-primary-color);
91
- font-weight: 600;
92
- }
93
-
94
- .quality-option.selected::after {
95
- content: 'Selected';
96
- font-size: 12px;
97
- color: var(--player-primary-color);
98
- font-weight: 400;
99
- margin-left: 8px;
100
- }
101
-
102
- .quality-option.playing {
103
- background: rgba(255, 255, 255, 0.05);
104
- }
105
-
106
- .quality-option.playing::after {
107
- content: 'Playing';
108
- font-size: 12px;
109
- color: #4CAF50;
110
- font-weight: 400;
111
- margin-left: 8px;
112
- }
113
-
114
- .quality-option.selected.playing::after {
115
- content: 'Active';
116
- font-size: 12px;
117
- color: var(--player-primary-color);
118
- font-weight: 500;
119
- margin-left: 8px;
120
- }
121
-
122
- .subtitles-option.active::after {
123
- content: '✓';
124
- font-size: 12px;
125
- color: var(--player-primary-color);
126
- }
127
-
128
- /* SETTINGS DROPDOWN MENU - FOR SMALL SCREENS */
129
- .settings-control {
130
- position: relative;
131
- display: none;
132
- }
133
-
134
- .settings-btn {
135
- background: none;
136
- border: none;
137
- color: var(--player-button-color);
138
- cursor: pointer;
139
- padding: var(--player-button-padding);
140
- border-radius: 6px;
141
- display: flex;
142
- align-items: center;
143
- gap: 5px;
144
- transition: all var(--player-transition-fast);
145
- font-size: 14px;
146
- font-weight: 500;
147
- position: relative;
148
- flex-shrink: 0;
149
- min-width: 0;
150
- white-space: nowrap;
151
- }
152
-
153
- .settings-btn:hover {
154
- background: var(--player-button-hover);
155
- transform: scale(1.05);
156
- }
157
-
158
- .settings-btn:active {
159
- transform: scale(0.95);
160
- background: var(--player-button-active);
161
- }
162
-
163
- .settings-btn .icon::before {
164
- content: '⚙️';
165
- font-size: 16px;
166
- }
167
-
168
- .settings-menu {
169
- position: absolute;
170
- bottom: 100%;
171
- right: 0;
172
- background: var(--player-bg-menu);
173
- backdrop-filter: blur(10px);
174
- border-radius: 8px;
175
- padding: 8px 0;
176
- margin-bottom: 10px;
177
- opacity: 0;
178
- visibility: hidden;
179
- transition: all var(--player-transition-fast);
180
- min-width: 180px;
181
- border: 1px solid rgba(255, 255, 255, 0.1);
182
- z-index: 100;
183
- box-shadow: var(--player-shadow-menu);
184
- }
185
-
186
- /* ⚠️ Settings menu opens ONLY with .active (CLICK) */
187
- .settings-menu.active {
188
- opacity: 1 !important;
189
- visibility: visible !important;
190
- pointer-events: all !important;
191
- }
192
-
193
- .settings-option {
194
- padding: 8px 16px;
195
- color: var(--player-text-color);
196
- cursor: pointer;
197
- transition: all var(--player-transition-fast);
198
- font-size: 14px;
199
- display: flex;
200
- align-items: center;
201
- justify-content: space-between;
202
- border-bottom: 1px solid rgba(255, 255, 255, 0.05);
203
- position: relative;
204
- }
205
-
206
- .settings-option:last-child {
207
- border-bottom: none;
208
- }
209
-
210
- .settings-option:hover {
211
- background: rgba(255, 255, 255, 0.1);
212
- color: var(--player-primary-color);
213
- }
214
-
215
- .settings-option-label {
216
- display: flex;
217
- align-items: center;
218
- gap: 8px;
219
- flex: 1;
220
- }
221
-
222
- .settings-option-value {
223
- font-size: 12px;
224
- color: var(--player-text-secondary);
225
- opacity: 0.8;
226
- }
227
-
228
- /* Submenu styling - HIDDEN BY DEFAULT */
229
- .settings-submenu,
230
- .quality-submenu,
231
- .speed-submenu {
232
- position: absolute;
233
- bottom: 0;
234
- right: 100%;
235
- background: var(--player-bg-menu);
236
- backdrop-filter: blur(10px);
237
- border-radius: 8px;
238
- padding: 8px 0;
239
- margin-right: 5px;
240
- opacity: 0;
241
- visibility: hidden;
242
- transition: all var(--player-transition-fast);
243
- min-width: 150px;
244
- max-width: 180px;
245
- max-height: 250px;
246
- overflow-y: auto;
247
- overflow-x: hidden;
248
- white-space: nowrap;
249
- border: 1px solid rgba(255, 255, 255, 0.1);
250
- z-index: 101;
251
- box-shadow: var(--player-shadow-menu);
252
- pointer-events: none;
253
- }
254
-
255
- /* ⚠️ SOLUTION: Submenus open on HOVER (easier and more intuitive) */
256
- .settings-option:hover .settings-submenu,
257
- .settings-option:hover .quality-submenu,
258
- .settings-option:hover .speed-submenu {
259
- opacity: 1 !important;
260
- visibility: visible !important;
261
- transform: translateX(-2px) !important;
262
- pointer-events: all !important;
263
- }
264
-
265
- .settings-submenu .settings-suboption,
266
- .quality-submenu .quality-option,
267
- .speed-submenu .speed-option {
268
- padding: 8px 10px !important;
269
- font-size: 12px !important;
270
- white-space: nowrap !important;
271
- overflow: hidden !important;
272
- text-overflow: ellipsis !important;
273
- }
274
-
275
- .settings-suboption {
276
- padding: 8px 16px;
277
- color: var(--player-text-color);
278
- cursor: pointer;
279
- transition: all var(--player-transition-fast);
280
- font-size: 13px;
281
- display: flex;
282
- align-items: center;
283
- justify-content: space-between;
284
- }
285
-
286
- .settings-suboption:hover {
287
- background: rgba(255, 255, 255, 0.1);
288
- color: var(--player-primary-color);
289
- }
290
-
291
- .settings-suboption.active {
292
- color: var(--player-primary-color);
293
- font-weight: 600;
294
- background: rgba(255, 255, 255, 0.05);
295
- }
296
-
297
- .settings-suboption.active::after {
298
- content: '✓';
299
- font-size: 12px;
300
- color: var(--player-primary-color);
301
- }
302
-
303
- /* Visual indicator for options with submenus */
304
- .settings-option:has(.settings-submenu, .quality-submenu, .speed-submenu)::after {
305
- content: '▶';
306
- font-size: 10px;
307
- color: var(--player-text-secondary);
308
- margin-left: 8px;
309
- }
310
-
311
- .settings-option:hover::after {
312
- color: var(--player-primary-color);
313
- }
314
-
315
- /* RESPONSIVE - PROGRESSIVE REDUCTION */
316
- @media (max-width: 768px) {
317
- .settings-menu > .settings-option {
318
- font-size: 12px !important;
319
- }
320
-
321
- .settings-submenu,
322
- .quality-submenu,
323
- .speed-submenu {
324
- max-width: min(140px, calc(100vw - 180px)) !important;
325
- }
326
-
327
- .settings-submenu .settings-suboption,
328
- .quality-submenu .quality-option,
329
- .speed-submenu .speed-option {
330
- padding: 7px 8px !important;
331
- font-size: 11px !important;
332
- }
333
- }
334
-
335
- @media (max-width: 600px) {
336
- .settings-menu > .settings-option {
337
- font-size: 11px !important;
338
- }
339
-
340
- .settings-submenu,
341
- .quality-submenu,
342
- .speed-submenu {
343
- max-width: min(120px, calc(100vw - 160px)) !important;
344
- }
345
-
346
- .settings-submenu .settings-suboption,
347
- .quality-submenu .quality-option,
348
- .speed-submenu .speed-option {
349
- padding: 6px 7px !important;
350
- font-size: 10px !important;
351
- }
352
- }
353
-
354
- @media (max-width: 450px) {
355
- .settings-menu > .settings-option {
356
- font-size: 10px !important;
357
- }
358
-
359
- .settings-submenu,
360
- .quality-submenu,
361
- .speed-submenu {
362
- max-width: min(100px, calc(100vw - 140px)) !important;
363
- }
364
-
365
- .settings-submenu .settings-suboption,
366
- .quality-submenu .quality-option,
367
- .speed-submenu .speed-option {
368
- padding: 5px 6px !important;
369
- font-size: 9px !important;
370
- }
371
- }
372
-
373
- @media (max-width: 350px) {
374
- .settings-control {
375
- display: block !important;
376
- }
377
-
378
- .pip-btn,
379
- .speed-control,
380
- .subtitles-control {
381
- display: none !important;
382
- }
383
- }
384
- // Expandable settings menu styles
385
- .settings-expandable-wrapper {
386
- position: relative;
387
- display: block;
388
- }
389
-
390
- .settings-option.expandable-trigger {
391
- display: flex;
392
- justify-content: space-between;
393
- align-items: center;
394
- cursor: pointer;
395
- font-size: 10px !important;
396
-
397
- .settings-option-label {
398
- font-size: 10px !important;
399
- }
400
-
401
- .expand-arrow {
402
- font-size: 8px;
403
- transition: transform 0.2s ease;
404
- margin-left: 8px;
405
- }
406
- }
407
-
408
- .settings-expandable-content {
409
- padding-left: 15px;
410
- margin-top: 4px;
411
-
412
- .settings-suboption {
413
- padding: 6px 12px;
414
- cursor: pointer;
415
- color: white;
416
- font-size: 10px;
417
- white-space: normal;
418
- word-wrap: break-word;
419
- opacity: 0.8;
420
- transition: opacity 0.2s;
421
-
422
- &.active {
423
- opacity: 1;
424
- font-weight: bold;
425
- }
426
-
427
- &:hover {
428
- opacity: 1;
429
- background: rgba(255, 255, 255, 0.1);
430
- }
431
- }
432
- }