Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Demo): Simplify low latency assets config #8178

Merged
merged 1 commit into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion demo/common/asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ const ShakaDemoAssetInfo = class {
*/
getConfiguration(forStorage = false) {
const config = /** @type {shaka.extern.PlayerConfiguration} */(
{drm: {advanced: {}}, manifest: {dash: {}, hls: {}}});
{drm: {advanced: {}}, manifest: {dash: {}, hls: {}}, streaming: {}});

if (this.extraConfig) {
for (const key in this.extraConfig) {
Expand Down Expand Up @@ -528,6 +528,10 @@ const ShakaDemoAssetInfo = class {
});
}

if (this.features.includes(shakaAssets.Feature.LOW_LATENCY)) {
config.streaming.lowLatencyMode = true;
}

// Windows Edge only support persistent licenses with
// `com.microsoft.playready.recommendation` keySystem.
if (forStorage &&
Expand Down
49 changes: 7 additions & 42 deletions demo/common/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -941,12 +941,7 @@ shakaAssets.testAssets = [
.addFeature(shakaAssets.Feature.DASH)
.addFeature(shakaAssets.Feature.LIVE)
.addFeature(shakaAssets.Feature.MP4)
.addFeature(shakaAssets.Feature.LOW_LATENCY)
.setExtraConfig({
streaming: {
lowLatencyMode: true,
},
}),
.addFeature(shakaAssets.Feature.LOW_LATENCY),
new ShakaDemoAssetInfo(
/* name= */ 'Live sim (CBCS single key)',
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/dash_if_test_pattern.png',
Expand Down Expand Up @@ -992,12 +987,7 @@ shakaAssets.testAssets = [
.addFeature(shakaAssets.Feature.DASH)
.addFeature(shakaAssets.Feature.LIVE)
.addFeature(shakaAssets.Feature.MP4)
.addFeature(shakaAssets.Feature.LOW_LATENCY)
.setExtraConfig({
streaming: {
lowLatencyMode: true,
},
}),
.addFeature(shakaAssets.Feature.LOW_LATENCY),
new ShakaDemoAssetInfo(
/* name= */ 'DASH-IF THUMBNAILS - Single adaptation set, 7 tiles at 10x1, each thumb 320x180',
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/dash_if_test_pattern.png',
Expand Down Expand Up @@ -1371,12 +1361,7 @@ shakaAssets.testAssets = [
.addFeature(shakaAssets.Feature.HLS)
.addFeature(shakaAssets.Feature.LIVE)
.addFeature(shakaAssets.Feature.MP4)
.addFeature(shakaAssets.Feature.LOW_LATENCY)
.setExtraConfig({
streaming: {
lowLatencyMode: true,
},
}),
.addFeature(shakaAssets.Feature.LOW_LATENCY),
new ShakaDemoAssetInfo(
/* name= */ 'Audio only HLS with raw AAC',
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/apple_test_pattern.png',
Expand Down Expand Up @@ -1724,12 +1709,7 @@ shakaAssets.testAssets = [
.addFeature(shakaAssets.Feature.MP4)
.addFeature(shakaAssets.Feature.LIVE)
.addFeature(shakaAssets.Feature.LOW_LATENCY)
.addFeature(shakaAssets.Feature.CMSD)
.setExtraConfig({
streaming: {
lowLatencyMode: true,
},
}),
.addFeature(shakaAssets.Feature.CMSD),
new ShakaDemoAssetInfo(
/* name= */ 'Live low latency (SegmentTimeline, CMSD)',
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/spring.png',
Expand All @@ -1740,12 +1720,7 @@ shakaAssets.testAssets = [
.addFeature(shakaAssets.Feature.MP4)
.addFeature(shakaAssets.Feature.LIVE)
.addFeature(shakaAssets.Feature.LOW_LATENCY)
.addFeature(shakaAssets.Feature.CMSD)
.setExtraConfig({
streaming: {
lowLatencyMode: true,
},
}),
.addFeature(shakaAssets.Feature.CMSD),
// }}}

// EZDRM assets {{{
Expand Down Expand Up @@ -1914,12 +1889,7 @@ shakaAssets.testAssets = [
.addFeature(shakaAssets.Feature.SUBTITLES)
.addFeature(shakaAssets.Feature.SURROUND)
.addFeature(shakaAssets.Feature.LIVE)
.addFeature(shakaAssets.Feature.LOW_LATENCY)
.setExtraConfig({
streaming: {
lowLatencyMode: true,
},
}),
.addFeature(shakaAssets.Feature.LOW_LATENCY),
new ShakaDemoAssetInfo(
/* name= */ 'Low-Latency Live Testcard - 4 Chunks per Segment, Multiple Languages, HEVC Video',
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/bbc.png',
Expand All @@ -1932,12 +1902,7 @@ shakaAssets.testAssets = [
.addFeature(shakaAssets.Feature.SUBTITLES)
.addFeature(shakaAssets.Feature.SURROUND)
.addFeature(shakaAssets.Feature.LIVE)
.addFeature(shakaAssets.Feature.LOW_LATENCY)
.setExtraConfig({
streaming: {
lowLatencyMode: true,
},
}),
.addFeature(shakaAssets.Feature.LOW_LATENCY),
new ShakaDemoAssetInfo(
/* name= */ 'On-demand Elephant\'s Dream - with EBU-TT-D Subtitle Track in English',
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/elephant.png',
Expand Down