-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
75 lines (69 loc) · 3.1 KB
/
Copy pathindex.ts
File metadata and controls
75 lines (69 loc) · 3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**
* Bridge for communicating between a Livery Video Player and the interactive layer page shown within that.
*
* Exports:
*
* - Class {@link InteractiveBridge} enables a Livery interactive layer element or page to communicate with
* the surrounding Livery Player
* - Class {@link AbstractPlayerBridge} is used by LiveryPlayer for the `PlayerBridge` implementation
* (in the past: {@link LiveryBridge})
* - Type {@link LiveryBridgeTarget} for the AbstractPlayerBridge (and LiveryBridge) constructor
* - Class {@link MockPlayerBridge} is a player bridge that returns mock data for testing
* - Element {@link LiveryBridgeLog} logs messages posted to specified bridge or the window
* - Element {@link LiveryBridgeMock} mocks a LiveryPlayer with an interactive child element or iframe for testing
* - Element {@link LiveryBridgeInteractive} is an interactive element that enables testing all interactive commands
* - Variable {@link version} specifies the version of this package
* - Schema types:
* {@link AuthClaims}, {@link Config}, {@link DisplayMode}, {@link Features}, {@link InteractivePlayerOptions},
* {@link Orientation}, {@link PerformanceMode}, {@link PlaybackDetails}, {@link PlaybackMode},
* {@link PlaybackState}, {@link Qualities}, {@link Quality}, {@link StreamPhase}, {@link UserFeedback} and
* {@link Volume}.
* - Schema validators: validateAuthClaims.
*
* **Note:** When using the UMD bundle, the exports can be found as properties of `livery` in the global namespace,
* e.g: `livery.version`.
*
* @packageDocumentation
*/
/** biome-ignore-all lint/style/noExportedImports: These imports are not just exported */
import { LiveryBridgeInteractive } from './src/livery-bridge-interactive/LiveryBridgeInteractive.ts';
import { LiveryBridgeLog } from './src/livery-bridge-log/LiveryBridgeLog.ts';
import { LiveryBridgeMock } from './src/livery-bridge-mock/LiveryBridgeMock.ts';
// Custom elements
export { LiveryBridgeInteractive, LiveryBridgeLog, LiveryBridgeMock };
/**
* Livery Interactive SDK version.
*/
export const version = __VERSION__;
// biome-ignore lint/performance/noBarrelFile: Required for compatibility and it should be fine with named exports
export { AbstractPlayerBridge } from './src/AbstractPlayerBridge.ts';
export { InteractiveBridge } from './src/InteractiveBridge.ts';
export type { LiveryBridgeTarget } from './src/LiveryBridge.ts';
export { LiveryBridge } from './src/LiveryBridge.ts';
export { MockPlayerBridge } from './src/MockPlayerBridge.ts';
export type {
AuthClaims,
Config,
DisplayMode,
Features,
InteractivePlayerOptions,
Orientation,
PerformanceMode,
PlaybackDetails,
PlaybackMode,
PlaybackState,
Qualities,
Quality,
StreamPhase,
UserFeedback,
Volume,
} from './src/util/schema.ts';
export { validateAuthClaims } from './src/util/schema.ts';
// Redeclare all exported public globals to be included in our bundle, see: vite.config.ts patchDts()
declare global {
interface HTMLElementTagNameMap {
'livery-bridge-interactive': LiveryBridgeInteractive;
'livery-bridge-log': LiveryBridgeLog;
'livery-bridge-mock': LiveryBridgeMock;
}
}