playron 1.0.27 → 1.0.30
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/dist/ErrorManager-CDe8Eb5Z.cjs +1 -0
- package/dist/ErrorManager-xIOtWf0n.js +1 -0
- package/dist/core/license/LicenseValidator.d.ts +30 -0
- package/dist/core/license/LicenseValidator.d.ts.map +1 -0
- package/dist/playron.cjs.js +1 -253
- package/dist/playron.css +1 -1
- package/dist/playron.es.js +297 -48485
- package/dist/types/config.types.d.ts +6 -0
- package/dist/types/config.types.d.ts.map +1 -1
- package/dist/ui/Controls/FullscreenButton.d.ts +1 -1
- package/dist/ui/Controls/FullscreenButton.d.ts.map +1 -1
- package/dist/ui/Controls/PlayButton.d.ts +1 -1
- package/dist/ui/Controls/PlayButton.d.ts.map +1 -1
- package/dist/ui/Controls/SettingsPanel.d.ts +2 -2
- package/dist/ui/Controls/SettingsPanel.d.ts.map +1 -1
- package/dist/ui/Controls/SkipBackwardButton.d.ts +1 -1
- package/dist/ui/Controls/SkipBackwardButton.d.ts.map +1 -1
- package/dist/ui/Controls/SkipForwardButton.d.ts +1 -1
- package/dist/ui/Controls/SkipForwardButton.d.ts.map +1 -1
- package/dist/ui/Controls/VolumeControl.d.ts +1 -1
- package/dist/ui/Controls/VolumeControl.d.ts.map +1 -1
- package/dist/ui/Overlay/LicenseOverlay.d.ts +12 -0
- package/dist/ui/Overlay/LicenseOverlay.d.ts.map +1 -0
- package/dist/ui/Player.d.ts.map +1 -1
- package/package.json +2 -1
- package/dist/ErrorManager-CDf_sFKX.cjs +0 -1
- package/dist/ErrorManager-i9WcRsWb.js +0 -43
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class t{static instance;listeners=new Set;errorHistory=[];constructor(){}static getInstance(){return t.instance||(t.instance=new t),t.instance}registerListener(t){this.listeners.add(t)}unregisterListener(t){this.listeners.delete(t)}dispatchError(t,e,s,r){const i={category:t,code:e,message:s,details:r,timestamp:Date.now()};return this.errorHistory.push(i),this.listeners.forEach(t=>{try{t(i)}catch(e){}}),i}getHistory(){return[...this.errorHistory]}clearHistory(){this.errorHistory=[]}}const e=t.getInstance();exports.ErrorManager=t,exports.errorManager=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class t{static instance;listeners=/* @__PURE__ */new Set;errorHistory=[];constructor(){}static getInstance(){return t.instance||(t.instance=new t),t.instance}registerListener(t){this.listeners.add(t)}unregisterListener(t){this.listeners.delete(t)}dispatchError(t,e,s,r){const i={category:t,code:e,message:s,details:r,timestamp:Date.now()};return this.errorHistory.push(i),this.listeners.forEach(t=>{try{t(i)}catch(e){}}),i}getHistory(){return[...this.errorHistory]}clearHistory(){this.errorHistory=[]}}const e=t.getInstance();export{t as ErrorManager,e as errorManager};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Playron License Validator
|
|
3
|
+
*
|
|
4
|
+
* Validates the `licenseKey` prop passed to the player.
|
|
5
|
+
* Flow:
|
|
6
|
+
* 1. No key → trial (watermark shown)
|
|
7
|
+
* 2. Invalid format → trial (watermark shown)
|
|
8
|
+
* 3. sessionStorage hit→ cached result (fast path)
|
|
9
|
+
* 4. Server validate → result cached for 1 hour
|
|
10
|
+
* 5. Server timeout → trial (conservative — show watermark)
|
|
11
|
+
*
|
|
12
|
+
* Playback is never blocked; the watermark is the only consequence.
|
|
13
|
+
*/
|
|
14
|
+
export type LicenseTier = 'trial' | 'standard' | 'enterprise';
|
|
15
|
+
export interface LicenseStatus {
|
|
16
|
+
/** Whether the key is valid for the current domain */
|
|
17
|
+
valid: boolean;
|
|
18
|
+
/** Feature tier granted by this key */
|
|
19
|
+
tier: LicenseTier;
|
|
20
|
+
/** ISO date string when the license expires, null = never */
|
|
21
|
+
expiresAt?: string | null;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Validates the Playron license key for the current domain.
|
|
25
|
+
*
|
|
26
|
+
* @param licenseKey - Value from `config.licenseKey`
|
|
27
|
+
* @returns Resolved `LicenseStatus` (never throws)
|
|
28
|
+
*/
|
|
29
|
+
export declare function validateLicense(licenseKey: string | undefined): Promise<LicenseStatus>;
|
|
30
|
+
//# sourceMappingURL=LicenseValidator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LicenseValidator.d.ts","sourceRoot":"","sources":["../../../src/core/license/LicenseValidator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAiBH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,YAAY,CAAC;AAE9D,MAAM,WAAW,aAAa;IAC5B,sDAAsD;IACtD,KAAK,EAAE,OAAO,CAAC;IACf,uCAAuC;IACvC,IAAI,EAAE,WAAW,CAAC;IAClB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAqFD;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,CA4B5F"}
|