-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Today we have a very nested config object hard to reason and manage. We would like to change it to: const config = { "targetId": "player-placeholder", "logLevel": "DEBUG", "disableUserCache": true, "sources": {}, "playback": {}, "session": {}, "plugins": {}, "provider": {}, "ui": {} } The main change is moving the metadata and other source related info into the sources config, and mainly flattening the config hierarchy, which makes it more concise and easy to create and manipulate. A more full example will be: "targetId": "player-placeholder", "logLevel": "DEBUG", "disableUserCache": true, "sources": { "hls": [{}], "dash": [{}], "progressive": [{}], "duration": 741, "type": "Vod", "dvr": false, "id": "0_wifqaipd", "options": { "forceRedirectExternalStreams": false }, "poster": "", "metadata": { "name": "MPEG Dash with MultiAudio New Transcoding", "MediaType": "Movie", "WatchPermissionRule": "Parrent Allowed" } }, "playback": { "audioLanguage": "", "textLanguage": "", "useNativeTextTrack": false, "volume": 1, "startTime": 0, "playsinline": true, "preload": "none", "autoplay": false, "allowMutedAutoPlay": true, "muted": false, "options": { "html5": { "hls": {}, "dash": {} } }, "preferNative": { "hls": false, "dash": false }, "streamPriority": [ { "engine": "html5", "format": "hls" }, { "engine": "html5", "format": "dash" }, { "engine": "html5", "format": "progressive" } ] }, "session": { "id": "a957e334-c878-a0b2-54d9-3c52e2682c7f:68ee462c-f43a-9b5d-3079-8d8402d51a24", "partnerId": 1091, "ks": "OTAwOGUyMmQwY2JmYzI3NWZiODM3MzgzY2ZkNjNkZWVjZGI4MTdhYXwxMDkxOzEwOTE7MTUyNTE3NDI4NjswOzE1MjUwODc4ODYuOTA0MTswO3ZpZXc6Kix3aWRnZXQ6MTs7" }, "plugins": {}, "provider": {}, "ui": {} Change will be backward compatible and will mainly be managed in the kaltura-player layer which will make sure each component will be getting its relevant data.
- Loading branch information
Dan Ziv
authored
May 6, 2018
1 parent
0431297
commit 3f89ef3
Showing
36 changed files
with
889 additions
and
305 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
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
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
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 |
---|---|---|
@@ -1,19 +1,33 @@ | ||
// @flow | ||
declare type KalturaPlayerOptionsObject = { | ||
targetId: string, | ||
logLevel?: string, | ||
disableUserCache?: boolean, | ||
playback?: PKPlaybackConfigObject, | ||
sources?: PKSourcesConfigObject, | ||
plugins?: PKPluginsConfigObject, | ||
session?: PKSessionConfigObject, | ||
provider: ProviderOptionsObject, | ||
ui: UIOptionsObject | ||
}; | ||
|
||
declare type PartialKalturaPlayerOptionsObject = { | ||
targetId: string, | ||
logLevel?: string, | ||
disableUserCache?: boolean, | ||
player?: PKPlayerOptionsObject, | ||
playback?: PKPlaybackConfigObject, | ||
sources?: PKSourcesConfigObject, | ||
plugins?: PKPluginsConfigObject, | ||
session?: PKSessionConfigObject, | ||
provider: ProviderOptionsObject, | ||
ui?: UIOptionsObject | ||
}; | ||
|
||
declare type KalturaPlayerOptionsObject = { | ||
declare type LegacyPartialKalturaPlayerOptionsObject = { | ||
targetId: string, | ||
logLevel?: string, | ||
disableUserCache?: boolean, | ||
player: PKPlayerOptionsObject, | ||
player?: PKPlayerOptionsObject, | ||
provider: ProviderOptionsObject, | ||
ui: UIOptionsObject | ||
ui?: UIOptionsObject | ||
}; | ||
|
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
Oops, something went wrong.