myetv-player 1.0.0 → 1.0.8

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 (38) hide show
  1. package/.github/workflows/codeql.yml +100 -0
  2. package/README.md +49 -58
  3. package/SECURITY.md +50 -0
  4. package/css/myetv-player.css +424 -219
  5. package/css/myetv-player.min.css +1 -1
  6. package/dist/myetv-player.js +1759 -1502
  7. package/dist/myetv-player.min.js +1705 -1469
  8. package/package.json +7 -1
  9. package/plugins/README.md +1016 -0
  10. package/plugins/cloudflare/README.md +1068 -0
  11. package/plugins/cloudflare/myetv-player-cloudflare-stream-plugin.js +556 -0
  12. package/plugins/facebook/README.md +1024 -0
  13. package/plugins/facebook/myetv-player-facebook-plugin.js +437 -0
  14. package/plugins/gamepad-remote-controller/README.md +816 -0
  15. package/plugins/gamepad-remote-controller/myetv-player-gamepad-remote-plugin.js +678 -0
  16. package/plugins/google-adsense-ads/README.md +1 -0
  17. package/plugins/google-adsense-ads/g-adsense-ads-plugin.js +158 -0
  18. package/plugins/google-ima-ads/README.md +1 -0
  19. package/plugins/google-ima-ads/g-ima-ads-plugin.js +355 -0
  20. package/plugins/twitch/README.md +1185 -0
  21. package/plugins/twitch/myetv-player-twitch-plugin.js +569 -0
  22. package/plugins/vast-vpaid-ads/README.md +1 -0
  23. package/plugins/vast-vpaid-ads/vast-vpaid-ads-plugin.js +346 -0
  24. package/plugins/vimeo/README.md +1416 -0
  25. package/plugins/vimeo/myetv-player-vimeo.js +640 -0
  26. package/plugins/youtube/README.md +851 -0
  27. package/plugins/youtube/myetv-player-youtube-plugin.js +1714 -210
  28. package/scss/README.md +160 -0
  29. package/scss/_controls.scss +184 -30
  30. package/scss/_menus.scss +840 -672
  31. package/scss/_responsive.scss +67 -105
  32. package/scss/_volume.scss +67 -105
  33. package/src/README.md +559 -0
  34. package/src/controls.js +17 -5
  35. package/src/core.js +1237 -1060
  36. package/src/i18n.js +27 -1
  37. package/src/quality.js +478 -436
  38. package/src/subtitles.js +2 -2
package/scss/README.md CHANGED
@@ -1 +1,161 @@
1
+ # MYETV Video Player - SCSS Files
1
2
 
