vidply 1.0.5 → 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/LICENSE +22 -22
- package/README.md +593 -593
- package/dist/vidply.css +1807 -1807
- package/dist/vidply.esm.js +33 -0
- package/dist/vidply.esm.js.map +2 -2
- package/dist/vidply.esm.min.js +6 -6
- package/dist/vidply.esm.min.meta.json +17 -17
- package/dist/vidply.js +33 -0
- package/dist/vidply.js.map +2 -2
- package/dist/vidply.min.js +6 -6
- package/dist/vidply.min.meta.json +17 -17
- package/package.json +2 -2
- package/src/controls/CaptionManager.js +248 -248
- package/src/controls/ControlBar.js +2026 -2026
- package/src/controls/KeyboardManager.js +233 -233
- package/src/controls/SettingsDialog.js +417 -417
- package/src/controls/TranscriptManager.js +728 -728
- package/src/core/Player.js +1186 -1134
- package/src/i18n/i18n.js +66 -66
- package/src/i18n/translations.js +561 -561
- package/src/icons/Icons.js +183 -183
- package/src/index.js +95 -95
- package/src/renderers/HLSRenderer.js +302 -302
- package/src/renderers/HTML5Renderer.js +298 -298
- package/src/renderers/VimeoRenderer.js +257 -257
- package/src/renderers/YouTubeRenderer.js +274 -274
- package/src/styles/vidply.css +1807 -1807
- package/src/utils/DOMUtils.js +154 -154
- package/src/utils/EventEmitter.js +53 -53
- package/src/utils/TimeUtils.js +87 -87
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"inputs": {
|
|
3
3
|
"src/utils/EventEmitter.js": {
|
|
4
|
-
"bytes":
|
|
4
|
+
"bytes": 1002,
|
|
5
5
|
"imports": [],
|
|
6
6
|
"format": "esm"
|
|
7
7
|
},
|
|
8
8
|
"src/utils/DOMUtils.js": {
|
|
9
|
-
"bytes":
|
|
9
|
+
"bytes": 3884,
|
|
10
10
|
"imports": [],
|
|
11
11
|
"format": "esm"
|
|
12
12
|
},
|
|
13
13
|
"src/i18n/translations.js": {
|
|
14
|
-
"bytes":
|
|
14
|
+
"bytes": 17011,
|
|
15
15
|
"imports": [],
|
|
16
16
|
"format": "esm"
|
|
17
17
|
},
|
|
18
18
|
"src/i18n/i18n.js": {
|
|
19
|
-
"bytes":
|
|
19
|
+
"bytes": 1639,
|
|
20
20
|
"imports": [
|
|
21
21
|
{
|
|
22
22
|
"path": "src/i18n/translations.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"format": "esm"
|
|
28
28
|
},
|
|
29
29
|
"src/utils/TimeUtils.js": {
|
|
30
|
-
"bytes":
|
|
30
|
+
"bytes": 2242,
|
|
31
31
|
"imports": [
|
|
32
32
|
{
|
|
33
33
|
"path": "src/i18n/i18n.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"format": "esm"
|
|
39
39
|
},
|
|
40
40
|
"src/icons/Icons.js": {
|
|
41
|
-
"bytes":
|
|
41
|
+
"bytes": 12539,
|
|
42
42
|
"imports": [],
|
|
43
43
|
"format": "esm"
|
|
44
44
|
},
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"format": "esm"
|
|
70
70
|
},
|
|
71
71
|
"src/controls/CaptionManager.js": {
|
|
72
|
-
"bytes":
|
|
72
|
+
"bytes": 7467,
|
|
73
73
|
"imports": [
|
|
74
74
|
{
|
|
75
75
|
"path": "src/utils/DOMUtils.js",
|
|
@@ -85,12 +85,12 @@
|
|
|
85
85
|
"format": "esm"
|
|
86
86
|
},
|
|
87
87
|
"src/controls/KeyboardManager.js": {
|
|
88
|
-
"bytes":
|
|
88
|
+
"bytes": 6786,
|
|
89
89
|
"imports": [],
|
|
90
90
|
"format": "esm"
|
|
91
91
|
},
|
|
92
92
|
"src/controls/TranscriptManager.js": {
|
|
93
|
-
"bytes":
|
|
93
|
+
"bytes": 24133,
|
|
94
94
|
"imports": [
|
|
95
95
|
{
|
|
96
96
|
"path": "src/utils/DOMUtils.js",
|
|
@@ -116,22 +116,22 @@
|
|
|
116
116
|
"format": "esm"
|
|
117
117
|
},
|
|
118
118
|
"src/renderers/HTML5Renderer.js": {
|
|
119
|
-
"bytes":
|
|
119
|
+
"bytes": 8660,
|
|
120
120
|
"imports": [],
|
|
121
121
|
"format": "esm"
|
|
122
122
|
},
|
|
123
123
|
"src/renderers/YouTubeRenderer.js": {
|
|
124
|
-
"bytes":
|
|
124
|
+
"bytes": 7186,
|
|
125
125
|
"imports": [],
|
|
126
126
|
"format": "esm"
|
|
127
127
|
},
|
|
128
128
|
"src/renderers/VimeoRenderer.js": {
|
|
129
|
-
"bytes":
|
|
129
|
+
"bytes": 6699,
|
|
130
130
|
"imports": [],
|
|
131
131
|
"format": "esm"
|
|
132
132
|
},
|
|
133
133
|
"src/renderers/HLSRenderer.js": {
|
|
134
|
-
"bytes":
|
|
134
|
+
"bytes": 8757,
|
|
135
135
|
"imports": [
|
|
136
136
|
{
|
|
137
137
|
"path": "src/renderers/HTML5Renderer.js",
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"format": "esm"
|
|
143
143
|
},
|
|
144
144
|
"src/core/Player.js": {
|
|
145
|
-
"bytes":
|
|
145
|
+
"bytes": 39618,
|
|
146
146
|
"imports": [
|
|
147
147
|
{
|
|
148
148
|
"path": "src/utils/EventEmitter.js",
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
"format": "esm"
|
|
225
225
|
},
|
|
226
226
|
"src/index.js": {
|
|
227
|
-
"bytes":
|
|
227
|
+
"bytes": 2801,
|
|
228
228
|
"imports": [
|
|
229
229
|
{
|
|
230
230
|
"path": "src/core/Player.js",
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
"bytesInOutput": 12461
|
|
285
285
|
},
|
|
286
286
|
"src/core/Player.js": {
|
|
287
|
-
"bytesInOutput":
|
|
287
|
+
"bytesInOutput": 18100
|
|
288
288
|
},
|
|
289
289
|
"src/renderers/YouTubeRenderer.js": {
|
|
290
290
|
"bytesInOutput": 4140
|
|
@@ -302,7 +302,7 @@
|
|
|
302
302
|
"bytesInOutput": 1000
|
|
303
303
|
}
|
|
304
304
|
},
|
|
305
|
-
"bytes":
|
|
305
|
+
"bytes": 129784
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
}
|
package/dist/vidply.js
CHANGED
|
@@ -4332,6 +4332,8 @@ var VidPly = (() => {
|
|
|
4332
4332
|
playbackSpeed: 1,
|
|
4333
4333
|
preload: "metadata",
|
|
4334
4334
|
startTime: 0,
|
|
4335
|
+
playsInline: true,
|
|
4336
|
+
// Enable inline playback on iOS (prevents native fullscreen)
|
|
4335
4337
|
// Controls
|
|
4336
4338
|
controls: true,
|
|
4337
4339
|
hideControlsDelay: 3e3,
|
|
@@ -4547,6 +4549,11 @@ var VidPly = (() => {
|
|
|
4547
4549
|
this.element.setAttribute("tabindex", "-1");
|
|
4548
4550
|
this.element.style.width = "100%";
|
|
4549
4551
|
this.element.style.height = "100%";
|
|
4552
|
+
if (this.element.tagName === "VIDEO" && this.options.playsInline) {
|
|
4553
|
+
this.element.setAttribute("playsinline", "");
|
|
4554
|
+
this.element.setAttribute("webkit-playsinline", "");
|
|
4555
|
+
this.element.playsInline = true;
|
|
4556
|
+
}
|
|
4550
4557
|
if (this.options.width) {
|
|
4551
4558
|
this.container.style.width = typeof this.options.width === "number" ? `${this.options.width}px` : this.options.width;
|
|
4552
4559
|
}
|
|
@@ -5082,6 +5089,25 @@ var VidPly = (() => {
|
|
|
5082
5089
|
}
|
|
5083
5090
|
this.orientationQuery = orientationQuery;
|
|
5084
5091
|
}
|
|
5092
|
+
this.fullscreenChangeHandler = () => {
|
|
5093
|
+
const isFullscreen = !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement);
|
|
5094
|
+
if (this.state.fullscreen !== isFullscreen) {
|
|
5095
|
+
this.state.fullscreen = isFullscreen;
|
|
5096
|
+
if (isFullscreen) {
|
|
5097
|
+
this.container.classList.add(`${this.options.classPrefix}-fullscreen`);
|
|
5098
|
+
} else {
|
|
5099
|
+
this.container.classList.remove(`${this.options.classPrefix}-fullscreen`);
|
|
5100
|
+
}
|
|
5101
|
+
this.emit("fullscreenchange", isFullscreen);
|
|
5102
|
+
if (this.controlBar) {
|
|
5103
|
+
this.controlBar.updateFullscreenButton();
|
|
5104
|
+
}
|
|
5105
|
+
}
|
|
5106
|
+
};
|
|
5107
|
+
document.addEventListener("fullscreenchange", this.fullscreenChangeHandler);
|
|
5108
|
+
document.addEventListener("webkitfullscreenchange", this.fullscreenChangeHandler);
|
|
5109
|
+
document.addEventListener("mozfullscreenchange", this.fullscreenChangeHandler);
|
|
5110
|
+
document.addEventListener("MSFullscreenChange", this.fullscreenChangeHandler);
|
|
5085
5111
|
}
|
|
5086
5112
|
// Cleanup
|
|
5087
5113
|
destroy() {
|
|
@@ -5123,6 +5149,13 @@ var VidPly = (() => {
|
|
|
5123
5149
|
this.orientationQuery = null;
|
|
5124
5150
|
this.orientationHandler = null;
|
|
5125
5151
|
}
|
|
5152
|
+
if (this.fullscreenChangeHandler) {
|
|
5153
|
+
document.removeEventListener("fullscreenchange", this.fullscreenChangeHandler);
|
|
5154
|
+
document.removeEventListener("webkitfullscreenchange", this.fullscreenChangeHandler);
|
|
5155
|
+
document.removeEventListener("mozfullscreenchange", this.fullscreenChangeHandler);
|
|
5156
|
+
document.removeEventListener("MSFullscreenChange", this.fullscreenChangeHandler);
|
|
5157
|
+
this.fullscreenChangeHandler = null;
|
|
5158
|
+
}
|
|
5126
5159
|
if (this.container && this.container.parentNode) {
|
|
5127
5160
|
this.container.parentNode.insertBefore(this.element, this.container);
|
|
5128
5161
|
this.container.parentNode.removeChild(this.container);
|