Skip to content

Commit

Permalink
feat(HLS): Improve Low Latency performance in HLS (shaka-project#4952)
Browse files Browse the repository at this point in the history
In Low Latency HLS, the low latency segments are integer segments
instead of partial segments like in DASH, so we can avoid reading part
of the segment and increase performance on low-end devices.
  • Loading branch information
avelad committed Jan 31, 2023
1 parent b441518 commit 5514385
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/media/streaming_engine.js
Expand Up @@ -1261,10 +1261,9 @@ shaka.media.StreamingEngine = class {
stream.mimeType == 'audio/mp4';
const isReadableStreamSupported = window.ReadableStream;
// Enable MP4 low latency streaming with ReadableStream chunked data.
// Disabled when AES-128 is present, as we cannot decrypt part of a
// segment.
// And only for DASH.
if (this.config_.lowLatencyMode && isReadableStreamSupported && isMP4 &&
!reference.hlsAes128Key) {
this.manifest_.type != shaka.media.ManifestParser.HLS) {
let remaining = new Uint8Array(0);
let processingResult = false;
let callbackCalled = false;
Expand Down

0 comments on commit 5514385

Please sign in to comment.