-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8878da5
commit 99bea78
Showing
6 changed files
with
220 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,75 @@ | ||
export type JHMTApiProtocol = "https:" | "http:" | "file:" | ||
export type JHMTApiProtocol = 'https:' | 'http:' | 'file:'; | ||
interface I12n { | ||
i1: string; | ||
i2: string; | ||
i3: string; | ||
i4: string; | ||
i5: string; | ||
i1: string; | ||
i2: string; | ||
i3: string; | ||
i4: string; | ||
i5: string; | ||
} | ||
|
||
export type MainVideoContentType = "content" | ||
export type EmbeddedContentType = "preroll" | "midroll" | "postroll" | ||
export type StaticContentType = "static" | ||
export type MainVideoContentType = 'content'; | ||
export type EmbeddedContentType = 'preroll' | 'midroll' | 'postroll'; | ||
export type StaticContentType = 'static'; | ||
|
||
export interface MainVideoContentMetadata { | ||
assetid: string; | ||
type: MainVideoContentType; | ||
program: string; | ||
title: string; | ||
length: string; | ||
crossId: string; | ||
livestream: string; | ||
channelId: string; | ||
attributes: string; | ||
assetid: string; | ||
type: MainVideoContentType; | ||
program: string; | ||
title: string; | ||
length: string; | ||
crossId: string; | ||
livestream: string; | ||
channelId: string; | ||
attributes: string; | ||
} | ||
|
||
interface EmbeddedContentMetadata { | ||
assetid: string; | ||
type: EmbeddedContentType; | ||
length: string; | ||
title: string; | ||
asmea: string; | ||
attributes: string; | ||
assetid: string; | ||
type: EmbeddedContentType; | ||
length: string; | ||
title: string; | ||
asmea: string; | ||
attributes: string; | ||
} | ||
|
||
|
||
interface StaticContentMetadata { | ||
assetid: string; | ||
type: MainVideoContentType; | ||
sec1: string; | ||
sec2: string; | ||
sec3: string; | ||
sec4: string; | ||
ref: string; | ||
assetid: string; | ||
type: MainVideoContentType; | ||
sec1: string; | ||
sec2: string; | ||
sec3: string; | ||
sec4: string; | ||
ref: string; | ||
} | ||
|
||
export interface PlayerState { | ||
muted: number; | ||
volume: number; | ||
triggeredByUser: number; | ||
normalSpeed: number; | ||
fullscreen: number; | ||
visibility: number; | ||
width: number; | ||
height: number; | ||
muted: number; | ||
volume: number; | ||
triggeredByUser: number; | ||
normalSpeed: number; | ||
fullscreen: number; | ||
visibility: number; | ||
width: number; | ||
height: number; | ||
} | ||
|
||
interface JHMTArray extends Array<any> { | ||
i12n: I12n; | ||
contentMetadata: ContentMetadata; | ||
playerState: PlayerState; | ||
push: (item: any) => number; // Type of the push function | ||
i12n: I12n; | ||
contentMetadata: ContentMetadata; | ||
playerState: PlayerState; | ||
push: (item: any) => number; // Type of the push function | ||
} | ||
|
||
declare global { | ||
interface Window { | ||
JHMT: JHMTArray; | ||
JHMTApi: typeof JHMTApi; | ||
JHMTApiProtocol: JHMTApiProtocol | ||
} | ||
interface Window { | ||
JHMT: JHMTArray; | ||
JHMTApi: typeof JHMTApi; | ||
JHMTApiProtocol: JHMTApiProtocol; | ||
} | ||
} | ||
|
||
export interface JHMTApi { | ||
setI12n(i12n: I12n); | ||
setContentMetadata(contentMetadata: ContentMetadata); | ||
setPlayerState(playerState: PlayerState); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export { AdScriptConnector } from './integration/AdScriptConnector'; | ||
export * from './integration/AdScriptConfiguration' | ||
export * from './integration/AdScriptConfiguration'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { Ad } from "theoplayer"; | ||
import { EmbeddedContentMetadata } from "../adscript/AdScript"; | ||
import { Ad } from 'theoplayer'; | ||
import { EmbeddedContentMetadata } from '../adscript/AdScript'; | ||
|
||
export interface AdScriptConfiguration { | ||
implementationId: string; | ||
i12n: {[key: string]: string} | ||
i12n: { [key: string]: string }; | ||
debug?: boolean; | ||
adProcessor?: (ad: Ad) => EmbeddedContentMetadata | ||
} | ||
adProcessor?: (ad: Ad) => EmbeddedContentMetadata; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.