myetv-player 1.0.0 → 1.0.6
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.
- package/.github/workflows/codeql.yml +100 -0
- package/README.md +36 -58
- package/SECURITY.md +50 -0
- package/css/myetv-player.css +301 -218
- package/css/myetv-player.min.css +1 -1
- package/dist/myetv-player.js +1713 -1503
- package/dist/myetv-player.min.js +1670 -1471
- package/package.json +6 -1
- package/plugins/README.md +1016 -0
- package/plugins/cloudflare/README.md +1068 -0
- package/plugins/cloudflare/myetv-player-cloudflare-stream-plugin.js +556 -0
- package/plugins/facebook/README.md +1024 -0
- package/plugins/facebook/myetv-player-facebook-plugin.js +437 -0
- package/plugins/gamepad-remote-controller/README.md +816 -0
- package/plugins/gamepad-remote-controller/myetv-player-gamepad-remote-plugin.js +678 -0
- package/plugins/google-adsense-ads/README.md +1 -0
- package/plugins/google-adsense-ads/g-adsense-ads-plugin.js +158 -0
- package/plugins/google-ima-ads/README.md +1 -0
- package/plugins/google-ima-ads/g-ima-ads-plugin.js +355 -0
- package/plugins/twitch/README.md +1185 -0
- package/plugins/twitch/myetv-player-twitch-plugin.js +569 -0
- package/plugins/vast-vpaid-ads/README.md +1 -0
- package/plugins/vast-vpaid-ads/vast-vpaid-ads-plugin.js +346 -0
- package/plugins/vimeo/README.md +1416 -0
- package/plugins/vimeo/myetv-player-vimeo.js +640 -0
- package/plugins/youtube/README.md +851 -0
- package/plugins/youtube/myetv-player-youtube-plugin.js +1714 -210
- package/scss/README.md +160 -0
- package/scss/_menus.scss +840 -672
- package/scss/_responsive.scss +67 -105
- package/scss/_volume.scss +67 -105
- package/src/README.md +559 -0
- package/src/controls.js +16 -4
- package/src/core.js +1192 -1062
- package/src/i18n.js +27 -1
- package/src/quality.js +478 -436
- 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!**
|