Skip to content
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
10 changes: 9 additions & 1 deletion api-extractor/report/hls.js.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,8 @@ export class EMEController extends Logger implements ComponentAPI {
// (undocumented)
destroy(): void;
// (undocumented)
getKeyStatus(decryptdata: LevelKey): MediaKeyStatus | undefined;
// (undocumented)
getKeySystemAccess(keySystemsToAttempt: KeySystems[]): Promise<void>;
// (undocumented)
getSelectedKeySystemFormats(): KeySystemFormats[];
Expand Down Expand Up @@ -3381,6 +3383,8 @@ export class LevelKey implements DecryptData {
// (undocumented)
pssh: Uint8Array<ArrayBuffer> | null;
// (undocumented)
static setKeyIdForUri(uri: string, keyId: Uint8Array<ArrayBuffer>): void;
// (undocumented)
readonly uri: string;
}

Expand Down Expand Up @@ -3994,7 +3998,11 @@ export interface MediaKeySessionContext {
// (undocumented)
decryptdata: LevelKey;
// (undocumented)
keyStatus: MediaKeyStatus;
keyStatus?: MediaKeyStatus;
// (undocumented)
keyStatusTimeouts?: {
[keyId: string]: number;
};
// (undocumented)
keySystem: KeySystems;
// (undocumented)
Expand Down
16 changes: 12 additions & 4 deletions src/controller/base-stream-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ import {
getAesModeFromFullSegmentMethod,
isFullSegmentEncryption,
} from '../utils/encryption-methods-util';
import { getRetryDelay, offlineHttpStatus } from '../utils/error-helper';
import {
getRetryDelay,
isUnusableKeyError,
offlineHttpStatus,
} from '../utils/error-helper';
import {
addEventListener,
removeEventListener,
Expand Down Expand Up @@ -727,7 +731,9 @@ export default class BaseStreamController
) {
const media = this.media;
const error = new Error(
`Encrypted track with no key in ${this.fragInfo(frag)} (media ${media ? 'attached mediaKeys: ' + media.mediaKeys : 'detached'})`,
__USE_EME_DRM__
? `Encrypted track with no key in ${this.fragInfo(frag)} (media ${media ? 'attached mediaKeys: ' + media.mediaKeys : 'detached'})`
: 'EME not supported (light build)',
);
this.warn(error.message);
// Ignore if media is detached or mediaKeys are set
Expand All @@ -737,7 +743,7 @@ export default class BaseStreamController
this.hls.trigger(Events.ERROR, {
type: ErrorTypes.KEY_SYSTEM_ERROR,
details: ErrorDetails.KEY_SYSTEM_NO_KEYS,
fatal: false,
fatal: !__USE_EME_DRM__,
error,
frag,
});
Expand Down Expand Up @@ -1052,6 +1058,7 @@ export default class BaseStreamController
this.handleFragLoadAborted(data.frag, data.part);
} else if (data.frag && data.type === ErrorTypes.KEY_SYSTEM_ERROR) {
data.frag.abortRequests();
this.resetStartWhenNotLoaded();
this.resetFragmentLoading(data.frag);
} else {
this.hls.trigger(Events.ERROR, data as ErrorData);
Expand Down Expand Up @@ -1904,7 +1911,8 @@ export default class BaseStreamController
noAlternate &&
isMediaFragment(frag) &&
!frag.endList &&
live
live &&
!isUnusableKeyError(data)
) {
this.resetFragmentErrors(filterType);
this.treatAsGap(frag);
Expand Down
3 changes: 3 additions & 0 deletions src/controller/buffer-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,9 @@ transfer tracks: ${stringify(transferredTracks, (key, value) => (key === 'initSe
this.hls.trigger(Events.ERROR, event);
},
};
this.log(
`queuing "${type}" append sn: ${sn}${part ? ' p: ' + part.index : ''} of ${frag.type === PlaylistLevelType.MAIN ? 'level' : 'track'} ${frag.level} cc: ${cc}`,
);
this.append(operation, type, this.isPending(this.tracks[type]));
}

Expand Down
Loading
Loading