itube-modern-player 0.7.2 → 0.8.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.
- package/README.md +131 -5
- package/dist/core.cjs +4 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +696 -583
- package/dist/core.js.map +1 -1
- package/dist/gesture-4dfbCdW5.cjs +2 -0
- package/dist/gesture-4dfbCdW5.cjs.map +1 -0
- package/dist/gesture-SgY5sB4t.js +11 -0
- package/dist/gesture-SgY5sB4t.js.map +1 -0
- package/dist/gesture.d.ts +18 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -23
- package/dist/index.js.map +1 -1
- package/dist/itube-modern-player.iife.js +3 -3
- package/dist/itube-modern-player.iife.js.map +1 -1
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.cjs.map +1 -1
- package/dist/lazy.d.ts +10 -2
- package/dist/lazy.js +56 -58
- package/dist/lazy.js.map +1 -1
- package/dist/placeholder.cjs +2 -0
- package/dist/placeholder.cjs.map +1 -0
- package/dist/placeholder.d.ts +32 -0
- package/dist/placeholder.js +42 -0
- package/dist/placeholder.js.map +1 -0
- package/dist/player.d.ts +10 -0
- package/dist/types.d.ts +39 -5
- package/dist/vue.cjs +1 -1
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.d.ts +68 -5
- package/dist/vue.js +137 -38
- package/dist/vue.js.map +1 -1
- package/package.json +7 -2
- package/dist/dom-Bq7EQenh.cjs +0 -5
- package/dist/dom-Bq7EQenh.cjs.map +0 -1
- package/dist/dom-DrpWbY0y.js +0 -87
- package/dist/dom-DrpWbY0y.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gesture-4dfbCdW5.cjs","sources":["../src/gesture.ts"],"sourcesContent":["/**\n * User-gesture media unlock, shared by the lazy entries (`createLazyPlayer`\n * and the Vue wrapper's `lazy` mode).\n *\n * Mobile browsers (iOS Safari first of all) allow `play()` with sound only\n * synchronously inside a user gesture — and the permission is granted PER\n * ELEMENT. The lazy flow crosses two async boundaries between the tap and the\n * autostart (the `import()` of the player chunk + the HLS attach), so a video\n * element created after them has no gesture attached: the first tap only\n * loaded the player and playback started on the second tap.\n *\n * The fix: create the `<video>` synchronously in the click handler and call\n * `play()` on it right there. Without a src it rejects immediately (that's\n * fine and expected), but the element keeps its user-activation flag — when\n * the player later attaches the real source to THIS element, `play()` with\n * sound goes through.\n */\nexport function createGestureVideo(): HTMLVideoElement {\n const video = document.createElement('video')\n video.setAttribute('playsinline', '')\n const attempt = video.play()\n // No source yet → NotSupportedError. The rejection is the point: the play()\n // CALL inside the gesture is what unlocks the element, not its success.\n if (attempt) attempt.then(() => video.pause(), () => {})\n return video\n}\n"],"names":["createGestureVideo","video","attempt"],"mappings":"aAiBO,SAASA,GAAuC,CACrD,MAAMC,EAAQ,SAAS,cAAc,OAAO,EAC5CA,EAAM,aAAa,cAAe,EAAE,EACpC,MAAMC,EAAUD,EAAM,KAAA,EAGtB,OAAIC,GAASA,EAAQ,KAAK,IAAMD,EAAM,MAAA,EAAS,IAAM,CAAC,CAAC,EAChDA,CACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gesture-SgY5sB4t.js","sources":["../src/gesture.ts"],"sourcesContent":["/**\n * User-gesture media unlock, shared by the lazy entries (`createLazyPlayer`\n * and the Vue wrapper's `lazy` mode).\n *\n * Mobile browsers (iOS Safari first of all) allow `play()` with sound only\n * synchronously inside a user gesture — and the permission is granted PER\n * ELEMENT. The lazy flow crosses two async boundaries between the tap and the\n * autostart (the `import()` of the player chunk + the HLS attach), so a video\n * element created after them has no gesture attached: the first tap only\n * loaded the player and playback started on the second tap.\n *\n * The fix: create the `<video>` synchronously in the click handler and call\n * `play()` on it right there. Without a src it rejects immediately (that's\n * fine and expected), but the element keeps its user-activation flag — when\n * the player later attaches the real source to THIS element, `play()` with\n * sound goes through.\n */\nexport function createGestureVideo(): HTMLVideoElement {\n const video = document.createElement('video')\n video.setAttribute('playsinline', '')\n const attempt = video.play()\n // No source yet → NotSupportedError. The rejection is the point: the play()\n // CALL inside the gesture is what unlocks the element, not its success.\n if (attempt) attempt.then(() => video.pause(), () => {})\n return video\n}\n"],"names":["createGestureVideo","video","attempt"],"mappings":"AAiBO,SAASA,IAAuC;AACrD,QAAMC,IAAQ,SAAS,cAAc,OAAO;AAC5C,EAAAA,EAAM,aAAa,eAAe,EAAE;AACpC,QAAMC,IAAUD,EAAM,KAAA;AAGtB,SAAIC,KAASA,EAAQ,KAAK,MAAMD,EAAM,MAAA,GAAS,MAAM;AAAA,EAAC,CAAC,GAChDA;AACT;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User-gesture media unlock, shared by the lazy entries (`createLazyPlayer`
|
|
3
|
+
* and the Vue wrapper's `lazy` mode).
|
|
4
|
+
*
|
|
5
|
+
* Mobile browsers (iOS Safari first of all) allow `play()` with sound only
|
|
6
|
+
* synchronously inside a user gesture — and the permission is granted PER
|
|
7
|
+
* ELEMENT. The lazy flow crosses two async boundaries between the tap and the
|
|
8
|
+
* autostart (the `import()` of the player chunk + the HLS attach), so a video
|
|
9
|
+
* element created after them has no gesture attached: the first tap only
|
|
10
|
+
* loaded the player and playback started on the second tap.
|
|
11
|
+
*
|
|
12
|
+
* The fix: create the `<video>` synchronously in the click handler and call
|
|
13
|
+
* `play()` on it right there. Without a src it rejects immediately (that's
|
|
14
|
+
* fine and expected), but the element keeps its user-activation flag — when
|
|
15
|
+
* the player later attaches the real source to THIS element, `play()` with
|
|
16
|
+
* sound goes through.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createGestureVideo(): HTMLVideoElement;
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./core.cjs"),t=require("./labels-BOrrLImF.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./core.cjs"),t=require("./labels-BOrrLImF.cjs"),a=require("./locales.cjs");e.registerLocales(a.locales);exports.Emitter=e.Emitter;exports.Player=e.Player;exports.ThumbnailTrack=e.ThumbnailTrack;exports.buildHeatmapValues=e.buildHeatmapValues;exports.chapterAt=e.chapterAt;exports.defaultIcons=e.defaultIcons;exports.formatTime=e.formatTime;exports.getLocale=e.getLocale;exports.heatmapPath=e.heatmapPath;exports.isHlsSource=e.isHlsSource;exports.loadChaptersVtt=e.loadChaptersVtt;exports.normalizeChapters=e.normalizeChapters;exports.registerLocale=e.registerLocale;exports.registerLocales=e.registerLocales;exports.registeredLanguages=e.registeredLanguages;exports.resolveVast=e.resolveVast;exports.defaultLabels=t.defaultLabels;exports.locales=a.locales;exports.supportedLanguages=a.supportedLanguages;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["/**\n * Main entry: the full player with all 11 built-in locales registered.\n * Size-conscious builds can use `itube-modern-player/core` instead and\n * register only the locales they need.\n */\nexport * from './coreEntry'\n\nimport { registerLocales } from './core/localeRegistry'\nimport { locales } from './core/locales'\n\nregisterLocales(locales)\n\nexport { locales, supportedLanguages } from './core/locales'\n"],"names":["registerLocales","locales"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["/**\n * Main entry: the full player with all 11 built-in locales registered.\n * Size-conscious builds can use `itube-modern-player/core` instead and\n * register only the locales they need.\n */\nexport * from './coreEntry'\n\nimport { registerLocales } from './core/localeRegistry'\nimport { locales } from './core/locales'\n\nregisterLocales(locales)\n\nexport { locales, supportedLanguages } from './core/locales'\n"],"names":["registerLocales","locales"],"mappings":"4KAUAA,EAAAA,gBAAgBC,SAAO"}
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import { registerLocales as e
|
|
2
|
-
import { Emitter as m, ThumbnailTrack as p, buildHeatmapValues as i, chapterAt as
|
|
3
|
-
import { d as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
e(r);
|
|
1
|
+
import { registerLocales as e } from "./core.js";
|
|
2
|
+
import { Emitter as l, Player as m, ThumbnailTrack as p, buildHeatmapValues as i, chapterAt as u, defaultIcons as c, formatTime as f, getLocale as g, heatmapPath as d, isHlsSource as h, loadChaptersVtt as L, normalizeChapters as n, registerLocale as x, registeredLanguages as b, resolveVast as T } from "./core.js";
|
|
3
|
+
import { d as C } from "./labels-CCjOCBKU.js";
|
|
4
|
+
import { locales as a } from "./locales.js";
|
|
5
|
+
import { supportedLanguages as P } from "./locales.js";
|
|
6
|
+
e(a);
|
|
8
7
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
l as Emitter,
|
|
9
|
+
m as Player,
|
|
11
10
|
p as ThumbnailTrack,
|
|
12
11
|
i as buildHeatmapValues,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
u as chapterAt,
|
|
13
|
+
c as defaultIcons,
|
|
14
|
+
C as defaultLabels,
|
|
15
|
+
f as formatTime,
|
|
16
|
+
g as getLocale,
|
|
17
|
+
d as heatmapPath,
|
|
18
|
+
h as isHlsSource,
|
|
19
|
+
L as loadChaptersVtt,
|
|
20
|
+
a as locales,
|
|
21
|
+
n as normalizeChapters,
|
|
22
|
+
x as registerLocale,
|
|
24
23
|
e as registerLocales,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
b as registeredLanguages,
|
|
25
|
+
T as resolveVast,
|
|
26
|
+
P as supportedLanguages
|
|
28
27
|
};
|
|
29
28
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["/**\n * Main entry: the full player with all 11 built-in locales registered.\n * Size-conscious builds can use `itube-modern-player/core` instead and\n * register only the locales they need.\n */\nexport * from './coreEntry'\n\nimport { registerLocales } from './core/localeRegistry'\nimport { locales } from './core/locales'\n\nregisterLocales(locales)\n\nexport { locales, supportedLanguages } from './core/locales'\n"],"names":["registerLocales","locales"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["/**\n * Main entry: the full player with all 11 built-in locales registered.\n * Size-conscious builds can use `itube-modern-player/core` instead and\n * register only the locales they need.\n */\nexport * from './coreEntry'\n\nimport { registerLocales } from './core/localeRegistry'\nimport { locales } from './core/locales'\n\nregisterLocales(locales)\n\nexport { locales, supportedLanguages } from './core/locales'\n"],"names":["registerLocales","locales"],"mappings":";;;;;AAUAA,EAAgBC,CAAO;"}
|