Skip to content

Commit

Permalink
Merge branch 'master' into issue/4756-xbox-cc
Browse files Browse the repository at this point in the history
  • Loading branch information
littlespex authored Jul 14, 2022
2 parents 86886da + 9d66046 commit 8ed9c80
Show file tree
Hide file tree
Showing 28 changed files with 2,937 additions and 3,724 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ HLS.js is written in [ECMAScript6] (`*.js`) and [TypeScript] (`*.ts`) (strongly
- Packetized metadata (ID3v2.3.0) Elementary Stream
- AAC container (audio only streams)
- MPEG Audio container (MPEG-1/2 Audio Layer III audio only streams)
- Timed Metadata for HTTP Live Streaming (in ID3 format, carried in MPEG-2 TS and FMP4 Emsg)
- Timed Metadata for HTTP Live Streaming (ID3 format carried in MPEG-2 TS, Emsg in CMAF/Fragmented MP4, and DATERANGE playlist tags)
- AES-128 decryption
- SAMPLE-AES decryption (only supported if using MPEG-2 TS container)
- Encrypted media extensions (EME) support for DRM (digital rights management)
Expand Down Expand Up @@ -102,18 +102,17 @@ The following properties are added to their respective variants' attribute list
- `#EXT-X-PRELOAD-HINT:<attribute-list>`
- `#EXT-X-SKIP:<attribute-list>`
- `#EXT-X-RENDITION-REPORT:<attribute-list>`
- `#EXT-X-DATERANGE:<attribute-list>`

The following tags are added to their respective fragment's attribute list but are not implemented in streaming and playback.

- `#EXT-X-DATERANGE:<attribute-list>` (Not added to metadata TextTracks. See [#2218](https://github.com/video-dev/hls.js/issues/2218))
- `#EXT-X-BITRATE` (Not used in ABR controller)
- `#EXT-X-GAP` (Not implemented. See [#2940](https://github.com/video-dev/hls.js/issues/2940))

### Not Supported

For a complete list of issues, see ["Top priorities" in the Release Planning and Backlog project tab](https://github.com/video-dev/hls.js/projects/6). Codec support is dependent on the runtime environment (for example, not all browsers on the same OS support HEVC).

- `#EXT-X-DATERANGE` in "metadata" TextTracks [#2218](https://github.com/video-dev/hls.js/issues/2218)
- `#EXT-X-GAP` filling [#2940](https://github.com/video-dev/hls.js/issues/2940)
- `#EXT-X-I-FRAME-STREAM-INF` I-frame Media Playlist files
- `SAMPLE-AES` with fmp4, aac, mp3, vtt... segments (MPEG-2 TS only)
Expand Down
83 changes: 69 additions & 14 deletions api-extractor/report/hls.js.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,31 @@ export interface CuesParsedData {
type: 'captions' | 'subtitles';
}

// Warning: (ae-missing-release-tag) "DateRange" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class DateRange {
constructor(dateRangeAttr: AttrList, dateRangeWithSameId?: DateRange);
// (undocumented)
attr: AttrList;
// (undocumented)
get class(): string;
// (undocumented)
get duration(): number | null;
// (undocumented)
get endDate(): Date | null;
// (undocumented)
get endOnNext(): boolean;
// (undocumented)
get id(): string;
// (undocumented)
get isValid(): boolean;
// (undocumented)
get plannedDuration(): number | null;
// (undocumented)
get startDate(): Date;
}

// Warning: (ae-missing-release-tag) "DRMSystemOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
Expand Down Expand Up @@ -813,6 +838,8 @@ export interface FragParsingInitSegmentData {
//
// @public (undocumented)
export interface FragParsingMetadataData {
// (undocumented)
details: LevelDetails;
// (undocumented)
frag: Fragment;
// (undocumented)
Expand All @@ -825,6 +852,8 @@ export interface FragParsingMetadataData {
//
// @public (undocumented)
export interface FragParsingUserdataData {
// (undocumented)
details: LevelDetails;
// (undocumented)
frag: Fragment;
// (undocumented)
Expand Down Expand Up @@ -914,6 +943,7 @@ class Hls implements HlsEventEmitter {
on<E extends keyof HlsListeners, Context = undefined>(event: E, listener: HlsListeners[E], context?: Context): void;
// (undocumented)
once<E extends keyof HlsListeners, Context = undefined>(event: E, listener: HlsListeners[E], context?: Context): void;
get playingDate(): Date | null;
recoverMediaError(): void;
// (undocumented)
removeAllListeners<E extends keyof HlsListeners>(event?: E | undefined): void;
Expand Down Expand Up @@ -980,7 +1010,7 @@ export type HlsConfig = {
fpsController: typeof FPSController;
progressive: boolean;
lowLatencyMode: boolean;
} & ABRControllerConfig & BufferControllerConfig & CapLevelControllerConfig & EMEControllerConfig & FPSControllerConfig & FragmentLoaderConfig & LevelControllerConfig & MP4RemuxerConfig & PlaylistLoaderConfig & StreamControllerConfig & LatencyControllerConfig & TimelineControllerConfig & TSDemuxerConfig;
} & ABRControllerConfig & BufferControllerConfig & CapLevelControllerConfig & EMEControllerConfig & FPSControllerConfig & FragmentLoaderConfig & LevelControllerConfig & MP4RemuxerConfig & PlaylistLoaderConfig & StreamControllerConfig & LatencyControllerConfig & MetadataControllerConfig & TimelineControllerConfig & TSDemuxerConfig;

// Warning: (ae-missing-release-tag) "HlsEventEmitter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
Expand Down Expand Up @@ -1338,6 +1368,8 @@ export class LevelDetails {
// (undocumented)
canSkipUntil: number;
// (undocumented)
dateRanges: Record<string, DateRange>;
// (undocumented)
deltaUpdateFailed?: boolean;
// (undocumented)
get drift(): number;
Expand Down Expand Up @@ -1829,6 +1861,15 @@ export interface MediaPlaylist extends LevelParsed {
// @public (undocumented)
export type MediaPlaylistType = MainPlaylistType | SubtitlePlaylistType;

// Warning: (ae-missing-release-tag) "MetadataControllerConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type MetadataControllerConfig = {
enableDateRangeMetadataCues: boolean;
enableEmsgMetadataCues: boolean;
enableID3MetadataCues: boolean;
};

// Warning: (ae-missing-release-tag) "MetadataSample" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
Expand All @@ -1841,6 +1882,20 @@ export interface MetadataSample {
len?: number;
// (undocumented)
pts: number;
// (undocumented)
type: MetadataSchema;
}

// Warning: (ae-missing-release-tag) "MetadataSchema" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export enum MetadataSchema {
// (undocumented)
audioId3 = "org.id3",
// (undocumented)
dateRange = "com.apple.quicktime.HLS",
// (undocumented)
emsg = "https://aomedia.org/emsg/ID3"
}

// Warning: (ae-missing-release-tag) "MP4RemuxerConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Expand Down Expand Up @@ -2054,9 +2109,9 @@ export interface SubtitleTrackSwitchData {
// @public (undocumented)
export type TimelineControllerConfig = {
cueHandler: CuesInterface;
enableCEA708Captions: boolean;
enableWebVTT: boolean;
enableIMSC1: boolean;
enableCEA708Captions: boolean;
captionsTextTrack1Label: string;
captionsTextTrack1LanguageCode: string;
captionsTextTrack2Label: string;
Expand Down Expand Up @@ -2161,18 +2216,18 @@ export interface UserdataSample {

// Warnings were encountered during analysis:
//
// src/config.ts:163:3 - (ae-forgotten-export) The symbol "ILogger" needs to be exported by the entry point hls.d.ts
// src/config.ts:173:3 - (ae-forgotten-export) The symbol "AudioStreamController" needs to be exported by the entry point hls.d.ts
// src/config.ts:174:3 - (ae-forgotten-export) The symbol "AudioTrackController" needs to be exported by the entry point hls.d.ts
// src/config.ts:176:3 - (ae-forgotten-export) The symbol "SubtitleStreamController" needs to be exported by the entry point hls.d.ts
// src/config.ts:177:3 - (ae-forgotten-export) The symbol "SubtitleTrackController" needs to be exported by the entry point hls.d.ts
// src/config.ts:178:3 - (ae-forgotten-export) The symbol "TimelineController" needs to be exported by the entry point hls.d.ts
// src/config.ts:180:3 - (ae-forgotten-export) The symbol "EMEController" needs to be exported by the entry point hls.d.ts
// src/config.ts:183:3 - (ae-forgotten-export) The symbol "CMCDController" needs to be exported by the entry point hls.d.ts
// src/config.ts:185:3 - (ae-forgotten-export) The symbol "AbrController" needs to be exported by the entry point hls.d.ts
// src/config.ts:186:3 - (ae-forgotten-export) The symbol "BufferController" needs to be exported by the entry point hls.d.ts
// src/config.ts:187:3 - (ae-forgotten-export) The symbol "CapLevelController" needs to be exported by the entry point hls.d.ts
// src/config.ts:188:3 - (ae-forgotten-export) The symbol "FPSController" needs to be exported by the entry point hls.d.ts
// src/config.ts:169:3 - (ae-forgotten-export) The symbol "ILogger" needs to be exported by the entry point hls.d.ts
// src/config.ts:179:3 - (ae-forgotten-export) The symbol "AudioStreamController" needs to be exported by the entry point hls.d.ts
// src/config.ts:180:3 - (ae-forgotten-export) The symbol "AudioTrackController" needs to be exported by the entry point hls.d.ts
// src/config.ts:182:3 - (ae-forgotten-export) The symbol "SubtitleStreamController" needs to be exported by the entry point hls.d.ts
// src/config.ts:183:3 - (ae-forgotten-export) The symbol "SubtitleTrackController" needs to be exported by the entry point hls.d.ts
// src/config.ts:184:3 - (ae-forgotten-export) The symbol "TimelineController" needs to be exported by the entry point hls.d.ts
// src/config.ts:186:3 - (ae-forgotten-export) The symbol "EMEController" needs to be exported by the entry point hls.d.ts
// src/config.ts:189:3 - (ae-forgotten-export) The symbol "CMCDController" needs to be exported by the entry point hls.d.ts
// src/config.ts:191:3 - (ae-forgotten-export) The symbol "AbrController" needs to be exported by the entry point hls.d.ts
// src/config.ts:192:3 - (ae-forgotten-export) The symbol "BufferController" needs to be exported by the entry point hls.d.ts
// src/config.ts:193:3 - (ae-forgotten-export) The symbol "CapLevelController" needs to be exported by the entry point hls.d.ts
// src/config.ts:194:3 - (ae-forgotten-export) The symbol "FPSController" needs to be exported by the entry point hls.d.ts

// (No @packageDocumentation comment for this package)

Expand Down
51 changes: 48 additions & 3 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@
- [`capLevelController`](#capLevelController)
- [`fpsController`](#fpsController)
- [`timelineController`](#timelinecontroller)
- [`enableDateRangeMetadataCues`](#enabledaterangemetadatacues)
- [`enableEmsgMetadataCues`](#enableemsgmetadatacues)
- [`enableID3MetadataCues`](#enableid3metadatacues)
- [`enableWebVTT`](#enablewebvtt)
- [`enableIMSC1`](#enableimsc1)
- [`enableCEA708Captions`](#enablecea708captions)
- [`captionsTextTrack1Label`](#captionstexttrack1label)
- [`captionsTextTrack1LanguageCode`](#captionstexttrack1languagecode)
Expand Down Expand Up @@ -130,6 +134,8 @@
- [`hls.latency`](#hlslatency)
- [`hls.maxLatency`](#hlsmaxlatency)
- [`hls.targetLatency`](#hlstargetlatency)
- [`hls.drift`](#hlsdrift)
- [`hls.playingDate`](#hlsplayingdate)
- [Runtime Events](#runtime-events)
- [Loader Composition](#loader-composition)
- [Errors](#errors)
Expand Down Expand Up @@ -371,6 +377,9 @@ var config = {
capLevelController: CapLevelController,
fpsController: FPSController,
timelineController: TimelineController,
enableDateRangeMetadataCues: true,
enableEmsgMetadataCues: true,
enableID3MetadataCues: true,
enableWebVTT: true,
enableIMSC1: true,
enableCEA708Captions: true,
Expand Down Expand Up @@ -941,6 +950,30 @@ Parameter should be a class with a `destroy()` method:

- `destroy()` : should clean-up all used resources

### `enableDateRangeMetadataCues`

(default: `true`)

whether or not to add, update, and remove cues from the metadata TextTrack for EXT-X-DATERANGE playlist tags

parameter should be a boolean

### `enableEmsgMetadataCues`

(default: `true`)

whether or not to add, update, and remove cues from the metadata TextTrack for ID3 Timed Metadata found in CMAF Event Message (emsg) boxes

parameter should be a boolean

### `enableID3MetadataCues`

(default: `true`)

whether or not to add, update, and remove cues from the metadata TextTrack for ID3 Timed Metadata found in audio and MPEG-TS containers

parameter should be a boolean

### `enableWebVTT`

(default: `true`)
Expand All @@ -949,6 +982,14 @@ whether or not to enable WebVTT captions on HLS

parameter should be a boolean

### `enableIMSC1`

(default: `true`)

whether or not to enable IMSC1 captions on HLS

parameter should be a boolean

### `enableCEA708Captions`

(default: `true`)
Expand Down Expand Up @@ -1386,6 +1427,10 @@ get : target distance from the edge as calculated by the latency controller

get : the rate at which the edge of the current live playlist is advancing or 1 if there is none

### `hls.playingDate`

get: the datetime value relative to media.currentTime for the active level Program Date Time if present

## Runtime Events

hls.js fires a bunch of events, that could be registered and unregistered as below:
Expand Down Expand Up @@ -1483,9 +1528,9 @@ Full list of Events is available below:
- `Hls.Events.FRAG_PARSING_INIT_SEGMENT` - fired when Init Segment has been extracted from fragment
- data: { id: demuxer id, frag : fragment object, moov : moov MP4 box, codecs : codecs found while parsing fragment }
- `Hls.Events.FRAG_PARSING_USERDATA` - fired when parsing sei text is completed
- data: { id : demuxer id, frag: fragment object, samples : [ sei samples pes ] }
- `Hls.Events.FRAG_PARSING_METADATA` - fired when parsing id3 is completed
- data: { id: demuxer id, frag : fragment object, samples : [ id3 pes - pts and dts timestamp are relative, values are in seconds] }
- data: { id : demuxer id, frag: fragment object, samples : [ sei samples pes ], details: `levelDetails` object (please see [below](#leveldetails) for more information) }
- `Hls.Events.FRAG_PARSING_METADATA` - fired when parsing ID3 is completed
- data: { id: demuxer id, frag : fragment object, samples : [ ID3 pes - pts and dts timestamp are relative, values are in seconds], details: `levelDetails` object (please see [below](#leveldetails) for more information) }
- `Hls.Events.FRAG_PARSING_DATA` - [deprecated]
- `Hls.Events.FRAG_PARSED` - fired when fragment parsing is completed
- data: { frag : fragment object, partIndex }
Expand Down
Loading

0 comments on commit 8ed9c80

Please sign in to comment.