UNPKG

shaka-player

Version:
166 lines (146 loc) • 4.46 kB
/*! @license * Shaka Player * Copyright 2016 Google LLC * SPDX-License-Identifier: Apache-2.0 */ /** * @fileoverview Externs for MSF Catalog JSON structures. * @externs */ /** @const */ var msfCatalog = {}; /** * Represents a URL object used in DRM system fields such as laURL, certURL * and authzURL, as defined in the CMSF Content Protection section. * * @typedef {{ * url: string, * type: (string|undefined), * }} */ msfCatalog.DrmUrl; /** * Describes a single DRM system configuration within a Content Protection * entry, as defined in the CMSF Content Protection section (drmSystem field). * * @typedef {{ * systemID: string, * laURL: (!msfCatalog.DrmUrl|undefined), * certURL: (!msfCatalog.DrmUrl|undefined), * authzURL: (!msfCatalog.DrmUrl|undefined), * pssh: (string|undefined), * robustness: (string|undefined), * }} */ msfCatalog.DrmSystem; /** * Describes a single content protection entry at the root level of the * catalog, as defined in the CMSF Content Protection section. * Tracks reference these entries via contentProtectionRefIDs. * * @typedef {{ * refID: string, * defaultKID: !Array<string>, * scheme: string, * drmSystem: !msfCatalog.DrmSystem, * }} */ msfCatalog.ContentProtection; /** * @typedef {{ * id: string, * type: string, * data: string, * }} */ msfCatalog.InitDataList; /** * Describes a single accessibility descriptor within a Track entry * (draft-ietf-moq-msf-01 5.2.44). The scheme identifies the accessibility * scheme (e.g. CEA-608, CEA-708), and the value carries the scheme-specific * parameters such as channel-to-language assignments. * * CEA-608 example: { scheme: "urn:scte:dash:cc:cea-608:2015", * value: "CC1=eng;CC3=spa" } * CEA-708 example: { scheme: "urn:scte:dash:cc:cea-708:2015", * value: "1=lang:eng;2=lang:spa" } * * @typedef {{ * scheme: string, * value: (string|undefined), * }} */ msfCatalog.Accessibility; /** * @typedef {{ * namespace: (string|undefined), * name: string, * packaging: string, * role: (string|undefined), * isLive: boolean, * label: (string|undefined), * renderGroup: (number|undefined), * altGroup: (number|undefined), * initData: (string|undefined), * initRef: (string|undefined), * depends: (Array<string>|undefined), * template: (Array<*>|undefined), * temporalId: (number|undefined), * spatialId: (number|undefined), * codec: (string|undefined), * locmafVersion: (string|undefined), * mimeType: (string|undefined), * framerate: (number|undefined), * timescale: (number|undefined), * bitrate: (number|undefined), * width: (number|undefined), * height: (number|undefined), * samplerate: (number|undefined), * channelConfig: (string|undefined), * displayWidth: (number|undefined), * displayHeight: (number|undefined), * lang: (string|undefined), * targetLatency: (number|undefined), * trackDuration: (number|undefined), * eventType: (string|undefined), * parentName: (string|undefined), * parentNamespace: (string|undefined), * contentProtectionRefIDs: (Array<string>|undefined), * accessibility: (Array<!msfCatalog.Accessibility>|undefined), * m2tsPacketSize: (number|undefined), * m2tsPacketsPerObject: (number|undefined), * m2tsProgramNumber: (number|undefined), * m2tsPmtPid: (number|undefined), * m2tsPcrPid: (number|undefined), * m2tsPsiInterval: (number|undefined), * m2tsRandomAccess: (boolean|undefined), * m2tsTimestampMode: (string|undefined), * m2tsScte35Pid: (number|undefined), * }} */ msfCatalog.Track; /** * One operation of a delta update (draft-ietf-moq-msf, "Delta update"). * * @typedef {{ * op: string, * tracks: !Array<!msfCatalog.Track>, * }} */ msfCatalog.DeltaOperation; /** * A catalog document as it arrives on the catalog track. An independent * catalog carries `tracks`; a delta update carries `deltaUpdate` and * `generatedAt` and nothing else. * * @typedef {{ * version: (string|number|undefined), * generatedAt: (number|undefined), * isComplete: (boolean|undefined), * deltaUpdate: (Array<!msfCatalog.DeltaOperation>|undefined), * contentProtections: (Array<!msfCatalog.ContentProtection>|undefined), * initDataList: (Array<!msfCatalog.InitDataList>|undefined), * tracks: !Array<!msfCatalog.Track> * }} */ msfCatalog.Catalog;