ogplayer 1.1.0 → 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 +5 -1
- package/dist/ui/watermark.d.ts +25 -0
- package/package.json +1 -2
package/dist/ui/og-player.d.ts
CHANGED
|
@@ -119,8 +119,10 @@ export declare class OGPlayerElement extends HTMLElement {
|
|
|
119
119
|
private root;
|
|
120
120
|
private controlsVisible;
|
|
121
121
|
private hideTimer;
|
|
122
|
-
/** Where the last deliberate
|
|
122
|
+
/** Where the last deliberate tap-to-hide happened; gates hover-raise. */
|
|
123
123
|
private hidePoint;
|
|
124
|
+
/** Pointer type of the most recent pointerdown on the stage; "" until one lands. */
|
|
125
|
+
private lastPointerType;
|
|
124
126
|
private bufferingTimer;
|
|
125
127
|
private scrubbing;
|
|
126
128
|
private openMenu;
|
|
@@ -190,6 +192,8 @@ export declare class OGPlayerElement extends HTMLElement {
|
|
|
190
192
|
* renders its own skip/clickthrough on top of its layer). */
|
|
191
193
|
private syncAdUi;
|
|
192
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;
|
|
193
197
|
private applyCueSize;
|
|
194
198
|
/** iPhone Safari has no element fullscreen API — only the <video> element
|
|
195
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ogplayer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "OGPlayer web SDK — one video player API across Android, iOS, web and React Native.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/ogplayer.js",
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
35
35
|
"homepage": "https://ogplayer.tv/docs/getting-started/web/",
|
|
36
36
|
"bugs": {
|
|
37
|
-
"url": "https://github.com/ogplayer-sdk/ogplayer-web-demos/issues",
|
|
38
37
|
"email": "support@ogplayer.tv"
|
|
39
38
|
},
|
|
40
39
|
"keywords": [
|