3
+ ## 📁 File Structure
4
+
5
+ ```
6
+ myetv-player/
7
+ ├── scss/
8
+ │ ├── myetv-player.scss # Main file
9
+ │ ├── _variables.scss # Variables (colors, sizes, etc.)
10
+ │ ├── _mixins.scss # Reusable mixins
11
+ │ ├── _base.scss # Base styles
12
+ │ ├── _video.scss # Video element
13
+ │ ├── _loading.scss # Loading overlay
14
+ │ ├── _title-overlay.scss # Title overlay
15
+ │ ├── _controls.scss # Player controls
16
+ │ ├── _progress-bar.scss # Progress bar
17
+ │ ├── _volume.scss # Volume controls
18
+ │ ├── _menus.scss # Dropdown menus
19
+ │ ├── _poster.scss # Video poster
20
+ │ ├── _watermark.scss # Watermark
21
+ │ ├── _tooltips.scss # Tooltip system
22
+ │ ├── _audio-player.scss # Player for only audio files
23
+ │ ├── _themes.scss # Alternative themes
24
+ │ ├── _resolution.scss # Display modes
25
+ │ └── _responsive.scss # Media queries
26
+ ├── package.json
27
+ └── README.md
28
+ ```
29
+
30
+ ## Installation
31
+
32
+ ### 1. Install Node.js
33
+ Download and install Node.js from [nodejs.org](https://nodejs.org)
34
+
35
+ ### 2. Install Sass
36
+ ```bash
37
+ npm install
38
+ ```
39
+
40
+ Or install Sass globally:
41
+ ```bash
42
+ npm install -g sass
43
+ ```
44
+
45
+ ## Compilation
46
+
47
+ ### Development (with watch mode)
48
+ ```bash
49
+ npm run scss:watch
50
+ ```
51
+ This command watches SCSS files and recompiles automatically when changed.
52
+
53
+ ### Production (minified)
54
+ ```bash
55
+ npm run scss:prod
56
+ ```
57
+ Generates a minified CSS file for production.
58
+
59
+ ### Single compilation
60
+ ```bash
61
+ npm run scss
62
+ ```
63
+
64
+ ### Manual compilation
65
+ ```bash
66
+ sass myetv-player.scss myetv-player.css
67
+ ```
68
+
69
+ ## How to Add Features
70
+
71
+ ### 1. Modify Variables
72
+ Open `_variables.scss` and modify the values:
73
+ ```scss
74
+ $player-primary-color: #4a90e2 !default; // Change primary color
75
+ $player-icon-size: 24px !default; // Change icon size
76
+ ```
77
+
78
+ ### 2. Add New Components
79
+ Create a new file `_component-name.scss` and import it into `myetv-player.scss`:
80
+ ```scss
81
+ @import 'component-name';
82
+ ```
83
+
84
+ ### 3. Create New Themes
85
+ Open `_themes.scss` and add:
86
+ ```scss
87
+ .video-wrapper.theme-custom {
88
+ --player-primary-color: #your-color;
89
+ --player-primary-hover: #your-hover-color;
90
+ }
91
+ ```
92
+
93
+ ### 4. Modify Responsive Breakpoints
94
+ Open `_mixins.scss` and customize the breakpoints:
95
+ ```scss
96
+ @mixin tablet {
97
+ @media (max-width: 768px) {
98
+ @content;
99
+ }
100
+ }
101
+ ```
102
+
103
+ ## Best Practices
104
+
105
+ 1. **Do not modify compiled CSS** - Always work on SCSS files
106
+ 2. **Use variables** - For reusable values, create variables in `_variables.scss`
107
+ 3. **Create mixins** - For repeated patterns, add mixins in `_mixins.scss`
108
+ 4. **Keep files small** - Each file should handle a single component
109
+ 5. **Test on multiple browsers** - Verify cross-browser compatibility
110
+
111
+ ## Quick Customization
112
+
113
+ ### Change Primary Color
114
+ ```scss
115
+ // In _variables.scss
116
+ $player-primary-color: #e74c3c !default; // Red
117
+ ```
118
+
119
+ ### Add New Button
120
+ ```scss
121
+ // In _controls.scss
122
+ .custom-button {
123
+ @include button-hover;
124
+ // Your styles
125
+ }
126
+ ```
127
+
128
+ ### Create Custom Menu
129
+ ```scss
130
+ // In _menus.scss
131
+ .custom-menu {
132
+ @include menu-base;
133
+ // Your additional styles
134
+ }
135
+ ```
136
+
137
+ ## Output
138
+
139
+ After compilation you will get:
140
+ - `myetv-player.css` - Complete CSS file
141
+ - `myetv-player.min.css` - Minified CSS file for production
142
+ - `myetv-player.css.map` - Source map for debugging (with --source-map)
143
+
144
+ ## Debug
145
+
146
+ If you use watch mode with source map:
147
+ ```bash
148
+ npm run scss:dev
149
+ ```
150
+
151
+ You can see the original SCSS styles in the browser during debug.
152
+
153
+ ## Support
154
+
155
+ For questions or issues:
156
+ - Website: [https://www.myetv.tv](https://www.myetv.tv)
157
+ - Developer: [https://oskarcosimo.com](https://oskarcosimo.com)
158
+
159
+ ---
160
+
161
+ **Happy Coding!**
@@ -1,30 +1,184 @@
1
- // ===================================
2
- // CONTROLS
3
- // ===================================
4
-
5
- @use 'mixins' as *;
6
- @use 'variables' as *;
7
-
8
- /* CONTROLS - 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
- }
1
+ // ===================================
2
+ // CONTROLS
3
+ // ===================================
4
+
5
+ @use 'mixins' as *;
6
+ @use 'variables' as *;
7
+
8
+ // ===================================
9
+ // PROGRESS BAR SYSTEM
10
+ // ===================================
11
+
12
+ .progress-container {
13
+ position: relative;
14
+ overflow: visible !important; // Allow handle to extend outside the container
15
+ padding: 0; // No padding - keeps control bar height normal
16
+ margin-bottom: 10px; // Space below instead of padding
17
+ display: flex;
18
+ align-items: center; // Vertically center the progress bar
19
+ cursor: pointer;
20
+ }
21
+
22
+ .progress-bar {
23
+ position: relative;
24
+ width: 100%;
25
+ height: 4px; // Thin progress bar
26
+ background: rgba(255, 255, 255, 0.3); // Semi-transparent background
27
+ border-radius: 2px;
28
+ overflow: visible !important; // Allow handle to be visible
29
+ cursor: pointer;
30
+ }
31
+
32
+ // Buffer bar (shows buffered/loaded video)
33
+ .progress-buffer {
34
+ position: absolute;
35
+ left: 0;
36
+ top: 0;
37
+ height: 100%;
38
+ background: rgba(255, 255, 255, 0.5);
39
+ border-radius: 2px;
40
+ pointer-events: none;
41
+ z-index: 1; // Below filled bar
42
+ }
43
+
44
+ // Filled bar (shows watched video progress)
45
+ .progress-filled {
46
+ position: absolute;
47
+ left: 0;
48
+ top: 0;
49
+ height: 100%;
50
+ background: var(--player-accent, #ff0000); // Accent color fill
51
+ border-radius: 2px;
52
+ pointer-events: none;
53
+ z-index: 2; // Above buffer, below handle
54
+ }
55
+
56
+ // ===================================
57
+ // PROGRESS HANDLE - BASE STYLES
58
+ // ===================================
59
+
60
+ .progress-handle {
61
+ position: absolute;
62
+ top: 50%;
63
+ left: 0%;
64
+ transform: translate(-50%, -50%); // Center the handle
65
+ width: 14px;
66
+ height: 14px;
67
+ background: var(--player-accent, #ff0000);
68
+ cursor: grab; // Indicates draggable
69
+ transition: opacity 0.2s ease;
70
+ z-index: 10; // Above everything (buffer and filled)
71
+ pointer-events: auto; // Ensure it's clickable
72
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); // Subtle shadow for depth
73
+ }
74
+
75
+ // Grabbing cursor when actively dragging
76
+ .progress-handle:active {
77
+ cursor: grabbing;
78
+ }
79
+
80
+ // ===================================
81
+ // SEEK HANDLE SHAPES
82
+ // ===================================
83
+
84
+ // Circle - classic round handle (default recommended)
85
+ .progress-handle-circle {
86
+ border-radius: 50%; // Perfect circle
87
+ }
88
+
89
+ // Square - sharp corners
90
+ .progress-handle-square {
91
+ border-radius: 3px; // Slightly rounded corners
92
+ }
93
+
94
+ // Diamond - rotated square
95
+ .progress-handle-diamond {
96
+ border-radius: 2px;
97
+ transform: translate(-50%, -50%) rotate(45deg); // 45 degree rotation
98
+ }
99
+
100
+ // Arrow - pointing upward
101
+ .progress-handle-arrow {
102
+ background: transparent;
103
+ width: 0 !important;
104
+ height: 0 !important;
105
+ border-left: 7px solid transparent;
106
+ border-right: 7px solid transparent;
107
+ border-bottom: 14px solid var(--player-accent, #ff0000); // Triangle pointing up
108
+ border-radius: 0;
109
+ box-shadow: none; // No shadow for border-based shapes
110
+ }
111
+
112
+ // Triangle - simple triangle shape
113
+ .progress-handle-triangle {
114
+ background: transparent;
115
+ width: 0 !important;
116
+ height: 0 !important;
117
+ border-left: 8px solid transparent;
118
+ border-right: 8px solid transparent;
119
+ border-bottom: 14px solid var(--player-accent, #ff0000);
120
+ border-radius: 0;
121
+ box-shadow: none;
122
+ }
123
+
124
+ // Heart - romantic shape using clip-path
125
+ .progress-handle-heart {
126
+ width: 16px !important;
127
+ height: 16px !important;
128
+ clip-path: polygon( 50% 15%, 65% 0%, 80% 0%, 95% 15%, 95% 30%, 50% 85%, 5% 30%, 5% 15%, 20% 0%, 35% 0% );
129
+ }
130
+
131
+ // Star - five-pointed star using clip-path
132
+ .progress-handle-star {
133
+ width: 16px !important;
134
+ height: 16px !important;
135
+ clip-path: polygon( 50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35% );
136
+ }
137
+
138
+ // None - completely hidden (no visual indicator)
139
+ .progress-handle-none {
140
+ opacity: 0 !important;
141
+ pointer-events: none !important;
142
+ }
143
+
144
+ // ===================================
145
+ // FORCE HANDLE ALWAYS VISIBLE
146
+ // ===================================
147
+
148
+ // Override any other rule that hides the handle
149
+ .progress-handle {
150
+ opacity: 1 !important; // Always visible
151
+ }
152
+
153
+ .progress-container .progress-handle {
154
+ opacity: 1 !important; // Always visible with higher specificity
155
+ }
156
+
157
+ // ===================================
158
+ // CONTROLS CONTAINER
159
+ // ===================================
160
+
161
+ /* Main controls container */
162
+ .controls {
163
+ position: absolute;
164
+ bottom: 0;
165
+ left: 0;
166
+ right: 0;
167
+ background: var(--player-bg-controls);
168
+ padding: var(--player-controls-padding);
169
+ opacity: 0; // Hidden by default
170
+ transform: translateY(100%); // Slide out below
171
+ transition: all var(--player-transition-normal);
172
+ z-index: 10;
173
+ min-height: 70px !important;
174
+ box-sizing: border-box;
175
+ }
176
+
177
+ /* Controls visible state */
178
+ .controls.show {
179
+ opacity: 1; // Fully visible
180
+ transform: translateY(0); // Slide in
181
+ position: absolute !important;
182
+ bottom: 0 !important;
183
+ z-index: 20 !important; // Above other elements
184
+ }