diff --git a/demo/common/message_ids.js b/demo/common/message_ids.js index e3b024ce4d..f51327d23a 100644 --- a/demo/common/message_ids.js +++ b/demo/common/message_ids.js @@ -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', diff --git a/demo/config.js b/demo/config.js index 8a6449d939..0268cc55e6 100644 --- a/demo/config.js +++ b/demo/config.js @@ -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); } diff --git a/demo/locales/en.json b/demo/locales/en.json index ba9b4f8c90..80e7528e27 100644 --- a/demo/locales/en.json +++ b/demo/locales/en.json @@ -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", diff --git a/demo/locales/source.json b/demo/locales/source.json index e23e1ce363..c0869b1a78 100644 --- a/demo/locales/source.json +++ b/demo/locales/source.json @@ -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" diff --git a/externs/shaka/player.js b/externs/shaka/player.js index e862497c90..930567389e 100644 --- a/externs/shaka/player.js +++ b/externs/shaka/player.js @@ -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 @@ -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 true, low latency streaming mode is enabled. * * @exportDoc */ diff --git a/lib/util/player_configuration.js b/lib/util/player_configuration.js index ff03e7ed52..996ba6548f 100644 --- a/lib/util/player_configuration.js +++ b/lib/util/player_configuration.js @@ -83,6 +83,7 @@ shaka.util.PlayerConfiguration = class { disableVideo: false, disableText: false, defaultPresentationDelay: 0, + lowLatencyMode: false, dash: { clockSyncUri: '', ignoreDrmInfo: false,