forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from jwplayer/feat/AD-1327
Video Module - Add JW Player Submodule
- Loading branch information
Showing
9 changed files
with
1,819 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Life Cycle | ||
export const SETUP_COMPLETE = 'setupComplete'; | ||
export const SETUP_FAILED = 'setupFailed'; | ||
export const DESTROYED = 'destroyed'; | ||
|
||
// Ads | ||
export const AD_REQUEST = 'adRequest'; | ||
export const AD_BREAK_START = 'adBreakStart'; | ||
export const AD_LOADED = 'adLoaded'; | ||
export const AD_STARTED = 'adStarted'; | ||
export const AD_IMPRESSION = 'adImpression'; | ||
export const AD_PLAY = 'adPlay'; | ||
export const AD_TIME = 'adTime'; | ||
export const AD_PAUSE = 'adPause'; | ||
export const AD_CLICK = 'adClick'; | ||
export const AD_SKIPPED = 'adSkipped'; | ||
export const AD_ERROR = 'adError'; | ||
export const AD_COMPLETE = 'adComplete'; | ||
export const AD_BREAK_END = 'adBreakEnd'; | ||
|
||
// Media | ||
export const PLAYLIST = 'playlist'; | ||
export const PLAYBACK_REQUEST = 'playbackRequest'; | ||
export const AUTOSTART_BLOCKED = 'autostartBlocked'; | ||
export const PLAY_ATTEMPT_FAILED = 'playAttemptFailed'; | ||
export const CONTENT_LOADED = 'contentLoaded'; | ||
export const PLAY = 'play'; | ||
export const PAUSE = 'pause'; | ||
export const BUFFER = 'buffer'; | ||
export const TIME = 'time'; | ||
export const SEEK_START = 'seekStart'; | ||
export const SEEK_END = 'seekEnd'; | ||
export const MUTE = 'mute'; | ||
export const VOLUME = 'volume'; | ||
export const RENDITION_UPDATE = 'renditionUpdate'; | ||
export const ERROR = 'error'; | ||
export const COMPLETE = 'complete'; | ||
export const PLAYLIST_COMPLETE = 'playlistComplete'; | ||
|
||
// Layout | ||
export const FULLSCREEN = 'fullscreen'; | ||
export const PLAYER_RESIZE = 'playerResize'; | ||
export const VIEWABLE = 'viewable'; | ||
export const CAST = 'cast'; | ||
|
||
// Param options | ||
export const PLAYBACK_MODE = { | ||
VOD: 0, | ||
LIVE: 1, | ||
DVR: 2 | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
|
||
const VIDEO_PREFIX = 'video/' | ||
|
||
/* | ||
ORTB 2.5 section 3.2.7 - Video.mimes | ||
*/ | ||
export const VIDEO_MIME_TYPE = { | ||
MP4: VIDEO_PREFIX + 'mp4', | ||
MPEG: VIDEO_PREFIX + 'mpeg', | ||
OGG: VIDEO_PREFIX + 'ogg', | ||
WEBM: VIDEO_PREFIX + 'webm', | ||
AAC: VIDEO_PREFIX + 'aac', | ||
HLS: 'application/vnd.apple.mpegurl' | ||
}; | ||
|
||
export const JS_APP_MIME_TYPE = 'application/javascript'; | ||
export const VPAID_MIME_TYPE = JS_APP_MIME_TYPE; | ||
|
||
/* | ||
ORTB 2.5 section 5.9 - Video Placement Types | ||
*/ | ||
export const PLACEMENT = { | ||
IN_STREAM: 1, | ||
BANNER: 2, | ||
ARTICLE: 3, | ||
FEED: 4, | ||
INTERSTITIAL: 5, | ||
SLIDER: 5, | ||
FLOATING: 5, | ||
INTERSTITIAL_SLIDER_FLOATING: 5 | ||
}; | ||
|
||
/* | ||
ORTB 2.5 section 5.10 - Playback Methods | ||
*/ | ||
export const PLAYBACK_METHODS = { | ||
AUTOPLAY: 1, | ||
AUTOPLAY_MUTED: 2, | ||
CLICK_TO_PLAY: 3, | ||
CLICK_TO_PLAY_MUTED: 4, | ||
VIEWABLE: 5, | ||
VIEWABLE_MUTED: 6 | ||
}; | ||
|
||
/* | ||
ORTB 2.5 section 5.8 - Protocols | ||
*/ | ||
export const PROTOCOLS = { | ||
// VAST_1_0: 1, | ||
VAST_2_0: 2, | ||
VAST_3_0: 3, | ||
// VAST_1_O_WRAPPER: 4, | ||
VAST_2_0_WRAPPER: 5, | ||
VAST_3_0_WRAPPER: 6, | ||
VAST_4_0: 7, | ||
VAST_4_0_WRAPPER: 8 | ||
}; | ||
|
||
/* | ||
ORTB 2.5 section 5.6 - API Frameworks | ||
*/ | ||
export const API_FRAMEWORKS = { | ||
VPAID_1_0: 1, | ||
VPAID_2_0: 2, | ||
OMID_1_0: 7 | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export const JWPLAYER_VENDOR = 1; | ||
export const VIDEO_JS_VENDOR = 2; |
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export default function stateFactory() { | ||
let state = {}; | ||
|
||
function updateState(stateUpdate) { | ||
Object.assign(state, stateUpdate); | ||
} | ||
|
||
function getState() { | ||
return state; | ||
} | ||
|
||
function clearState() { | ||
state = {}; | ||
} | ||
|
||
return { | ||
updateState, | ||
getState, | ||
clearState | ||
}; | ||
} |
Oops, something went wrong.