ogplayer 1.1.1 → 1.2.0
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 +8 -32
- package/dist/core/errors.d.ts +7 -1
- package/dist/core/types.d.ts +20 -0
- package/dist/ogplayer.global.js +23 -23
- package/dist/ogplayer.js +23 -23
- package/dist/ui/og-player.d.ts +2 -0
- package/dist/ui/watermark.d.ts +25 -0
- package/package.json +1 -1
package/dist/ui/og-player.d.ts
CHANGED
|
@@ -192,6 +192,8 @@ export declare class OGPlayerElement extends HTMLElement {
|
|
|
192
192
|
* renders its own skip/clickthrough on top of its layer). */
|
|
193
193
|
private syncAdUi;
|
|
194
194
|
private syncWatermark;
|
|
195
|
+
/** Same markup as the template's `.watermark` — used when the node was removed from the open shadow root. */
|
|
196
|
+
private createWatermarkNode;
|
|
195
197
|
private applyCueSize;
|
|
196
198
|
/** iPhone Safari has no element fullscreen API — only the <video> element
|
|
197
199
|
* can go fullscreen, through Apple's native player. Detect and fall back. */
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unlicensed-watermark node upkeep, kept player-free so it can be unit-tested
|
|
3
|
+
* without a DOM.
|
|
4
|
+
*
|
|
5
|
+
* The <og-player> shadow root is OPEN, so a host page can reach in and remove
|
|
6
|
+
* the `.watermark` node — a developer poking at the DOM, a cleanup script.
|
|
7
|
+
* Two consequences this guards against: (1) the next control sync must not
|
|
8
|
+
* throw on the missing node and take every other overlay down with it, and
|
|
9
|
+
* (2) while the player is unlicensed the mark is re-created on the next sync,
|
|
10
|
+
* so a removal lasts only until the next player event — the same standing as
|
|
11
|
+
* Android/iOS, where the mark is a composable / SwiftUI view with no
|
|
12
|
+
* addressable instance to remove. Tampering with the mark is a terms-of-use
|
|
13
|
+
* matter either way (terms §3); this keeps the SDK's own behaviour consistent.
|
|
14
|
+
*/
|
|
15
|
+
export interface WatermarkHost {
|
|
16
|
+
querySelector(selectors: string): Element | null;
|
|
17
|
+
insertBefore<T extends Node>(node: T, child: Node | null): T;
|
|
18
|
+
appendChild<T extends Node>(node: T): T;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Makes `.watermark` reflect `licensed`: hidden when licensed, shown (and
|
|
22
|
+
* re-created via `create` if missing) when not. Returns the node, or null when
|
|
23
|
+
* licensed and absent — nothing to show, nothing to build.
|
|
24
|
+
*/
|
|
25
|
+
export declare function syncWatermarkNode(root: WatermarkHost, licensed: boolean, create: () => HTMLElement): HTMLElement | null;
|