Skip to content

Commit

Permalink
Add config for low latency mode
Browse files Browse the repository at this point in the history
Issue shaka-project#1525

Change-Id: I561ac50b4681036b7675efdceae70937c4b9244d
  • Loading branch information
michellezhuogg committed Jun 9, 2020
1 parent a201be4 commit 6d373eb
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions demo/common/message_ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ shakaDemo.MessageIds = {
LOG_LEVEL_V: 'DEMO_LOG_LEVEL_V',
LOG_LEVEL_VV: 'DEMO_LOG_LEVEL_VV',
LOG_LICENSE_EXCHANGE: 'DEMO_LOG_LICENSE_EXCHANGE',
LOW_LATENCY: 'DEMO_LOW_LATENCY',
MANIFEST_RETRY_SECTION_HEADER: 'DEMO_MANIFEST_RETRY_SECTION_HEADER',
MANIFEST_SECTION_HEADER: 'DEMO_MANIFEST_SECTION_HEADER',
MAX_ATTEMPTS: 'DEMO_MAX_ATTEMPTS',
Expand Down
4 changes: 3 additions & 1 deletion demo/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ shakaDemo.Config = class {
.addBoolInput_(MessageIds.DISABLE_VIDEO,
'manifest.disableVideo')
.addBoolInput_(MessageIds.DISABLE_TEXT,
'manifest.disableText');
'manifest.disableText')
.addBoolInput_(MessageIds.LOW_LATENCY,
'manifest.lowLatencyMode');

this.addRetrySection_('manifest', MessageIds.MANIFEST_RETRY_SECTION_HEADER);
}
Expand Down
1 change: 1 addition & 0 deletions demo/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"DEMO_LOG_LEVEL_V": "Verbose",
"DEMO_LOG_LEVEL_VV": "Very Verbose",
"DEMO_LOG_LICENSE_EXCHANGE": "Log license exchange data",
"DEMO_LOW_LATENCY": "Low Latency Mode",
"DEMO_MANIFEST_RETRY_SECTION_HEADER": "Manifest Retry Parameters",
"DEMO_MANIFEST_SEARCH": "Manifest",
"DEMO_MANIFEST_SECTION_HEADER": "Manifest",
Expand Down
4 changes: 4 additions & 0 deletions demo/locales/source.json
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@
"description": "The label on a field that allows users to select whether to log data about the license exchange",
"message": "Log license exchange data"
},
"DEMO_LOW_LATENCY": {
"description": "The name of a configuration value.",
"message": "Low Latency Streaming"
},
"DEMO_MANIFEST_RETRY_SECTION_HEADER": {
"description": "The header for a section of configuration values.",
"message": "Manifest Retry Parameters"
Expand Down
5 changes: 4 additions & 1 deletion externs/shaka/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,8 @@ shaka.extern.HlsManifestConfiguration;
* disableText: boolean,
* defaultPresentationDelay: number,
* dash: shaka.extern.DashManifestConfiguration,
* hls: shaka.extern.HlsManifestConfiguration
* hls: shaka.extern.HlsManifestConfiguration,
* lowLatencyMode: boolean
* }}
*
* @property {shaka.extern.RetryParameters} retryParameters
Expand Down Expand Up @@ -692,6 +693,8 @@ shaka.extern.HlsManifestConfiguration;
* Advanced parameters used by the DASH manifest parser.
* @property {shaka.extern.HlsManifestConfiguration} hls
* Advanced parameters used by the HLS manifest parser.
* @property {boolean} lowLatencyMode
* If <code>true</code>, low latency streaming mode is enabled.
*
* @exportDoc
*/
Expand Down
1 change: 1 addition & 0 deletions lib/util/player_configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ shaka.util.PlayerConfiguration = class {
disableVideo: false,
disableText: false,
defaultPresentationDelay: 0,
lowLatencyMode: false,
dash: {
clockSyncUri: '',
ignoreDrmInfo: false,
Expand Down

0 comments on commit 6d373eb

Please sign in to comment.