import * as VideoJsComponent_ from 'video.js/dist/types/component'; import VideoJsComponent___default from 'video.js/dist/types/component'; import Videojs_ from 'video.js'; import VideojsPlayer_ from 'video.js/dist/types/player'; import * as MediaError from 'video.js/dist/types/media-error'; import MediaError__default, { ErrorMetadata } from 'video.js/dist/types/media-error'; import VideoJsTextTrackList from 'video.js/dist/types/tracks/text-track-list'; import VideoJsAudioTrackList from 'video.js/dist/types/tracks/audio-track-list'; import VideoJsQualityLevelsList from 'videojs-contrib-quality-levels/dist/types/quality-level-list'; import * as BcAnalytics_ from '@brightcove/player-core/analytics'; import { TimeRange } from 'video.js/dist/types/utils/time'; import VideoJsPlugin_ from 'video.js/dist/types/plugin'; declare const UiComponentType: { readonly Component: "Component"; readonly Player: "Player"; readonly BaseComponent: "BaseComponent"; readonly ClickableComponent: "ClickableComponent"; readonly Button: "Button"; readonly BigPlayButton: "BigPlayButton"; readonly CloseButton: "CloseButton"; readonly PosterImage: "PosterImage"; readonly MenuItem: "MenuItem"; readonly FullscreenToggle: "FullscreenToggle"; readonly MuteToggle: "MuteToggle"; readonly PictureInPictureToggle: "PictureInPictureToggle"; readonly PlayToggle: "PlayToggle"; readonly SeekToLive: "SeekToLive"; readonly SkipBackward: "SkipBackward"; readonly SkipForward: "SkipForward"; readonly LoadingSpinner: "LoadingSpinner"; readonly ModalDialog: "ModalDialog"; readonly ErrorDisplay: "ErrorDisplay"; readonly TextTrackSettings: "TextTrackSettings"; readonly TextTrackDisplay: "TextTrackDisplay"; readonly TitleBar: "TitleBar"; readonly LiveDisplay: "LiveDisplay"; readonly Slider: "Slider"; readonly VolumePanel: "VolumePanel"; readonly VolumeControl: "VolumeControl"; readonly TimeDisplay: "TimeDisplay"; readonly CurrentTimeDisplay: "CurrentTimeDisplay"; readonly TimeDivider: "TimeDivider"; readonly DurationDisplay: "DurationDisplay"; readonly RemainingTimeDisplay: "RemainingTimeDisplay"; readonly Spacer: "Spacer"; readonly MenuButton: "MenuButton"; readonly TrackButton: "TrackButton"; readonly TextTrackButton: "TextTrackButton"; readonly ChaptersButton: "ChaptersButton"; readonly DescriptionsButton: "DescriptionsButton"; readonly AudioTrackButton: "AudioTrackButton"; readonly SubsCapsButton: "SubsCapsButton"; readonly CustomControlSpacer: "CustomControlSpacer"; readonly PlaybackRateMenuItem: "PlaybackRateMenuItem"; readonly AudioTrackMenuItem: "AudioTrackMenuItem"; readonly ChaptersTrackMenuItem: "ChaptersTrackMenuItem"; readonly SubsCapsTrackMenuItem: "SubsCapsTrackMenuItem"; readonly TextTrackMenuItem: "TextTrackMenuItem"; readonly PlaybackRateMenuButton: "PlaybackRateMenuButton"; readonly PlayProgressBar: "PlayProgressBar"; readonly LoadProgressBar: "LoadProgressBar"; readonly MouseTimeDisplay: "MouseTimeDisplay"; readonly SeekBar: "SeekBar"; readonly ProgressControl: "ProgressControl"; readonly ControlBar: "ControlBar"; readonly ThumbnailDisplay: "ThumbnailDisplay"; readonly PlaylistSidebar: "PlaylistSidebar"; readonly CollapsiblePlaylistSidebar: "CollapsiblePlaylistSidebar"; readonly NextButton: "NextButton"; readonly NextPlaylistItemEndScreenModal: "NextEndscreen"; readonly NextOverlay: "NextOverlay"; readonly SocialButton: "SocialButton"; readonly SocialOverlay: "SocialOverlay"; readonly CustomEndScreenModal: "CustomEndscreenModal"; readonly SsaiAdMarker: "AdMarker"; readonly SsaiAdClickTarget: "SsaiAdClickTarget"; readonly SsaiAdStatusOverlay: "AdStatusOverlay"; readonly SsaiCountdownOverlay: "CountdownOverlay"; readonly SsaiSkipAdCountdownOverlay: "SkipAdCountdownOverlay"; readonly SsaiSkipAdOverlay: "SkipAdOverlay"; }; declare enum DefaultControlBarComponents { PlayToggle = "PlayToggle", SkipBackward = "SkipBackward", SkipForward = "SkipForward", VolumePanel = "VolumePanel", CurrentTimeDisplay = "CurrentTimeDisplay", TimeDivider = "TimeDivider", DurationDisplay = "DurationDisplay", ProgressControl = "ProgressControl", LiveDisplay = "LiveDisplay", SeekToLive = "SeekToLive", RemainingTimeDisplay = "RemainingTimeDisplay", CustomControlSpacer = "CustomControlSpacer", PlaybackRateMenuButton = "PlaybackRateMenuButton", ChaptersButton = "ChaptersButton", DescriptionsButton = "DescriptionsButton", SubsCapsButton = "SubsCapsButton", AudioTrackButton = "AudioTrackButton", PictureInPictureToggle = "PictureInPictureToggle", FullscreenToggle = "FullscreenToggle" } declare enum DefaultSmartTvControlBarComponents { PlayToggle = "PlayToggle", SkipBackward = "SkipBackward", SkipForward = "SkipForward", CurrentTimeDisplay = "CurrentTimeDisplay", TimeDivider = "TimeDivider", DurationDisplay = "DurationDisplay", ProgressControl = "ProgressControl", LiveDisplay = "LiveDisplay", SeekToLive = "SeekToLive", RemainingTimeDisplay = "RemainingTimeDisplay", CustomControlSpacer = "CustomControlSpacer", PlaybackRateMenuButton = "PlaybackRateMenuButton", ChaptersButton = "ChaptersButton", DescriptionsButton = "DescriptionsButton", SubsCapsButton = "SubsCapsButton", AudioTrackButton = "AudioTrackButton", PictureInPictureToggle = "PictureInPictureToggle" } declare enum DefaultPlayerComponents { PosterImage = "PosterImage", TitleBar = "TitleBar", TextTrackDisplay = "TextTrackDisplay", LoadingSpinner = "LoadingSpinner", BigPlayButton = "BigPlayButton", ErrorDisplay = "ErrorDisplay", TextTrackSettings = "TextTrackSettings" } declare enum LanguageKey { Ar = "ar", De = "de", En = "en", Es = "es", Fr = "fr", Ja = "ja", Ko = "ko", zhHans = "zh-Hans", zhHant = "zh-Hant" } interface NetworkConfiguration { /** * The maximum number of requests before we fail. * Defaults to `1` */ maxAttempts: number; /** * The base delay in ms between retries. * Defaults to `1_000` */ initialDelay: number; /** * Increase delay for each retry: delay += (delay * delayFactor). * Defaults to `0.2` */ delayFactor: number; /** * Do not send retry requests in the exact same timing, but rather fuzz it by some range, eg: if the delay = 3000, and fuzz factor is 0.1, * then the requests will be made somewhere in the following time range range: [2700, 3300]. * Defaults to `0.2` */ fuzzFactor: number; /** * The timeout in ms, after which we abort. * Defaults to `20_000` */ timeout: number; } interface BrightcoveConfiguration { /** * Brightcove Application ID. * Defaults to `null` */ applicationId: string | null; /** * Brightcove JWT used to enforce different restrictions on the account level. * Defaults to `null` */ authToken: string | null; /** * User identifier for Cross-Device Resume / Viewer Analytics. Used by Data Collection API. * Defaults to `null` */ viewerId: string | null; /** * SSAI Config ID. * Defaults to `null` */ adConfigId: string | null; /** * Token used by BLive for DVR and low-latency streams * Defaults to `null` */ livePlaybackToken: string | null; /** * TVE token. * defaults to `null` */ tveToken: string | null; /** * Watermarking token. * Defaults to `null` */ watermarkingToken: string | null; /** * Enable Stream Concurrency. * Defaults to `false` */ streamConcurrency: boolean; /** * Video Cloud API policy key. * Defaults to `null` */ policyKey: string | null; /** * Video Cloud player name associated with a player. * Defaults to `'Brightcove Web & Smart TV SDK'` */ playerName: string | null; /** * Dynamic Delivery rules configuration ID. * Defaults to `null` */ deliveryConfigId: string | null; /** * Changes the Video Cloud base url. * Should only be changed if IP restrictions are used with Brightcove Players outside of North America. * Defaults to `null` */ playbackApiBaseUrl: string | null; } interface AbrConfiguration { /** * The bandwidth value to be used in the calculation for initial playlist selection, * before more bandwidth information is seen by the player. * Defaults to `null` */ initialBandwidth: number | null; /** * If true, this will take the device pixel ratio into account when doing rendition switching. * This means that if you have a player with the width of 540px in a high density display with a device pixel ratio of 2, * a rendition of 1080p will be allowed. * Defaults to `false` */ useDevicePixelRatio: boolean; /** * If set, this will take the initial player dimensions and multiply it by a custom ratio when the player automatically selects renditions. * This means that if you have a player where the dimension is 540p, with a custom pixel ratio of 2, a rendition of 1080p or a lower rendition closest to this value will be chosen. * Additionally, if you have a player where the dimension is 540p, with a custom pixel ratio of 0.5, a rendition of 270p or a lower rendition closest to this value will be chosen. * When the custom pixel ratio is 0, the lowest available rendition will be selected. * It is worth noting that if the player dimension multiplied by the custom pixel ratio is greater than any available rendition resolution, * a rendition will be selected based on bandwidth, and the player dimension will be disregarded. * `limitRenditionByPlayerDimensions` must be `true` in order for this feature to be enabled. * If `useDevicePixelRatio` is set to `true`, the custom pixel ratio will be prioritized and overwrite any previous pixel ratio. * Defaults to `null` */ customPixelRatio: number | null; /** * When this is set to true, * rendition selection logic will take into account the player size and rendition resolutions when making a decision. * This setting is `true` by default. */ limitRenditionByPlayerDimensions: boolean; } interface PlaybackConfiguration { /** * Whether or not the player should attempt to autoplay. If `true`, the player will do all it can to achieve successful autoplay, including muting the player if necessary. * Defaults to `false`. */ autoplay: boolean; /** * Whether any metadata and/or media should be preloaded before playback. Values are the same as the HTMLMediaElement `preload` property. * Defaults to `'auto'` */ preload: 'auto' | 'metadata' | 'none'; /** * The number of milliseconds the player should wait before triggering a visible timeout error on the player. * Defaults to 45 seconds */ maxBufferingTime: number; /** * The same as maxBufferingTime, but applies only when the player is in the background. * Defaults to 5 minutes. */ maxBufferingTimeInBackground: number; /** * When overrideNative is true, if the platform supports Media Source Extensions videojs-http-streaming will take over HLS playback to provide a more consistent experience. * When unset (undefined): * for any safari browser OR any browser on iOS/iPadOS: * overrideNative: false * otherwise: * overrideNative: true * * Defaults to undefined. */ overrideNative: boolean | undefined; /** * Whether to parse CEA-708 captions from HLS segments. * When true, inband 708 caption tracks (e.g. cc708_1) will be created. * Defaults to `undefined` (VHS default: `true`). */ parse708captions: boolean | undefined; } interface PlaylistConfiguration { /** * Determines if playlists will repeat from the beginning when it reaches the end. * Defaults to `true` */ repeat: boolean; /** * A number in ms indicating the delay after a playlist item finishes before automatically advancing to the next item. If the value is `0` or `null`, * then the playlist will not auto-advance. * Defaults to `null`. */ autoAdvanceDelay: number | null; } interface SpacialNavigationConfiguration { /** * Whether spatial navigation functionality should be enabled. * Defaults to `false` */ enabled: boolean; /** * Whether horizontal seeking should be enabled. * Defaults to `false` */ horizontalSeek: boolean; } interface UiConfiguration { /** * This is used to determine which default UI Components will be attached to the player. * This should have a value of an array of strings of the default player component names. * Defaults to the list of {@link DefaultPlayerComponents}. */ defaultUiComponents: Array; /** * Select a specific language for localization. * Defaults to null * The player language is set to one of the following in descending priority: * - The language specified in setup options as above. * - The language specified by the closet element with a lang attribute, usually in the html tag. * - Browser language preference (the first language if more than one is configured) * - LanguageKey.En * Can be updated dynamically. */ language: LanguageKey | null; /** * If specified, the player displays a control allowing the user to jump back in a video by the specified number of seconds. * Valid values are `5` | `10` | `30` * Defaults to `null` */ skipBackward: 5 | 10 | 30 | null; /** * If specified, the player displays a control allowing the user to jump forward in a video by the specified number of seconds. * Valid values are `5` | `10` | `30` * Defaults to `null` */ skipForward: 5 | 10 | 30 | null; /** * Sets the display height of the video player in pixels. * Can be updated dynamically. * Defaults to `360` */ height: number; /** * Sets the display width of the video player in pixels. * Can be updated dynamically. * Defaults to `640` */ width: number; /** * A URL to an image that displays before the video begins playing. * This is often a frame of the video or a custom title screen. * Can be updated dynamically. */ poster: string | null; /** * Puts the player in fluid mode and the value is used when calculating the dynamic size of the player. * The value should represent a ratio - two numbers separated by a colon (e.g. "16:9" or "4:3"). * Defaults to `'16:9'`. * Can be updated dynamically. */ aspectRatio: string; /** * If set to true, it asynchronously hides all player components except the control bar, * as well as any specific controls that are needed only for video. * Can be updated dynamically. */ audioOnlyMode: boolean; /** * If set to true, it enables the poster viewer experience by hiding the video element * and displaying the poster image persistently. * Can be updated dynamically. */ audioPosterMode: boolean; /** * When true, the player will have a fluid size. * In other words, it will scale to fit its container at the video's intrinsic aspect ratio, * or at a specified aspectRatio. * Can be updated dynamically. */ fluid: boolean; /** * This can be set to pass in the fullscreen navigationUi options. * For more info, see: {@link https://fullscreen.spec.whatwg.org/#dictdef-fullscreenoptions} */ fullscreen: 'auto' | 'show' | 'hide' | null; /** * Determines if native controls should be used for touch devices. */ nativeControlsForTouch: boolean; /** * Control whether UI elements have a title attribute. * A title attribute is shown on mouse hover, which can be helpful for usability, but has drawbacks for accessibility. */ noUITitleAttributes: boolean; /** * Indicates to the browser that non-fullscreen playback is preferred * when fullscreen playback is the native default, such as in iOS Safari. * See: {@link https://html.spec.whatwg.org/#attr-video-playsinline} * Can be updated dynamically. */ playsinline: boolean; /** * Setting this to true will change fullscreen behaviour on devices * which do not support the HTML5 fullscreen API but do support fullscreen on the video element, * i.e. iPhone. Instead of making the video fullscreen, the player will be stretched to fill the browser window. */ preferFullWindow: boolean; /** * Configuration for enabling and managing spatial navigation within the player. */ spatialNavigation: SpacialNavigationConfiguration; defaultControlBarComponents: Array; defaultSmartTvControlBarComponents: Array; } interface PlayerNetworkConfiguration { manifest: NetworkConfiguration; segment: NetworkConfiguration; license: NetworkConfiguration; } interface ImaDaiConfiguration { /** * The URL of your self-hosted IMA DAI SDK. * Defaults to `'//imasdk.googleapis.com/js/sdkloader/ima3_dai.js'` */ sdkUrl: string; /** * Whether to skip over ads that have already played when seeking. * Defaults to `true` */ skipPlayedAds: boolean; /** * If true, it hides overlays while ads are playing. * Defaults to `false` */ hideOverlays: boolean; } interface SocialSharingConfigurationServices { /** * Whether or not to include Facebook. * Defaults to `true` */ facebook: boolean; /** * Whether or not to include Twitter. * Defaults to `true` */ twitter: boolean; /** * Whether or not to include Tumblr. * Defaults to `true` */ tumblr: boolean; /** * Whether or not to include Pinterest. * Defaults to `true` */ pinterest: boolean; /** * Whether or not to include LinkedIn. * Defaults to `true` */ linkedin: boolean; } interface SocialSharingConfiguration { /** * Used to provide a title for use in the social overlay. * Can be updated dynamically. * Defaults to an empty string. */ title: string; /** * Used to provide a description for use in the social overlay. * Can be updated dynamically. * Defaults to an empty string. */ description: string; /** * Used to provide a custom URL that replaces the generated one. * Can be updated dynamically. * Defaults to an empty string. */ url: string; /** * Used to provide a label for the social overlay. * Can only be updated on initialization of the plugin. * Defaults to an empty string. */ label: string; /** * Used to provide a custom embed code that replaces the generated one. * Can be updated dynamically. * Defaults to an empty string. */ embedCode: string; /** * This value is only used when the embed code is not set. * Used to provide a custom domain if proxy is being used. * Can be updated dynamically. * Defaults to `'players.brightcove.net'`. */ embedDomain: string; /** * If true, the current dimensions of the player will be provided in default embed code. * Can be updated dynamically. * Defaults to `false`. */ embedDimensions: boolean; /** * If true, direct links will include a start offset. * Can be updated dynamically. * Defaults to `false`. */ deeplinking: boolean; /** * An offset in "hh:mm:ss" format to use for sharing URLs. * Can be updated dynamically. * Defaults to `'00:00:00'`. */ offset: string; /** * If true, turns off the direct link. * Can be updated dynamically. * Defaults to `false`. */ removeDirect: boolean; /** * If true, turns off the embed code. * Can be updated dynamically. * Defaults to `false`. */ removeEmbed: boolean; /** * Can be updated dynamically. * See SocialSharingConfigurationServices for defaults. */ services: SocialSharingConfigurationServices; } interface PinningConfiguration { /** * By default, pinning mode will not work on Android or iOS mobile devices. * Defaults to `false`. */ allowOnMobile: boolean; /** * By default, pinning mode will include a close button, * which the user can click to disable pinning mode. * Defaults to `true`. */ closeable: boolean; /** * By default, the plugin will scale down the player's dimensions by * a factor determined by the `scale` option. However, providing a * `height` (or `width`) will override the default scaling and set * the size of the scaled-down player explicitly. * If only one dimension is provided, the other will be scaled down * to maintain the aspect ratio. If both dimensions are provided, * the player will be set to the exact, specified size. * Defaults to `null`. */ height: number | null; /** * By default, the plugin will scale down the player's dimensions by * a factor determined by the `scale` option. However, providing a * `width` (or `height`) will override the default scaling and set * the size of the scaled-down player explicitly. * Defaults to `null`. */ width: number | null; /** * The scaling factor applied to the player when it is in pinning * mode. Must be a number greater than zero and less than or equal to 1. * Defaults to `2/3`. */ scale: number; /** * By default, a player with this plugin enabled will keep the * physical dimensions of the special container element in sync with * the player's dimensions. However, this doesn't work for all cases, * so it can be disabled by setting this option to `false`. * When doing so, the container element will behave like a normal * block element. This means that users of the plugin will need to * manage its size on their own. * Defaults to `false`. */ manualContainerSize: boolean; /** * The horizontal alignment of the player when it is in pinning mode. * Defaults to `'right'`. */ posX: 'right' | 'left'; /** * The vertical alignment of the player when it is in pinning mode. * Defaults to `'bottom'`. */ posY: 'top' | 'bottom'; /** * The threshold at which the player is considered viewable. In other * words, when this percentage of the player is visible in the * browser's viewport, it is considered viewable. * For example, with the default of 0.8, the player is not considered * viewable unless 80% of it is visible in the viewport. * Must be a number greater than or equal to 0 or less than or equal to 1. * Defaults to `0.8`. */ viewable: number; } interface ImaClientSideConfiguration { /** * The URL of the IMA3 SDK. * Defaults to `'${protocol}//imasdk.googleapis.com/js/sdkloader/ima3.js'`. */ sdkUrl: string; /** * The URL of the ad server to make requests to during playback. * Defaults to `'${protocol}//pubads.g.doubleclick.net/gampad/ads?sz=400x300&iu=%2F6062%2Fiab_vast_samples&ciu_szs=300x250%2C728x90&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=[referrer_url]&correlator=[timestamp]&cust_params=iab_vast_samples%3Dlinear'`. */ serverUrl: string; /** * When to request ads: during player load ('onload'), during playback ('onplay'), * ondemand ('ondemand'), cuechange ('oncue'). * Defaults to `'onload'`. */ requestMode: 'onload' | 'onplay' | 'ondemand' | 'oncue'; /** * Abandon ads that finish loading after they have timed out. * Defaults to `true`. */ hardTimeouts: boolean; /** * Show Brightcove player custom controls for VPAID ads. They may or may not work. * Defaults to `false`. */ showVpaidControls: boolean; /** * Specifies the alternative video ad click element. Leave this undefined to let the IMA SDK handle clicks. * More details are available in the parameter documentation for the IMA SDK `AdDisplayContainer`. * Defaults to `undefined`. */ clickTrackingElement: HTMLElement | undefined; /** * Controls postrollTimeout setting in videojs-contrib-ads. If provided, overrides any value set for timeout. * Default Value: same as timeout. */ postRollTimeout: number; /** * Controls prerollTimeout setting in videojs-contrib-ads. If provided, overrides any value set for timeout. * Default Value: same as timeout. */ preRollTimeout: number; /** * Enables Video Cloud ad cue points being used to trigger ads. * Default Value: `false`. */ useMediaCuePoints: boolean; /** * Specify VPAID 2 mode in the IMA HTML5 SDK. If none is provided, uses the SDK's default, which is currently ENABLED. * Default Value: `undefined`. */ vpaidMode: string; } interface CustomEndScreenConfiguration { /** * Any string literal or HTML that is rendered on the custom endscreen. * Defaults to an empty string. */ content: string; } interface EndScreenConfiguration { social: SocialSharingConfiguration; custom: CustomEndScreenConfiguration; } interface ThumbnailsConfiguration { } interface PlaylistUiConfiguration { /** * Defaults to `false`. */ hideOnStart: boolean; /** * Defaults to `true`. */ nextButton: boolean; /** * Defaults to `true`. */ nextOverlay: boolean; /** * Defaults to `false`. */ playOnSelect: boolean; /** * Defaults to `true`. */ playlistPicker: boolean; /** * Defaults to `false`. */ horizontal: boolean; /** * Defaults to `false`. */ repeat: boolean; } interface OmConfiguration { /** * Partner name string. * Defaults to null */ partnerName: string | null; /** * Partner version string in a semver format. * Defaults to null */ partnerVersion: string | null; /** * Preferred access mode string. * As of October 2021, the creative access mode is translated to full by the OM manager, * per session client requirements, and will appear * as full in the OM ad session call data. * Defaults to 'limited' */ accessMode: 'limited' | 'domain' | 'creative' | 'full'; } interface SsaiConfiguration { /** * If true, the countdown timer and Learn More click through overlays will not be shown while ads are playing. * Defaults to `false` */ hideOverlays: boolean; /** * The number of milliseconds after which an XHR to fetch a VMAP will time out. * Defaults to `45000` */ timeout: number; /** * If true, request the video source with HLS discontinuities or DASH multiperiod. * Only valid for VOD SSAI. * Defaults to `true` */ enableDiscontinuities: boolean; /** * If true (and the necessary Open Measurement SDK scripts are embedded), * the plugin will use values from the omParams object to start an OM manager * and create a new OM session client. * Defaults to `false` */ enableOM: boolean; /** * An object describing the required parameters for starting an * Open Measurement session client and OM ad features. */ omParams: OmConfiguration; /** * An object containing the parameters for replacing arbitrary values in the VMAP source URL. * See: {@link https://apis.support.brightcove.com/ssai/getting-started/video-cloud-ssai-ad-config-api.html#URL_variables} * Object keys can have any name. The name of this variable must match * the VMAP source URL param string or else it will not be replaced. * Defaults to an empty object */ vmapURLParams: object; } interface IntegrationsConfiguration { imaDai: ImaDaiConfiguration; socialSharing: SocialSharingConfiguration; pinning: PinningConfiguration; imaClientSide: ImaClientSideConfiguration; endScreen: EndScreenConfiguration; thumbnails: ThumbnailsConfiguration; playlistUi: PlaylistUiConfiguration; ssai: SsaiConfiguration; } interface KeySystemConfiguration { /** * Whether this key system is allowed during source selection. * When set to `false`, sources using this key system will be filtered out * before playback, even if the device reports support for it. * * This setting only affects sources loaded via `loadBrightcoveVideoModel()`. * Sources passed directly to `loadRemoteVideo()` are not filtered. * * Defaults to `true`. */ enabled: boolean; } interface DrmConfiguration { /** Widevine DRM (`com.widevine.alpha`). */ widevine: KeySystemConfiguration; /** PlayReady DRM (`com.microsoft.playready`). */ playready: KeySystemConfiguration; /** FairPlay DRM (`com.apple.fps`). */ fairplay: KeySystemConfiguration; /** Legacy FairPlay DRM (`com.apple.fps.1_0`). */ fairplayLegacy: KeySystemConfiguration; } interface PlayerConfiguration { network: PlayerNetworkConfiguration; abr: AbrConfiguration; playlist: PlaylistConfiguration; brightcove: BrightcoveConfiguration; integrations: IntegrationsConfiguration; ui: UiConfiguration; playback: PlaybackConfiguration; drm: DrmConfiguration; } interface TextTrackOptions { readonly id: string; readonly kind: TextTrackKind; readonly language: string; readonly label: string; readonly src?: string; } interface AudioTrack { readonly id: string; readonly kind: 'alternative' | 'descriptions' | 'main' | 'main-desc' | 'translation' | 'commentary' | ''; readonly language: string; readonly label: string; readonly enabled: boolean; } interface ThumbnailTrack extends Omit { src: string; enabled: boolean; } interface ThumbnailTrackOptions { src: string; label: string; } interface QualityLevel { readonly id: string; readonly label: string; readonly bitrate: number; readonly width?: number; readonly height?: number; readonly frameRate?: number; readonly enabled: boolean; } /** * A plain object representing metadata for a single tracking event. */ interface AdTrackingEvent { ids: Array; limit: number; time: number; urls: Array; } /** * A plain object representing all {@link AdTrackingEvent} objects for a linear ad's * primary creative. */ interface LinearAdTrackingEvents { creativeView: AdTrackingEvent; start: AdTrackingEvent; firstQuartile: AdTrackingEvent; midpoint: AdTrackingEvent; thirdQuartile: AdTrackingEvent; complete: AdTrackingEvent; mute: AdTrackingEvent; unmute: AdTrackingEvent; pause: AdTrackingEvent; rewind: AdTrackingEvent; resume: AdTrackingEvent; fullscreen: AdTrackingEvent; exitFullscreen: AdTrackingEvent; expand: AdTrackingEvent; collapse: AdTrackingEvent; acceptInvitationLinear: AdTrackingEvent; closeLinear: AdTrackingEvent; skip: AdTrackingEvent; progress: AdTrackingEvent; click: AdTrackingEvent; } /** * A plain object representing all {@link AdTrackingEvent} objects for a linear ad's * companion creatives. */ interface CompanionAdTrackingEvents { creativeView: AdTrackingEvent; click: AdTrackingEvent; } /** * Represents a single linear ad, synonymous with a VAST `Ad` element with a * single `Linear` creative. It may include any number of companion creatives, * as well. * * A linear ad is always contained within a linear * ad roll (represented by * {@link LinearAdRoll}). */ interface LinearAd { adSystem(): string; adTitle(): string; advertiser(): string; description(): string; error(): string; adParameters(): string; absoluteEndTime(): number; absoluteStartTime(): number; ad(): Record; clickThroughUrl(): string; companions(): Array>; primaryCreative(): Record; duration(): number; skipOffset(): number; trackingEvents(): LinearAdTrackingEvents; companionTrackingEvents(): CompanionAdTrackingEvents; isSlate(): boolean; isPending(): boolean; update(ad: Record): LinearAd; populate(ad: Record): void; updateTiming(time: number): void; } /** * Represents a single block of one or more ads that plays at a specific time * in a specific order. * * This is also referred to (elsewhere) as an ad pod. */ interface LinearAdRoll { updateTimimg(): void; get(i: number): LinearAd; indexOf(ad: LinearAd): number; length(): number; first(): LinearAd | null; last(): LinearAd | null; isPreRoll(): boolean; isMidRoll(): boolean; isPostRoll(): boolean; update(adBreaks: Array>, adIndex: number): LinearAd; clientOptions(ops: Record): Record; absoluteStartTime(): number; absoluteEndTime(): number; duration(): number; startTimeOffset(): number; timeOffset(): number; type(): number; linearAds(): Array; } /** * A timeline state object is an object with a specific interface that * details the playback state of an SSAI stream at any point in the absolute * timeline. * * The "absolute time" refers to a point in the complete timeline of a stream * (with both ads and content included). The term "content time" refers to the * time relative to the current content (either ad or content). */ interface TimelineState { /** * The absolute time in the stream. */ absoluteTime: number; /** * The absolute duration of the stream. */ absoluteDuration: number; /** * The time in the stream relative either to the current linear ad or * to the content itself. */ relativeTime: number; /** * The duration of the current linear ad or the content itself. */ relativeDuration: number; linearAdRoll: LinearAdRoll | null; linearAd: LinearAd | null; } interface SsaiIntegration { /** * Seek to any point in a linear ad or content, whichever is currently playing. */ seekInRelativeTime(t: number, preventAdSkips?: boolean): void; /** * Get the duration of a linear ad or content, whichever is currently playing. */ getRelativeDuration(): number; /** * Get the current LinearAd. */ getCurrentLinearAd(): LinearAd | null; /** * Get the TimelineState object relative to the current linear ad or content. */ getRelativeTimelineState(): TimelineState | null; /** @internal */ updateConfiguration(ssaiConfiguration: SsaiConfiguration, prev: SsaiConfiguration): void; /** @internal */ dispose(): void; } type ModalContent = string | Element | Text | Array; interface UiComponent { getChild(child: string): UiComponent | null; addChild(component: UiComponent): void; removeChild(child: string): void; show(): void; hide(): void; addClass(...classesToAdd: Array): void; removeClass(...classesToRemove: Array): void; getComponentName(): string; dispose(): void; getComputedHeight(): number; getComputedWidth(): number; setHeight(value: number): void; getHeight(): number; setWidth(value: number): void; getWidth(): number; blur(): void; focus(): void; getDOMElement(): Element | null; removeAttribute(attribute: string): void; setAttribute(attribute: string, value: string): void; getAttribute(attribute: string): string | null; hasClass(value: string): boolean; getAllChildren(): Array; } interface UiComponentsStorage { dispose(): void; } interface ComponentOptions { className?: string; name?: string; } interface UiComponentDependencies { name: string; type?: string; componentOptions?: ComponentOptions; } type Direction = 'up' | 'down' | 'left' | 'right'; interface SpatialNavigationManager { /** * Starts the Spatial Navigation system by adding keydown event listeners to the player. */ start(): void; /** * Stops the Spatial Navigation by removing the keydown event listener from the player and updating the internal state. */ stop(): void; /** * Temporarily disables the Spatial Navigation functionality without removing the event listeners. */ pause(): void; /** * Re-enables the Spatial Navigation functionality after it has been paused. */ resume(): void; /** * Clears the list of focusable components. */ clear(): void; /** * Focuses on the last focused component. */ refocus(): void; /** * Sets focus on a specific component if it is focusable, or finds a focusable child within it to focus on. */ focus(component: UiComponent): void; /** * Adds a new component to the focusable components list if it meets the focusability criteria. */ add(component: UiComponent): void; /** * Removes a specified component from the focusable components list. */ remove(component: UiComponent): void; /** * Navigates to the next focusable component based on the specified direction. */ move(direction: Direction): void; /** * Retrieves the list of focusable components within the player. */ getCandidates(): Array; /** * Retrieves the currently focused component. */ getCurrent(): UiComponent | null; /** @internal */ updateConfiguration(config: SpacialNavigationConfiguration, prev: SpacialNavigationConfiguration): void; /** @internal */ dispose(): void; } interface UiManager { /** * Get the UI Component of the player */ getPlayerContainerUiComponent(): UiComponent | null; /** * Add localizations for a specific language */ addLanguagePack(language: LanguageKey, languagePack: Record): void; /** @internal */ updateConfiguration(config: PlayerConfiguration, prev: PlayerConfiguration): void; /** @internal */ dispose(): void; } interface IThumbnailDisplayComponent extends UiComponent { setThumbnailImage(src: string): void; updatePosition(value: number): void; } interface IClickableComponent extends UiComponent { enable(): void; disable(): void; handleClick(): void; getControlText(): string; setControlText(text: string): void; } interface IPosterImageComponent extends IClickableComponent { setSource(source: string): void; removeSource(): void; getCrossOrigin(): string; setCrossOrigin(value: 'anonymous' | 'use-credentials' | null): void; } interface IMenuItemComponent extends IClickableComponent { selectItem(): void; unselectItem(): void; } interface ISsaiOverlayComponent extends UiComponent { updateTimelineState(state: TimelineState): void; } interface ISsaiSkipAdOverlayComponent extends IClickableComponent { updateTimelineState(state: TimelineState): void; } interface IModalDialogComponent extends UiComponent { open(): void; close(): void; isOpen(): boolean; getLabel(): string; getDescription(): string; getIsCloseable(): boolean; setIsCloseable(value: boolean): void; fill(): void; empty(): void; setContent(value: ModalContent): void; getContent(): ModalContent | null; } interface ITitleBarComponent extends UiComponent { updateTitle(value: string): void; updateDescription(value: string): void; } interface ISliderComponent extends UiComponent { isVertical(): boolean; setVerticality(value: boolean): void; enable(): void; disable(): void; } interface IProgressControlComponent extends UiComponent { enable(): void; disable(): void; } interface ISeekBarComponent extends ISliderComponent { getPercent(): number; } interface IMenuButtonComponent extends UiComponent { getControlText(): string; setControlText(value: string): void; } interface BaseComponentOptions extends ComponentOptions { el?: Element; } interface ModalDialogComponentOptions extends ComponentOptions { description?: string; fillAlways?: boolean; label?: string; pauseOnOpen?: boolean; temporary?: boolean; uncloseable?: boolean; content?: ModalContent; } interface TextTrackSettingsComponentOptions extends ModalDialogComponentOptions { persistTextTrackSettings?: boolean; } interface ClickableComponentOptions extends ComponentOptions { clickHandler?: () => void; controlText?: string; className?: string; } interface SliderComponentOptions extends ComponentOptions { barName?: string; vertical?: boolean; } interface RemainingTimeDisplayComponentOptions extends ComponentOptions { displayNegative?: boolean; } interface VolumeControlComponentOptions extends ComponentOptions { vertical?: boolean; } interface VolumePanelComponentOptions extends ComponentOptions { inline?: boolean; } interface MenuButtonComponentOptions extends ComponentOptions { inline?: boolean; title?: string; } interface MenuItemOptions extends ClickableComponentOptions { selectable?: boolean; selected?: boolean; multiSelectable?: boolean; label?: string; } interface PlaybackRateMenuItemOptions extends MenuItemOptions { rate?: number; } interface TextTrackMenuItemOptions extends MenuItemOptions { track?: TextTrack; } interface AudioTrackMenuItemOptions extends MenuItemOptions { track?: AudioTrack; } interface ChaptersTrackMenuItemOptions extends MenuItemOptions { track?: TextTrack; cue?: TextTrackCue; } interface PlayToggleOptions extends ClickableComponentOptions { replay?: boolean; } interface BaseComponentDependencies extends UiComponentDependencies { componentOptions: BaseComponentOptions; } interface ClickableComponentDependencies extends UiComponentDependencies { componentOptions: ClickableComponentOptions; } interface MenuItemComponentDependencies extends ClickableComponentDependencies { componentOptions: MenuItemOptions; } interface PlayToggleComponentDependencies extends ClickableComponentDependencies { componentOptions: PlayToggleOptions; } interface ModalDialogComponentDependencies extends UiComponentDependencies { componentOptions: ModalDialogComponentOptions; } interface TextTrackSettingsComponentDependencies extends ModalDialogComponentDependencies { componentOptions: TextTrackSettingsComponentOptions; } interface SliderComponentDependencies extends UiComponentDependencies { componentOptions: SliderComponentOptions; } interface VolumeControlComponentDependencies extends UiComponentDependencies { componentOptions: VolumeControlComponentOptions; } interface VolumePanelComponentDependencies extends UiComponentDependencies { componentOptions: VolumePanelComponentOptions; } interface RemainingTimeDisplayComponentDependencies extends UiComponentDependencies { componentOptions: RemainingTimeDisplayComponentOptions; } interface PlaybackRateMenuItemComponentDependencies extends MenuItemComponentDependencies { componentOptions: PlaybackRateMenuItemOptions; } interface TextTrackMenuItemComponentDependencies extends MenuItemComponentDependencies { componentOptions: TextTrackMenuItemOptions; } interface AudioTrackMenuItemComponentDependencies extends MenuItemComponentDependencies { componentOptions: AudioTrackMenuItemOptions; } interface ChaptersMenuItemComponentDependencies extends MenuItemComponentDependencies { componentOptions: ChaptersTrackMenuItemOptions; } interface MenuButtonComponentDependencies extends UiComponentDependencies { componentOptions: MenuButtonComponentOptions; } type MediaInfo = Record; declare enum CompanionBackfillMode { ALWAYS = "ALWAYS", ON_MASTER_AD = "ON_MASTER_AD" } declare enum VpaidMode { DISABLED = "DISABLED", ENABLED = "ENABLED", INSECURE = "INSECURE" } declare enum ViewMode { NORMAL = "NORMAL", FULLSCREEN = "FULLSCREEN", THUMBNAIL = "THUMBNAIL" } declare enum CreativeType { IMAGE = "IMAGE", FLASH = "FLASH", ALL = "ALL" } declare enum ResourceType { HTML = "HTML", IFRAME = "IFRAME", STATIC = "STATIC", ALL = "ALL" } declare enum SizeCriteria { IGNORE = "IGNORE", SELECT_EXACT_MATCH = "SELECT_EXACT_MATCH", SELECT_NEAR_MATCH = "SELECT_NEAR_MATCH", SELECT_FLUID = "SELECT_FLUID" } /** * See: {@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.ImaSdkSettings} */ interface ImaSdkSettings { getCompanionBackfill(): CompanionBackfillMode; getDisableCustomPlaybackForIOS10Plus(): boolean; getFeatureFlags(): Record; getLocale(): string; getNumRedirects(): number; getPlayerType(): string; getPlayerVersion(): string; getPpid(): string | null; isCookiesEnabled(): boolean; setAutoPlayAdBreaks(autoPlayAdBreaks: boolean): void; setCompanionBackfill(mode: CompanionBackfillMode): void; setCookiesEnabled(cookiesEnabled: boolean): void; setDisableCustomPlaybackForIOS10Plus(disable: boolean): void; setFeatureFlags(featureFlags: Record): void; setLocale(locale: string): void; setNumRedirects(numRedirects: number): void; setPlayerType(playerType: string): void; setPlayerVersion(playerVersion: string): void; setPpid(ppid: string): void; setSessionId(sessionId: string): void; setVpaidAllowed(allowVpaid: boolean): void; setVpaidMode(vpaidMode: VpaidMode): void; } /** * See: {@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdsRequest} */ interface AdsRequest { adTagUrl: string; adsResponse?: string | Document | null; contentDuration?: number | null; contentKeywords?: Array | null; contentTitle?: string | null; forceNonLinearFullSlot: boolean; linearAdSlotWidth: number; linearAdSlotHeight: number; liveStreamPrefetchSeconds: number; nonLinearAdSlotWidth: number; nonLinearAdSlotHeight: number; omidAccessModeRules: Record; pageUrl?: string | null; vastLoadTimeout?: number; setAdWillAutoPlay(autoPlay: boolean): void; setAdWillPlayMuted(muted: boolean): void; setContinuousPlayback(continuousPlayback: boolean): void; } /** * See: {@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdsRenderingSettings} */ interface AdsRenderingSettings { autoAlign?: boolean; bitrate?: number; enablePreloading?: boolean; loadVideoTimeout?: number; mimeTypes?: Array | null; playAdsAfterTime?: number; restoreCustomPlaybackStateOnAdBreakComplete?: boolean; uiElements?: Array | null; useStyledLinearAds?: boolean; useStyledNonLinearAds?: boolean; } /** * See: {@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdPodInfo} */ interface AdPodInfo { getAdPosition(): number; getIsBumper(): boolean; getMaxDuration(): number; getPodIndex(): number; getTimeOffset(): number; getTotalAds(): number; } /** * See: {@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.CompanionAdSelectionSettings} */ interface CompanionAdSelectionSettings { adSlotIds: Array; creativeType: CreativeType; nearMatchPercent: number; resourceType: ResourceType; sizeCriteria: SizeCriteria; } /** * See: {@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.CompanionAd} */ interface CompanionAd { getAdSlotId(): string | null; getContent(): string; getContentType(): string | null; getHeight(): number; getWidth(): number; } /** * See: {@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.UniversalAdIdInfo} */ interface UniversalAdIdInfo { getAdIdRegistry(): string; getAdIdValue(): string; } /** * See: {@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdDisplayContainer} */ interface AdDisplayContainer { destroy(): void; initialize(): void; } /** * See: {@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdsLoader} */ interface AdsLoader { contentComplete(): void; destroy(): void; getSettings(): ImaSdkSettings; getVersion(): string; requestAds(adsRequest: AdsRequest, userRequestContext?: NonNullable): void; } /** * See: {@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdsManager} */ interface AdsManager { collapse(): void; configureAdsManager(content: NonNullable, adsRenderingSettings?: AdsRenderingSettings): void; destroy(): void; discardAdBreak(): void; expand(): void; focus(): void; getAdSkippableState(): boolean; getCuePoints(): Array; getRemainingTime(): number; getVolume(): number; init(width: number, height: number, viewMode: ViewMode, videoElement?: HTMLVideoElement): void; isCustomClickTrackingUsed(): boolean; isCustomPlaybackUsed(): boolean; pause(): void; resize(width: number, height: number, viewMode: ViewMode): void; resume(): void; setVolume(volume: number): void; skip(): void; start(): void; stop(): void; updateAdsRenderingSettings(adsRenderingSettings: AdsRenderingSettings): void; } /** * See: {@link https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.Ad} */ interface Ad { getAdId(): string; getAdPodInfo(): AdPodInfo; getAdSystem(): string; getAdvertiserName(): string; getApiFramework(): string | null; getCompanionAds(width: number, height: number, settings?: CompanionAdSelectionSettings): Array; getContentType(): string; getCreativeAdId(): string; getCreativeId(): string; getDealId(): string; getDescription(): string; getDuration(): number; getHeight(): number; getMediaUrl(): string | null; getMinSuggestedDuration(): number; getSkipTimeOffset(): number; getSurveyUrl(): string | null; getTitle(): string; getTraffickingParameters(): Record; getTraffickingParametersString(): string; getUiElements(): Array; getUniversalAdIdRegistry(): string; getUniversalAdIdValue(): string; getUniversalAdIds(): Array; getVastMediaBitrate(): number; getVastMediaHeight(): number; getVastMediaWidth(): number; getWidth(): number; getWrapperAdIds(): Array; getWrapperAdSystems(): Array; getWrapperCreativeIds(): Array; isLinear(): boolean; } interface ImaClientSideIntegration { /** * Get the active AdDisplayContainer instance */ getAdDisplayContainer(): AdDisplayContainer | null; /** * Replace macro variables in a provided url. For list of supported macros, please see: * {@link https://player.support.brightcove.com/plugins/advertising-ima3-plugin.html#Ad_macros_and_the_serverUrl} */ replaceMacroVariablesFor(url: string): string; /** * Get the active AdsLoader instance */ getAdsLoader(): AdsLoader | null; /** * Get the active AdsManager instance */ getAdsManager(): AdsManager | null; /** * Request an ad */ requestAd(adRequestUrl: string): void; /** * Get the active Ad instance */ getCurrentAd(): Ad | null; /** * Get whether the current ad is a VPAID ad */ isVpaid(): boolean; /** * Set various parameters that control the rendering of ads. */ setAdsRenderingSettings(adsRenderingSettings: AdsRenderingSettings): void; /** @internal */ updateConfiguration(imaClientSideConfiguration: ImaClientSideConfiguration, prev: ImaClientSideConfiguration): void; /** @internal */ dispose(): void; } type IVideoJsLicenseCallback = (error: Error | null, license: Uint8Array | null) => void; type IVideoJsFairplayGetLicense = (options: Record, contentId: string, keyMessage: Uint8Array, callback: IVideoJsLicenseCallback) => void; type IVideoJsGetLicense = (options: Record, keyMessage: Uint8Array, callback: IVideoJsLicenseCallback) => void; type IVideoJsKeySystemGetContentId = (options: Record, contentId: string) => string; type IVideoJsGetCertificateCallback = (error: Error | null, certificate: Uint8Array | null) => void; type IVideoJsGetCertificate = (options: Record, callback: IVideoJsGetCertificateCallback) => void; interface IVideoJsKeySystem { url: string; certificateUri?: string; licenseServerUriMap?: Record; audioRobustness?: string; videoRobustness?: string; persistentState?: string; distinctiveIdentifier?: string; sessionType?: string; serverCertificate?: Uint8Array; getCertificate?: IVideoJsGetCertificate; getContentId?: IVideoJsKeySystemGetContentId; getLicense?: IVideoJsGetLicense | IVideoJsFairplayGetLicense; } interface IVideoJsSource { src: string; type: string; keySystems?: Record; } declare module 'video.js/dist/types/plugin' { export default class Plugin { static Error: Record; } } interface Vhs { setOptions(options: Record): void; } declare module 'video.js/dist/types/tech/tech' { export default interface Tech { setCurrentTime(seconds: number): void; currentTime(): number | undefined; duration(seconds?: number): number | undefined; pause(): void; muted(muted?: boolean): boolean | undefined; volume(percentAsDecimal?: number): number | undefined; seekable(): TimeRange; crossOrigin(): string | null | undefined; } } declare module 'video.js/dist/types/tech/tech' { export default class Tech { vhs?: Vhs; } } declare module 'video.js/dist/types/component' { export default interface Component { open(): void; close(): void; label(): string; description(): string; opened(): boolean; closeable(value?: boolean): boolean; fill(): void; empty(): void; content(value?: ModalContent): ModalContent; update(options: { title?: string; description?: string; }): void; crossOrigin(value?: string | null): string | null | undefined; setSrc(url?: string): void; controlText(text?: string): string; handleClick(): void; setThumbnailImage(src: string): void; updatePosition(value: number): void; vertical(value?: boolean): boolean; enable(): void; disable(): void; selected(value: boolean): void; getPercent(): number; } } interface PinningPlugin_ extends VideoJsPlugin_ { setOptions(options: Record): void; toggle(): void; } interface ThumbnailsPlugin_ extends VideoJsPlugin_ { } interface SocialPlugin_ extends VideoJsPlugin_ { } interface PlaylistUiPlugin_ extends VideoJsPlugin_ { options: Record; toggleSidebar(): void; } interface ImaDaiLoadOptions { streamRequest: unknown; fallbackSource: IVideoJsSource; podSourceResolver?: (streamId: string) => IVideoJsSource; } interface ImaDaiPlugin_ extends VideoJsPlugin_ { one: (event: string, eventHandler: (event: unknown) => void) => void; off: (event: string, eventHandler: (event: unknown) => void) => void; updateOptions(options: Record): void; load(options: ImaDaiLoadOptions): Promise; isImaDaiStream: boolean; contentDuration: number; relativeDuration: number; canSeekNow: boolean; relativeCurrentTime: number; totalAdsDuration: number; streamTimeForContentTime: (t: number) => number; contentTimeForStreamTime: (t: number) => number; } interface ImaClientSidePlugin_ extends VideoJsPlugin_ { settings: Record; adDisplayContainer: AdDisplayContainer; adMacroReplacement: (url: string) => string; adsLoader: AdsLoader; adsManager: AdsManager | null; adrequest: (adRequestUrl: string) => void; currentAd: Ad | null; isVpaid: () => boolean; setAdsRenderingSettings: (settings: AdsRenderingSettings) => void; } interface CustomEndscreenPlugin_ extends VideoJsPlugin_ { } interface SsaiPlugin_ extends VideoJsPlugin_ { updateConfig: (options: Record) => void; contentDuration: () => number; seekInRelativeTime: (t: number, preventAdSkips?: boolean) => number; currentLinearAd: () => LinearAd; relativeTimelineState: () => TimelineState; } interface VideojsErrorsPluginOptions { timeout: number; backgroundTimeout: number; } interface Ima3Configuration extends ImaClientSideConfiguration { sdkurl: string; } interface VideoJsErrorWithSdkMetadata { code: string; metadata: MediaError.ErrorMetadata; } declare module 'video.js/dist/types/player' { export default interface Player { seekable(): TimeRanges; remoteTextTracks(): TextTrackList; textTracks(): VideoJsTextTrackList; audioTracks(): VideoJsAudioTrackList; qualityLevels(): VideoJsQualityLevelsList; ads?: { error: (err?: null) => ErrorMetadata | null; }; titleBar?: VideoJsComponent___default; thumbnails(): ThumbnailsPlugin_; id3CuePointsTrack(): TextTrack | null; mediaCuePointsTrack(): TextTrack | null; currentSource(): IVideoJsSource; bcAnalytics(options: BcAnalytics_.BcAnalyticsPluginOptions): BcAnalytics_.BcAnalyticsPlugin; bcPlaylistUi(options?: PlaylistUiConfiguration): PlaylistUiPlugin_; imaDai(options?: ImaDaiConfiguration): ImaDaiPlugin_; social(options?: SocialSharingConfiguration): SocialPlugin_; pinning(options?: PinningConfiguration): PinningPlugin_; ima3(options?: Ima3Configuration): ImaClientSidePlugin_; customEndscreen(options?: CustomEndScreenConfiguration): CustomEndscreenPlugin_; playlist(): VideoJsPlugin_; ssai(options?: SsaiConfiguration): SsaiPlugin_; eme(): VideoJsPlugin_; endscreen(): VideoJsPlugin_; errors(options?: VideojsErrorsPluginOptions): VideoJsPlugin_; perSourceBehaviors(): VideoJsPlugin_; seekEvents(): VideoJsPlugin_; proxyTracks(): VideoJsPlugin_; error(err?: MediaError__default | string | number | VideoJsErrorWithSdkMetadata): MediaError__default | null | undefined; mediainfo?: MediaInfo; } } declare module 'video.js/dist/types/tracks/audio-track' { export default interface AudioTrack { id: string; } } declare module 'videojs-contrib-quality-levels/dist/types/quality-level' { export default interface QualityLevel { enabled: boolean; } } interface LogFunction { (...args: Array): void; createLogger(subName: string, subDelimiter?: string, subStyles?: string): LogFunction; createNewLogger(newName: string, newDelimiter?: string, newStyles?: string): LogFunction; levels: unknown; level(lvl?: 'info' | 'error' | 'all' | 'debug' | 'warn' | 'off'): string; history: { (): Array; filter(fname: string): Array; clear(): void; disable(): void; enable(): void; }; error(...args: Array): void; warn(...args: Array): void; debug(...args: Array): void; } type VideoJs = typeof Videojs_; type VideoJsLogger = LogFunction; type VideoJsPlayer = VideojsPlayer_; type VideoJsComponent = VideoJsComponent___default; type EventHandler = (data: T) => void; declare class EventEmitter { private events_; on(event: K, callback: EventHandler): void; off(event: K, callback: EventHandler): void; emit(event: K, data: M[K]): void; once(event: K, callback: EventHandler): void; offAllFor(event: keyof M): void; reset(): void; } declare const ValueProviderEvents: { readonly Transition: "transition"; }; declare class TransitionEvent { readonly from: T | null; readonly to: T | null; constructor(from: T | null, to: T | null); } interface ValueProviderEventMap { [ValueProviderEvents.Transition]: TransitionEvent; } declare class ValueProvider extends EventEmitter> { private val_; get value(): T | null; updateValue(received: T | null): void; safeAttempt(executor: (value: T) => R, fallback: () => R): R; } interface VideojsValueProviderDependencies { logger: VideoJsLogger; } interface AttemptOptions { silent?: boolean; } declare class VideoJsValueProvider

extends ValueProvider

{ private readonly videoJsLogger_; constructor(dependencies: VideojsValueProviderDependencies); safeAttemptOn(methodName: string, executor: (value: P) => T, fallback: T, options?: AttemptOptions): T; voidSafeAttemptOn(methodName: string, executor: (value: P) => void, options?: AttemptOptions): void; private warnAttempt_; } declare class VideoJsPlayerProvider extends VideoJsValueProvider { get player(): VideoJsPlayer | null; safeAttemptOnVideoJsPlayer(methodName: string, executor: (value: VideoJsPlayer) => T, fallback: T, options?: AttemptOptions): T; voidSafeAttemptOnVideoJsPlayer(methodName: string, executor: (value: VideoJsPlayer) => void, options?: AttemptOptions): void; } declare const PinningEvents: { readonly BeforePinningEnabled: "beforepinenabled"; readonly PinningEnabled: "pinenabled"; readonly BeforePinningDisabled: "beforepindisabled"; readonly PinningDisabled: "pindisabled"; readonly BeforePin: "beforepin"; readonly Pin: "pin"; readonly BeforeUnpin: "beforeunpin"; readonly Unpin: "unpin"; readonly BeforePinClose: "beforepinclose"; readonly PinClose: "pinclose"; }; declare const ImaClientSideEvents: { readonly ImaClientSideAdClick: "imaClientSideAdClick"; readonly ImaClientSideAdStarted: "imaClientSideAdStarted"; readonly ImaClientSideAdComplete: "imaClientSideAdComplete"; readonly ImaClientSideFirstQuartile: "imaClientSideFirstQuartile"; readonly ImaClientSideMidPoint: "imaClientSideMidPoint"; readonly ImaClientSideThirdQuartile: "imaClientSideThirdQuartile"; readonly ImaClientSideVolumeChanged: "imaClientSideVolumeChanged"; readonly ImaClientSidePaused: "imaClientSidePaused"; readonly ImaClientSideResumed: "imaClientSideResumed"; readonly ImaClientSideSkipped: "imaClientSideSkipped"; readonly ImaClientSideAllAdsCompleted: "imaClientSideAllAdsCompleted"; readonly ImaClientSideAdError: "imaClientSideAdError"; readonly ImaClientSideSdkLoaded: "imaClientSideSdkLoaded"; readonly ImaClientSideAdsRequest: "imaClientSideAdsRequest"; readonly ImaClientSideAdsPodEnded: "imaClientSideAdsPodEnded"; readonly ImaClientSideAdsPodStarted: "imaClientSideAdsPodStarted"; readonly ImaClientSideAdsLoad: "imaClientSideAdsLoad"; }; declare const ImaDaiEvents: { readonly ImaDaiSdkLoaded: "imaDaiSdkLoaded"; }; declare const SsaiEvents: { readonly ClickThrough: "ssaiClickThrough"; }; declare const Events: { readonly PlayerStateChanged: "playerStateChanged"; readonly PlayerMutedStatusChanged: "playerMutedStatusChanged"; readonly PlayerVolumeChanged: "playerVolumeChanged"; readonly PlayerTimeChanged: "playerTimeChanged"; readonly PlayerDurationChanged: "playerDurationChanged"; readonly PlayerRateChanged: "playerRateChanged"; readonly PlayerEnded: "playerEnded"; readonly PlayerError: "playerError"; readonly PlayerVideoElementChanged: "playerVideoElementChanged"; readonly PlayerPlay: "playerPlay"; readonly PlayerPlaying: "playerPlaying"; readonly PlayerPause: "playerPause"; readonly PlayerWaiting: "playerWaiting"; readonly PlayerDisposed: "playerDisposed"; readonly PlayerLoadedMetadata: "playerLoadedMetadata"; readonly PlayerLoadedData: "playerLoadedData"; readonly PlayerLoadStart: "playerLoadStart"; readonly PlayerCanPlay: "playerCanPlay"; readonly PlayerCanPlayThrough: "playerCanplayThrough"; readonly PlayerProgress: "playerProgress"; readonly PlayerSeeking: "playerSeeking"; readonly PlayerSeeked: "playerSeeked"; readonly PlayerAbort: "playerAbort"; readonly PlayerEmptied: "playerEmptied"; readonly PlayerStalled: "playerStalled"; readonly PlayerSuspend: "playerSuspend"; readonly PlayerResize: "playerResize"; readonly PlayerTextTracksChanged: "playerTextTracksChanged"; readonly PlayerThumbnailTracksChanged: "playerThumbnailTracksChanged"; readonly PlayerAudioTracksChanged: "playerAudioTracksChanged"; readonly PlayerQualityLevelsChanged: "playerQualityLevelsChanged"; readonly PlayerEnablePictureInPicture: "playerEnablePictureInPicture"; readonly PlayerDisablePictureInPicture: "playerDisablePictureInPictureChanged"; readonly PlayerEnterPictureInPicture: "playerEnterPictureInPicture"; readonly PlayerExitPictureInPicture: "playerExitPictureInPicture"; readonly ManifestRequestStart: "manifestrequeststart"; readonly ManifestRequestComplete: "manifestrequestcomplete"; readonly ManifestParseStart: "manifestparsestart"; readonly ManifestParseComplete: "manifestparsecomplete"; readonly PlaylistRequestStart: "playlistrequeststart"; readonly PlaylistRequestComplete: "playlistrequestcomplete"; readonly PlaylistParseStart: "playlistparsestart"; readonly PlaylistParseComplete: "playlistparsecomplete"; readonly SegmentSelected: "segmentselected"; readonly SegmentLoadStart: "segmentloadstart"; readonly SegmentLoaded: "segmentloaded"; readonly SegmentKeyLoadStart: "segmentkeyloadstart"; readonly SegmentKeyLoadComplete: "segmentkeyloadcomplete"; readonly SegmentDecryptionStart: "segmentdecryptionstart"; readonly SegmentDecryptionComplete: "segmentdecryptioncomplete"; readonly SegmentTransmuxingStart: "segmenttransmuxingstart"; readonly SegmentTransmuxingComplete: "segmenttransmuxingcomplete"; readonly SegmentTransmuxingTrackInfoAvailable: "segmenttransmuxingtrackinfoavailable"; readonly SegmentTransmuxingTimingInfoAvailable: "segmenttransmuxingtiminginfoavailable"; readonly SegmentAppendStart: "segmentappendstart"; readonly SegmentAppendComplete: "segmentappendcomplete"; readonly RenditionDisabled: "renditiondisabled"; readonly RenditionEnabled: "renditionenabled"; readonly RenditionSelected: "renditionselected"; readonly GapJumped: "gapjumped"; readonly BandwidthUpdate: "bandwidthupdate"; readonly TimelineChange: "timelinechange"; readonly CodecsChange: "codecschange"; readonly SeekableRangesChanged: "seekablerangeschanged"; readonly BufferedRangesChanged: "bufferedrangeschanged"; readonly PlayedRangesChanged: "playedrangeschanged"; readonly ContentSteeringLoadStart: "contentSteeringloadstart"; readonly ContentSteeringLoadComplete: "contentsteeringloadcomplete"; readonly ContentSteeringParsed: "contentsteeringparsed"; readonly EMEKeySystemAccessCompleted: "emeKeySystemAccessCompleted"; readonly EMEKeySessionCreated: "emeKeySessionCreated"; readonly EMEKeySessionUpdated: "emeKeySessionUpdated"; readonly EMEKeySessionClosed: "emeKeySessionClosed"; readonly EMEKeySessionRemoved: "emeKeySessionRemoved"; readonly EMEKeyStatusesChanged: "emeKeyStatusesChanged"; readonly EMEKeyMessage: "emeKeyMessage"; readonly EMELicenseRequestAttempted: "emeLicenseRequestAttempted"; readonly Ads: { readonly ContentChanged: "contentchanged"; readonly ContentUpdate: "contentUpdate"; readonly ContentResumed: "contentresumed"; readonly Ready: "adsready"; readonly Cancelled: "adscancelled"; readonly ReadyForPreroll: "adsReadyForPreroll"; readonly ReadyForPostroll: "adsReadyForPostroll"; readonly NoPreroll: "adsNoPreroll"; readonly NoPostroll: "adsNoPostroll"; readonly AdStart: "adStart"; readonly AdEnd: "adEnd"; readonly AdSkip: "adskip"; readonly AdTimeout: "adTimeout"; }; readonly Integrations: { readonly ImaDai: { readonly ImaDaiSdkLoaded: "imaDaiSdkLoaded"; }; readonly Pinning: { readonly BeforePinningEnabled: "beforepinenabled"; readonly PinningEnabled: "pinenabled"; readonly BeforePinningDisabled: "beforepindisabled"; readonly PinningDisabled: "pindisabled"; readonly BeforePin: "beforepin"; readonly Pin: "pin"; readonly BeforeUnpin: "beforeunpin"; readonly Unpin: "unpin"; readonly BeforePinClose: "beforepinclose"; readonly PinClose: "pinclose"; }; readonly ImaClientSide: { readonly ImaClientSideAdClick: "imaClientSideAdClick"; readonly ImaClientSideAdStarted: "imaClientSideAdStarted"; readonly ImaClientSideAdComplete: "imaClientSideAdComplete"; readonly ImaClientSideFirstQuartile: "imaClientSideFirstQuartile"; readonly ImaClientSideMidPoint: "imaClientSideMidPoint"; readonly ImaClientSideThirdQuartile: "imaClientSideThirdQuartile"; readonly ImaClientSideVolumeChanged: "imaClientSideVolumeChanged"; readonly ImaClientSidePaused: "imaClientSidePaused"; readonly ImaClientSideResumed: "imaClientSideResumed"; readonly ImaClientSideSkipped: "imaClientSideSkipped"; readonly ImaClientSideAllAdsCompleted: "imaClientSideAllAdsCompleted"; readonly ImaClientSideAdError: "imaClientSideAdError"; readonly ImaClientSideSdkLoaded: "imaClientSideSdkLoaded"; readonly ImaClientSideAdsRequest: "imaClientSideAdsRequest"; readonly ImaClientSideAdsPodEnded: "imaClientSideAdsPodEnded"; readonly ImaClientSideAdsPodStarted: "imaClientSideAdsPodStarted"; readonly ImaClientSideAdsLoad: "imaClientSideAdsLoad"; }; readonly Ssai: { readonly ClickThrough: "ssaiClickThrough"; }; }; readonly SpatialNavigation: { readonly FocusableComponentsChanged: "focusableComponentsChanged"; readonly EndOfFocusableComponents: "endOfFocusableComponents"; }; }; declare enum PlayerState$1 { Idle = 0, Paused = 1, Playing = 2, Buffering = 3 } declare abstract class PlayerEvent { abstract readonly type: (typeof Events)[keyof typeof Events]; } declare enum ErrorCategory { Network = "Network", Manifest = "Manifest", Eme = "Eme", Media = "Media", Streaming = "Streaming", Ads = "Ads", Brightcove = "Brightcove", Integration = "Integration" } declare enum ErrorCode { NetworkBadStatus = 1000, NetworkRequestFailed = 1001, NetworkRequestAborted = 1002, NetworkRequestTimeout = 1003, NetworkBodyParserFailed = 1004, UnsupportedSidxContainer = 2000, DashManifestSidxParsingError = 2001, HlsPlaylistRequestError = 2002, EMEFailedToRequestMediaKeySystemAccess = 3000, EMEFailedToCreateMediaKeys = 3001, EMEFailedToAttachMediaKeysToVideoElement = 3002, EMEFailedToCreateMediaKeySession = 3003, EMEFailedToSetServerCertificate = 3004, EMEFailedToGenerateLicenseRequest = 3005, EMEFailedToLoadSessionBySessionId = 3006, EMEFailedToUpdateSessionWithReceivedLicenseKeys = 3007, EMEFailedToCloseSession = 3008, EMEFailedToRemoveKeysFromSession = 3009, MediaAborted = 4000, MediaNetworkError = 4001, MediaDecodeError = 4002, MediaSourceNotSupported = 4003, MediaEncryptedError = 4004, MediaNoSource = 4005, UnknownPlayerError = 4006, StreamingHlsPlaylistParserError = 5000, StreamingDashManifestParserError = 5001, StreamingContentSteeringParserError = 5002, StreamingVttParserError = 5003, StreamingFailedToSelectNextSegment = 5004, StreamingFailedToDecryptSegment = 5005, StreamingFailedToTransmuxSegment = 5006, StreamingFailedToAppendSegment = 5007, StreamingCodecsChangeError = 5008, PrerollError = 5009, PostrollError = 5010, MidrollError = 5011, BeforePrerollError = 5012, RestorePlayerFailed = 5013, MacroReplacementFailed = 5014, ImaVmapCancelledError = 5015, ImaAdsManagerStartError = 5016, ImaNoAdAvailable = 5017, ImaInvalidCueError = 5018, ImaCueParsingError = 5019, ImaInvalidVpaidMode = 5020, ImaSDKLoadError = 5021, SsaiVmapParsingError = 5022, SsaiLiveVmapParsingError = 5023, SsaiVodVmapParsingError = 5024, SsaiUnsupportedOmAdSession = 5025, SsaiOmSessionError = 5026, SsaiVmapRequestError = 5027, BrightcoveInvalidAccountId = 6000, BrightcoveMissingAuth = 6001, BrightcovePlaybackApiUnknownIssue = 6002, BrightcovePlaybackApiAdConfigIdNotFound = 6003, BrightcovePlaybackApiDuplicateParams = 6004, BrightcoveAuthTokenRequired = 6005, BrightcoveInvalidAuthToken = 6006, BrightcovePlaybackApiDomainRestricted = 6007, BrightcovePlaybackApiIpRestricted = 6008, BrightcovePlaybackApiGeoRestricted = 6009, BrightcovePlaybackApiOffersRestricted = 6010, BrightcovePlaybackApiTagsRestricted = 6011, BrightcovePlaybackApiDeviceRestricted = 6012, BrightcovePlaybackApiVideoNotPlayable = 6013, BrightcovePlaybackApiPlaylistNotPlayable = 6014, BrightcovePlaybackApiNewViewersStreamLimit = 6015, BrightcovePlaybackApiExistingViewersStreamLimit = 6016, BrightcovePlaybackApiNewViewersDeviceLimit = 6017, BrightcovePlaybackApiAccountNotFound = 6018, BrightcovePlaybackApiResourceNotFound = 6019, BrightcovePlaybackApiVideoNotFound = 6020, BrightcovePlaybackApiPlaylistNotFound = 6021, BrightcoveConcurrencyApiAccountIsNotSupported = 6022, BrightcoveMaxConcurrencyLimitReached = 6023, BrightcoveConcurrencyApiClimitIsMissingInJwt = 6024, BrightcoveConcurrencyApiUidIsMissingInJwt = 6025, BrightcoveConcurrencyApiSidIsMissingInJwt = 6026, BrightcoveConcurrencyApiVideoNotFound = 6027, BrightcoveConcurrencyApiInvalidVideoId = 6028, BrightcoveConcurrencyApiSessionExpired = 6029, BrightcoveConcurrencyApiSessionNotFound = 6030, BrightcoveConcurrencyApiSessionStopped = 6031, BrightcoveConcurrencyApiUnknownIssue = 6032, BrightcoveConcurrencyApiPlaybackRestrictionsNotMet = 6033, BrightcoveVideoModelHasNoPlayableSources = 6034, GenericIntegrationIsNotRegistered = 7000 } declare abstract class PlayerError { abstract readonly category: ErrorCategory; abstract readonly code: ErrorCode; } declare class PlayerTimeRange { private readonly rangeStart_; private readonly rangeEnd_; constructor(start: number, end: number); get start(): number; get end(): number; isInRangeInclusive(time: number): boolean; isInRangeExclusive(time: number): boolean; isInPast(time: number): boolean; isInFuture(time: number): boolean; toString(): string; static fromTimeRanges(timeRanges: TimeRanges): Array; } declare class PlayerStateChangedEvent extends PlayerEvent { readonly type: "playerStateChanged"; readonly playerState: PlayerState$1; constructor(playerState: PlayerState$1); } declare class PlayerMutedStatusChangedEvent extends PlayerEvent { readonly type: "playerMutedStatusChanged"; readonly isMuted: boolean; constructor(isMuted: boolean); } declare class PlayerVolumeChangedEvent extends PlayerEvent { readonly type: "playerVolumeChanged"; readonly volumeLevel: number; constructor(volumeLevel: number); } declare class PlayerTimeChangedEvent extends PlayerEvent { readonly type: "playerTimeChanged"; readonly currentTime: number; constructor(currentTime: number); } declare class PlayerDurationChangedEvent extends PlayerEvent { readonly type: "playerDurationChanged"; readonly duration: number; constructor(duration: number); } declare class PlayerRateChangedEvent extends PlayerEvent { readonly type: "playerRateChanged"; readonly rate: number; constructor(rate: number); } declare class PlayerEndedEvent extends PlayerEvent { readonly type: "playerEnded"; } declare class PlayerDisposedEvent extends PlayerEvent { readonly type: "playerDisposed"; } declare class PlayerPlayEvent extends PlayerEvent { readonly type: "playerPlay"; } declare class PlayerPlayingEvent extends PlayerEvent { readonly type: "playerPlaying"; } declare class PlayerPauseEvent extends PlayerEvent { readonly type: "playerPause"; } declare class PlayerWaitingEvent extends PlayerEvent { readonly type: "playerWaiting"; } declare class PlayerLoadedMetadataEvent extends PlayerEvent { readonly type: "playerLoadedMetadata"; } declare class PlayerLoadStartEvent extends PlayerEvent { readonly type: "playerLoadStart"; } declare class PlayerLoadedDataEvent extends PlayerEvent { readonly type: "playerLoadedData"; } declare class PlayerCanPlayEvent extends PlayerEvent { readonly type: "playerCanPlay"; } declare class PlayerCanPlayThroughEvent extends PlayerEvent { readonly type: "playerCanplayThrough"; } declare class PlayerProgressEvent extends PlayerEvent { readonly type: "playerProgress"; readonly bufferedPercent: number; constructor(bufferedPercent: number); } declare class PlayerSeekingEvent extends PlayerEvent { readonly type: "playerSeeking"; } declare class PlayerSeekedEvent extends PlayerEvent { readonly type: "playerSeeked"; } declare class PlayerAbortEvent extends PlayerEvent { readonly type: "playerAbort"; } declare class PlayerEmptiedEvent extends PlayerEvent { readonly type: "playerEmptied"; } declare class PlayerStalledEvent extends PlayerEvent { readonly type: "playerStalled"; } declare class PlayerSuspendEvent extends PlayerEvent { readonly type: "playerSuspend"; } declare class PlayerResizeEvent extends PlayerEvent { readonly type: "playerResize"; } declare class PlayerTextTracksChangedEvent extends PlayerEvent { readonly type: "playerTextTracksChanged"; readonly tracks: Array; constructor(tracks: Array); } declare class PlayerThumbnailTracksChangedEvent extends PlayerEvent { readonly type: "playerThumbnailTracksChanged"; readonly tracks: Array; constructor(tracks: Array); } declare class PlayerAudioTracksChangedEvent extends PlayerEvent { readonly type: "playerAudioTracksChanged"; readonly tracks: Array; constructor(tracks: Array); } declare class PlayerQualityLevelsChangedEvent extends PlayerEvent { readonly type: "playerQualityLevelsChanged"; readonly levels: Array; constructor(levels: Array); } declare class PlayerDisablePiPChangeEvent extends PlayerEvent { readonly type: "playerDisablePictureInPictureChanged"; } declare class PlayerEnablePiPChangeEvent extends PlayerEvent { readonly type: "playerEnablePictureInPicture"; } declare class PlayerEnterPiPEvent extends PlayerEvent { readonly type: "playerEnterPictureInPicture"; readonly pictureInPictureWindow: PictureInPictureWindow; constructor(pictureInPictureWindow: PictureInPictureWindow); } declare class PlayerExitPiPEvent extends PlayerEvent { readonly type: "playerExitPictureInPicture"; } declare class SeekableRangesChangedEvent extends PlayerEvent { readonly type: "seekablerangeschanged"; readonly seekableRanges: Array; constructor(seekableRanges: Array); } declare class BufferedRangesChangedEvent extends PlayerEvent { readonly type: "bufferedrangeschanged"; readonly bufferedRanges: Array; constructor(bufferedRanges: Array); } declare class PlayedRangesChangedEvent extends PlayerEvent { readonly type: "playedrangeschanged"; readonly playedRanges: Array; constructor(playedRanges: Array); } declare class PlayerErrorEvent extends PlayerEvent { readonly type: "playerError"; readonly error: PlayerError; constructor(error: PlayerError); } declare class PlayerVideoElementChangedEvent extends PlayerEvent { readonly type: "playerVideoElementChanged"; readonly videoElement: HTMLVideoElement; constructor(videoElement: HTMLVideoElement); } declare abstract class AdsEvent { abstract readonly type: (typeof Events.Ads)[keyof typeof Events.Ads]; } declare class AdsContentChangedEvent extends AdsEvent { readonly type: "contentchanged"; } declare class AdsContentUpdateEvent extends AdsEvent { readonly type: "contentUpdate"; readonly previousSource: string; constructor(previousSource: string); } declare class AdsContentResumedEvent extends AdsEvent { readonly type: "contentresumed"; } declare class AdsReadyEvent extends AdsEvent { readonly type: "adsready"; } declare class AdsCancelledEvent extends AdsEvent { readonly type: "adscancelled"; } declare class AdsAdSkipEvent extends AdsEvent { readonly type: "adskip"; } declare class AdsReadyForPrerollEvent extends AdsEvent { readonly type: "adsReadyForPreroll"; } declare class AdsReadyForPostrollEvent extends AdsEvent { readonly type: "adsReadyForPostroll"; } declare class AdsNoPrerollEvent extends AdsEvent { readonly type: "adsNoPreroll"; } declare class AdsNoPostrollEvent extends AdsEvent { readonly type: "adsNoPostroll"; } declare class AdsAdStartEvent extends AdsEvent { readonly type: "adStart"; } declare class AdsAdEndEvent extends AdsEvent { readonly type: "adEnd"; } declare class AdsAdTimeoutEvent extends AdsEvent { readonly type: "adTimeout"; } declare abstract class EMEKeySessionEvent extends PlayerEvent { readonly keySession: MediaKeySession; constructor(keySession: MediaKeySession); } declare class EMEKeySystemAccessCompletedEvent extends PlayerEvent { readonly type: "emeKeySystemAccessCompleted"; readonly mediaKeys: MediaKeys; constructor(mediaKeys: MediaKeys); } declare class EMEKeySessionCreatedEvent extends EMEKeySessionEvent { readonly type: "emeKeySessionCreated"; } declare class EMEKeySessionUpdatedEvent extends EMEKeySessionEvent { readonly type: "emeKeySessionUpdated"; } declare class EMEKeySessionClosedEvent extends EMEKeySessionEvent { readonly type: "emeKeySessionClosed"; } declare class EMEKeyStatusesChangedEvent extends PlayerEvent { readonly type: "emeKeyStatusesChanged"; readonly keyStatusesMap: MediaKeyStatusMap; constructor(keyStatusesMap: MediaKeyStatusMap); } declare class EMEKeyMessageEvent extends PlayerEvent { readonly type: "emeKeyMessage"; readonly messageEvent: MediaKeyMessageEvent; constructor(messageEvent: MediaKeyMessageEvent); } declare class EMELicenseRequestAttemptedEvent extends PlayerEvent { readonly type: "emeLicenseRequestAttempted"; } declare class EMEKeySessionRemovedEvent extends EMEKeySessionEvent { readonly type: "emeKeySessionRemoved"; } declare abstract class ImaDaiIntegrationEvent { abstract readonly type: (typeof ImaDaiEvents)[keyof typeof ImaDaiEvents]; } declare abstract class PinningIntegrationEvent { abstract readonly type: (typeof PinningEvents)[keyof typeof PinningEvents]; } declare abstract class ImaClientSideIntegrationEvent { abstract readonly type: (typeof ImaClientSideEvents)[keyof typeof ImaClientSideEvents]; } declare abstract class SsaiIntegrationEvent { abstract readonly type: (typeof SsaiEvents)[keyof typeof SsaiEvents]; } declare class ImaDaiSdkLoadedEvent extends ImaDaiIntegrationEvent { readonly type: "imaDaiSdkLoaded"; readonly imaDaiSdk: Record; constructor(imaDaiSdk: Record); } declare class BeforePinningEnabledEvent extends PinningIntegrationEvent { readonly type: "beforepinenabled"; } declare class PinningEnabledEvent extends PinningIntegrationEvent { readonly type: "pinenabled"; } declare class BeforePinningDisabledEvent extends PinningIntegrationEvent { readonly type: "beforepindisabled"; } declare class PinningDisabledEvent extends PinningIntegrationEvent { readonly type: "pindisabled"; } declare class BeforePinEvent extends PinningIntegrationEvent { readonly type: "beforepin"; } declare class PinEvent extends PinningIntegrationEvent { readonly type: "pin"; } declare class BeforeUnpinEvent extends PinningIntegrationEvent { readonly type: "beforeunpin"; } declare class UnpinEvent extends PinningIntegrationEvent { readonly type: "unpin"; } declare class BeforePinCloseEvent extends PinningIntegrationEvent { readonly type: "beforepinclose"; } declare class PinCloseEvent extends PinningIntegrationEvent { readonly type: "pinclose"; } declare class ImaClientSideAdClickEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideAdClick"; } declare class ImaClientSideAdStartedEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideAdStarted"; } declare class ImaClientSideAdCompleteEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideAdComplete"; } declare class ImaClientSideFirstQuartileEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideFirstQuartile"; } declare class ImaClientSideMidPointEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideMidPoint"; } declare class ImaClientSideThirdQuartileEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideThirdQuartile"; } declare class ImaClientSideVolumeChangedEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideVolumeChanged"; } declare class ImaClientSidePausedEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSidePaused"; } declare class ImaClientSideResumedEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideResumed"; } declare class ImaClientSideSkippedEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideSkipped"; } declare class ImaClientSideAllAdsCompletedEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideAllAdsCompleted"; } declare class ImaClientSideAdErrorEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideAdError"; } declare class ImaClientSideSdkLoadedEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideSdkLoaded"; } declare class ImaClientSideAdsRequestEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideAdsRequest"; } declare class ImaClientSideAdsPodEndedEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideAdsPodEnded"; } declare class ImaClientSideAdsPodStartedEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideAdsPodStarted"; } declare class ImaClientSideAdsLoadEvent extends ImaClientSideIntegrationEvent { readonly type: "imaClientSideAdsLoad"; } declare class SsaiClickThroughEvent extends SsaiIntegrationEvent { readonly type: "ssaiClickThrough"; } declare abstract class SpatialNavigationEvent { abstract readonly type: (typeof Events.SpatialNavigation)[keyof typeof Events.SpatialNavigation]; } declare class FocusableComponentsChangedEvent extends SpatialNavigationEvent { readonly type: "focusableComponentsChanged"; } declare class EndOfFocusableComponentsEvent extends SpatialNavigationEvent { readonly type: "endOfFocusableComponents"; } declare enum SegmentType { Main = "main", Audio = "audio", Video = "video", Text = "text", Image = "image" } declare enum PlaylistType { Multivaritant = "multivariant", Media = "media" } interface ManifestInfo { uri: string; } interface RenditionInfo { id: string; bandwidth: number; resolution: { width: number; height: number; }; codecs: string; } interface ParsedManifest { duration: number; isLive: boolean; renditions: Array; } interface PlaylistInfo { type: PlaylistType; uri: string; } interface ParsedPlaylist { type: PlaylistType; isLive: boolean; renditions: Array; } interface SegmentInfo { type: SegmentType; uri: string; start: number; duration: number; isEncrypted: boolean; isMediaInitialization: boolean; } interface SegmentKeyInfo { uri: string; } interface TrackInfo { hasVideo: boolean; hasAudio: boolean; } interface TimingInfo { pts: { start: number; end: number; }; dts: { start: number; end: number; }; } interface GapInfo { start: number; end: number; } interface BandwidthUpdateInfo { from: number; to: number; } interface TimelineChangeInfo { from: number; to: number; } interface CodecsChangeInfo { from: string; to: string; } interface ContentSteeringInfo { uri: string; } interface ContentSteeringManifest { version: string; reloadUri?: string; priority: Array; } declare enum RenditionCause { Abr = "abr", ContentSteering = "content-steering", Exclude = "excluded", QualityChange = "fast-quality", Initial = "initial" } declare abstract class ManifestEvent extends PlayerEvent { readonly manifestInfo: ManifestInfo; constructor(manifestInfo: ManifestInfo); } declare class ManifestRequestStartEvent extends ManifestEvent { readonly type: "manifestrequeststart"; } declare class ManifestRequestCompleteEvent extends ManifestEvent { readonly type: "manifestrequestcomplete"; } declare class ManifestParseStartEvent extends ManifestEvent { readonly type: "manifestparsestart"; } declare class ManifestParseCompleteEvent extends ManifestEvent { readonly type: "manifestparsecomplete"; readonly parsedManifest: ParsedManifest; constructor(manifestInfo: ManifestInfo, parsedManifest: ParsedManifest); } declare abstract class PlaylistEvent extends PlayerEvent { readonly playlistInfo: PlaylistInfo; constructor(playlistInfo: PlaylistInfo); } declare class PlaylistRequestStartEvent extends PlaylistEvent { readonly type: "playlistrequeststart"; } declare class PlaylistRequestCompleteEvent extends PlaylistEvent { readonly type: "playlistrequestcomplete"; } declare class PlaylistParseStartEvent extends PlaylistEvent { readonly type: "playlistparsestart"; } declare class PlaylistParseCompleteEvent extends PlaylistEvent { readonly type: "playlistparsecomplete"; readonly parsedPlaylist: ParsedPlaylist; constructor(playlistInfo: PlaylistInfo, parsedPlaylist: ParsedPlaylist); } declare abstract class SegmentEvent extends PlayerEvent { readonly segmentInfo: SegmentInfo; constructor(segmentInfo: SegmentInfo); } declare class SegmentSelectedEvent extends SegmentEvent { readonly type: "segmentselected"; } declare class SegmentLoadStartEvent extends SegmentEvent { readonly type: "segmentloadstart"; } declare class SegmentLoadedEvent extends SegmentEvent { readonly type: "segmentloaded"; } declare class SegmentDecryptionStartEvent extends SegmentEvent { readonly type: "segmentdecryptionstart"; } declare class SegmentDecryptionCompleteEvent extends SegmentEvent { readonly type: "segmentdecryptioncomplete"; } declare class SegmentTransmuxingStartEvent extends SegmentEvent { readonly type: "segmenttransmuxingstart"; } declare class SegmentTransmuxingCompleteEvent extends SegmentEvent { readonly type: "segmenttransmuxingcomplete"; } declare class SegmentTransmuxingTrackInfoAvailableEvent extends SegmentEvent { readonly type: "segmenttransmuxingtrackinfoavailable"; readonly trackInfo: TrackInfo; constructor(segmentInfo: SegmentInfo, trackInfo: TrackInfo); } declare class SegmentTransmuxingTimingInfoAvailableEvent extends SegmentEvent { readonly type: "segmenttransmuxingtiminginfoavailable"; readonly timingInfo: TimingInfo; constructor(segmentInfo: SegmentInfo, timingInfo: TimingInfo); } declare class SegmentAppendStartEvent extends SegmentEvent { readonly type: "segmentappendstart"; } declare class SegmentAppendCompleteEvent extends SegmentEvent { readonly type: "segmentappendcomplete"; } declare abstract class SegmentKeyEvent extends SegmentEvent { readonly keyInfo: SegmentKeyInfo; constructor(segmentInfo: SegmentInfo, keyInfo: SegmentKeyInfo); } declare class SegmentKeyLoadStartEvent extends SegmentKeyEvent { readonly type: "segmentkeyloadstart"; } declare class SegmentKeyLoadCompleteEvent extends SegmentKeyEvent { readonly type: "segmentkeyloadcomplete"; } declare abstract class RenditionEvent extends PlayerEvent { readonly renditionInfo: RenditionInfo; readonly cause: RenditionCause; constructor(renditionInfo: RenditionInfo, cause: RenditionCause); } declare class RenditionDisabledEvent extends RenditionEvent { readonly type: "renditiondisabled"; } declare class RenditionEnabledEvent extends RenditionEvent { readonly type: "renditionenabled"; } declare class RenditionSelectedEvent extends RenditionEvent { readonly type: "renditionselected"; } declare class GapJumpedEvent extends PlayerEvent { readonly type: "gapjumped"; readonly gapInfo: GapInfo; constructor(gapInfo: GapInfo); } declare class BandwidthUpdateEvent extends PlayerEvent { readonly type: "bandwidthupdate"; readonly bandwidthUpdateInfo: BandwidthUpdateInfo; constructor(bandwidthUpdateInfo: BandwidthUpdateInfo); } declare class TimelineChangeEvent extends PlayerEvent { readonly type: "timelinechange"; readonly timelineChangeInfo: TimelineChangeInfo; constructor(timelineChangeInfo: TimelineChangeInfo); } declare class CodecsChangeEvent extends PlayerEvent { readonly type: "codecschange"; readonly codecsChangeInfo: CodecsChangeInfo; constructor(codecsChangeInfo: CodecsChangeInfo); } declare abstract class ContentSteeringEvent extends PlayerEvent { readonly contentSteeringInfo: ContentSteeringInfo; constructor(contentSteeringInfo: ContentSteeringInfo); } declare class ContentSteeringLoadStartEvent extends ContentSteeringEvent { readonly type: "contentSteeringloadstart"; } declare class ContentSteeringLoadCompleteEvent extends ContentSteeringEvent { readonly type: "contentsteeringloadcomplete"; } declare class ContentSteeringParsedEvent extends ContentSteeringEvent { readonly type: "contentsteeringparsed"; readonly contentSteeringManifest: ContentSteeringManifest; constructor(contentSteeringInfo: ContentSteeringInfo, contentSteeringManifest: ContentSteeringManifest); } interface EventToTypeMap { [Events.PlayerStateChanged]: PlayerStateChangedEvent; [Events.PlayerMutedStatusChanged]: PlayerMutedStatusChangedEvent; [Events.PlayerVolumeChanged]: PlayerVolumeChangedEvent; [Events.PlayerTimeChanged]: PlayerTimeChangedEvent; [Events.PlayerDurationChanged]: PlayerDurationChangedEvent; [Events.PlayerRateChanged]: PlayerRateChangedEvent; [Events.PlayerEnded]: PlayerEndedEvent; [Events.PlayerPlay]: PlayerPlayEvent; [Events.PlayerPlaying]: PlayerPlayingEvent; [Events.PlayerPause]: PlayerPauseEvent; [Events.PlayerWaiting]: PlayerWaitingEvent; [Events.PlayerDisposed]: PlayerDisposedEvent; [Events.PlayerLoadedMetadata]: PlayerLoadedMetadataEvent; [Events.PlayerLoadStart]: PlayerLoadStartEvent; [Events.PlayerLoadedData]: PlayerLoadedDataEvent; [Events.PlayerCanPlay]: PlayerCanPlayEvent; [Events.PlayerCanPlayThrough]: PlayerCanPlayThroughEvent; [Events.PlayerProgress]: PlayerProgressEvent; [Events.PlayerSeeking]: PlayerSeekingEvent; [Events.PlayerSeeked]: PlayerSeekedEvent; [Events.PlayerAbort]: PlayerAbortEvent; [Events.PlayerEmptied]: PlayerEmptiedEvent; [Events.PlayerStalled]: PlayerStalledEvent; [Events.PlayerSuspend]: PlayerSuspendEvent; [Events.PlayerResize]: PlayerResizeEvent; [Events.PlayerVideoElementChanged]: PlayerVideoElementChangedEvent; [Events.PlayerTextTracksChanged]: PlayerTextTracksChangedEvent; [Events.PlayerThumbnailTracksChanged]: PlayerThumbnailTracksChangedEvent; [Events.PlayerAudioTracksChanged]: PlayerAudioTracksChangedEvent; [Events.PlayerQualityLevelsChanged]: PlayerQualityLevelsChangedEvent; [Events.PlayerEnablePictureInPicture]: PlayerEnablePiPChangeEvent; [Events.PlayerDisablePictureInPicture]: PlayerDisablePiPChangeEvent; [Events.PlayerEnterPictureInPicture]: PlayerEnterPiPEvent; [Events.PlayerExitPictureInPicture]: PlayerExitPiPEvent; [Events.ManifestRequestStart]: ManifestRequestStartEvent; [Events.ManifestRequestComplete]: ManifestRequestCompleteEvent; [Events.ManifestParseStart]: ManifestParseStartEvent; [Events.ManifestParseComplete]: ManifestParseCompleteEvent; [Events.PlaylistRequestStart]: PlaylistRequestStartEvent; [Events.PlaylistRequestComplete]: PlaylistRequestCompleteEvent; [Events.PlaylistParseStart]: PlaylistParseStartEvent; [Events.PlaylistParseComplete]: PlaylistParseCompleteEvent; [Events.SegmentSelected]: SegmentSelectedEvent; [Events.SegmentLoadStart]: SegmentLoadStartEvent; [Events.SegmentLoaded]: SegmentLoadedEvent; [Events.SegmentKeyLoadStart]: SegmentKeyLoadStartEvent; [Events.SegmentKeyLoadComplete]: SegmentKeyLoadCompleteEvent; [Events.SegmentDecryptionStart]: SegmentDecryptionStartEvent; [Events.SegmentDecryptionComplete]: SegmentDecryptionCompleteEvent; [Events.SegmentTransmuxingStart]: SegmentTransmuxingStartEvent; [Events.SegmentTransmuxingComplete]: SegmentTransmuxingCompleteEvent; [Events.SegmentTransmuxingTrackInfoAvailable]: SegmentTransmuxingTrackInfoAvailableEvent; [Events.SegmentTransmuxingTimingInfoAvailable]: SegmentTransmuxingTimingInfoAvailableEvent; [Events.SegmentAppendStart]: SegmentAppendStartEvent; [Events.SegmentAppendComplete]: SegmentAppendCompleteEvent; [Events.RenditionDisabled]: RenditionDisabledEvent; [Events.RenditionEnabled]: RenditionEnabledEvent; [Events.RenditionSelected]: RenditionSelectedEvent; [Events.GapJumped]: GapJumpedEvent; [Events.BandwidthUpdate]: BandwidthUpdateEvent; [Events.TimelineChange]: TimelineChangeEvent; [Events.CodecsChange]: CodecsChangeEvent; [Events.SeekableRangesChanged]: SeekableRangesChangedEvent; [Events.BufferedRangesChanged]: BufferedRangesChangedEvent; [Events.PlayedRangesChanged]: PlayedRangesChangedEvent; [Events.ContentSteeringLoadStart]: ContentSteeringLoadStartEvent; [Events.ContentSteeringLoadComplete]: ContentSteeringLoadCompleteEvent; [Events.ContentSteeringParsed]: ContentSteeringParsedEvent; [Events.Ads.ContentChanged]: AdsContentChangedEvent; [Events.Ads.ContentUpdate]: AdsContentUpdateEvent; [Events.Ads.ContentResumed]: AdsContentResumedEvent; [Events.Ads.Ready]: AdsReadyEvent; [Events.Ads.Cancelled]: AdsCancelledEvent; [Events.Ads.AdStart]: AdsAdStartEvent; [Events.Ads.AdEnd]: AdsAdEndEvent; [Events.Ads.AdSkip]: AdsAdSkipEvent; [Events.Ads.AdTimeout]: AdsAdTimeoutEvent; [Events.Ads.ReadyForPreroll]: AdsReadyForPrerollEvent; [Events.Ads.ReadyForPostroll]: AdsReadyForPostrollEvent; [Events.Ads.NoPreroll]: AdsNoPrerollEvent; [Events.Ads.NoPostroll]: AdsNoPostrollEvent; [Events.Integrations.ImaDai.ImaDaiSdkLoaded]: ImaDaiSdkLoadedEvent; [Events.Integrations.Pinning.BeforePinningEnabled]: BeforePinningEnabledEvent; [Events.Integrations.Pinning.PinningEnabled]: PinningEnabledEvent; [Events.Integrations.Pinning.BeforePinningDisabled]: BeforePinningDisabledEvent; [Events.Integrations.Pinning.PinningDisabled]: PinningDisabledEvent; [Events.Integrations.Pinning.BeforePin]: BeforePinEvent; [Events.Integrations.Pinning.Pin]: PinEvent; [Events.Integrations.Pinning.BeforeUnpin]: BeforeUnpinEvent; [Events.Integrations.Pinning.Unpin]: UnpinEvent; [Events.Integrations.Pinning.BeforePinClose]: BeforePinCloseEvent; [Events.Integrations.Pinning.PinClose]: PinCloseEvent; [Events.Integrations.ImaClientSide.ImaClientSideAdClick]: ImaClientSideAdClickEvent; [Events.Integrations.ImaClientSide.ImaClientSideAdStarted]: ImaClientSideAdStartedEvent; [Events.Integrations.ImaClientSide.ImaClientSideAdComplete]: ImaClientSideAdCompleteEvent; [Events.Integrations.ImaClientSide.ImaClientSideFirstQuartile]: ImaClientSideFirstQuartileEvent; [Events.Integrations.ImaClientSide.ImaClientSideMidPoint]: ImaClientSideMidPointEvent; [Events.Integrations.ImaClientSide.ImaClientSideThirdQuartile]: ImaClientSideThirdQuartileEvent; [Events.Integrations.ImaClientSide.ImaClientSideVolumeChanged]: ImaClientSideVolumeChangedEvent; [Events.Integrations.ImaClientSide.ImaClientSidePaused]: ImaClientSidePausedEvent; [Events.Integrations.ImaClientSide.ImaClientSideResumed]: ImaClientSideResumedEvent; [Events.Integrations.ImaClientSide.ImaClientSideSkipped]: ImaClientSideSkippedEvent; [Events.Integrations.ImaClientSide.ImaClientSideAllAdsCompleted]: ImaClientSideAllAdsCompletedEvent; [Events.Integrations.ImaClientSide.ImaClientSideAdError]: ImaClientSideAdErrorEvent; [Events.Integrations.ImaClientSide.ImaClientSideSdkLoaded]: ImaClientSideSdkLoadedEvent; [Events.Integrations.ImaClientSide.ImaClientSideAdsRequest]: ImaClientSideAdsRequestEvent; [Events.Integrations.ImaClientSide.ImaClientSideAdsPodEnded]: ImaClientSideAdsPodEndedEvent; [Events.Integrations.ImaClientSide.ImaClientSideAdsPodStarted]: ImaClientSideAdsPodStartedEvent; [Events.Integrations.ImaClientSide.ImaClientSideAdsLoad]: ImaClientSideAdsLoadEvent; [Events.Integrations.Ssai.ClickThrough]: SsaiClickThroughEvent; [Events.PlayerError]: PlayerErrorEvent; [Events.EMEKeySystemAccessCompleted]: EMEKeySystemAccessCompletedEvent; [Events.EMEKeySessionCreated]: EMEKeySessionCreatedEvent; [Events.EMEKeySessionUpdated]: EMEKeySessionUpdatedEvent; [Events.EMEKeySessionClosed]: EMEKeySessionClosedEvent; [Events.EMEKeyStatusesChanged]: EMEKeyStatusesChangedEvent; [Events.EMEKeyMessage]: EMEKeyMessageEvent; [Events.EMELicenseRequestAttempted]: EMELicenseRequestAttemptedEvent; [Events.EMEKeySessionRemoved]: EMEKeySessionRemovedEvent; [Events.SpatialNavigation.FocusableComponentsChanged]: FocusableComponentsChangedEvent; [Events.SpatialNavigation.EndOfFocusableComponents]: EndOfFocusableComponentsEvent; } interface PlayerState { currentVideoId: string | null; currentMediaInfo: MediaInfo | null; isSocialSharingEnabled: boolean; } type DeepPartial = T extends object ? { [P in keyof T]?: DeepPartial; } : T; type StorageMix = { [P in keyof A]: A[P] | StoreNode; }; declare class StoreNode { protected storage_: StorageMix; constructor(storage: StorageMix); update(chunk: DeepPartial): void; getSnapshot(): A; } declare class Store { private readonly init_; protected currentSnapshot_: T; protected storage_: StoreNode; constructor(init: () => StoreNode); getSnapshot(): T; update(chunk: DeepPartial): void; read(reader: (config: T) => E): E; reset(): void; } declare class StateProvider extends Store { constructor(); } interface VideoJsServiceDependencies { videoJsPlayerProvider: VideoJsPlayerProvider; sdkEventEmitter: EventEmitter; sdkStateProvider: StateProvider; videojs: VideoJs; logger: VideoJsLogger; configuration: C; } /** * Every entity that depends on videojs player MUST extend this abstract class. * This class is a simple abstraction, yet it provides strict rules for developers to handle life cycle properly. * * VideoJsPlayerAdapter manages videoJsPlayerProvider (in other words: calls updateValue(player/null)) */ declare abstract class BaseVideoJsService { protected readonly videoJsPlayerProvider_: VideoJsPlayerProvider; protected readonly videojs_: VideoJs; protected readonly logger_: VideoJsLogger; protected readonly sdkEventEmitter_: EventEmitter; protected readonly sdkStateProvider_: StateProvider; protected configuration_: C; constructor(dependencies: VideoJsServiceDependencies); private readonly handlePlayerTransition_; /** @internal */ dispose(): void; /** @internal */ updateConfiguration(configuration: C, prev: C): void; /** * @see INTERNAL_README.md -> Sequence diagrams -> VideoJS Services Life Cycle Hooks * * Life Cycle of the videoJs service: * [Constructor] -> [attach] -> [detach] -> [dispose] * + additional [UpdateConfiguration] * NOTE: you don't have to call detach related stuff during dispose! * handleDetach hook will always!!! be executed prior handleDispose hook! * * Here are rules for life cycle hooks: * - init service-related stuff during [constructor] phase. * - init player-related stuff during [attach] phase. * - destroy player-related stuff during [detach] phase. * - destroy service-related stuff during [dispose] phase. * * Example: * class SomeVideoJsService extends BaseVideoJsService { * * constructor() { * // this is "constructor" phase, init service-related stuff here! * } * * handlePlayerAttach(player: VideoJsPlayer): void { * // this is "attach" phase, init player-related stuff here! * } * * handlePlayerDetach(player: VideoJsPlayer): void { * // This is "detach" phase, destroy player-related stuff here! * } * * handleDispose(): void { * // This is "dispose" phase, destroy service-related stuff here! * } * * handleUpdateConfiguration(configuration: SomeVideoJsServiceConfig): void { * // This is an additional hook to do something extra during "updateConfiguration" phase. * } * } * * Each Service MUST implement Service lifeCycle Hooks: */ protected abstract handlePlayerAttach_(player: VideoJsPlayer): void; protected abstract handlePlayerDetach_(player: VideoJsPlayer): void; protected abstract handleDispose_(): void; protected abstract handleUpdateConfiguration_(configuration: C, prev: C): void; } interface VideoJsUiComponentData { name: string; type: string; options: Record; } declare class VideoJsUiComponentsStorage extends BaseVideoJsService implements UiComponentsStorage { private static readonly typeToFactoryMap_; static registerFactory(type: string, factory: typeof VideoJsUiComponentAdapter): void; static getFactoryByType(type: string): typeof VideoJsUiComponentAdapter | null; private readonly storage_; protected handlePlayerAttach_(player: VideoJsPlayer): void; protected handlePlayerDetach_(): void; protected handleUpdateConfiguration_(): void; protected handleDispose_(): void; addValueProvider(data: VideoJsUiComponentData, valueProvider: ValueProvider): void; removeValueProvider(data: VideoJsUiComponentData): void; createVideoJsComponent(data: VideoJsUiComponentData, player: VideoJsPlayer): VideoJsComponent | null; createSdkComponent(videoJsComponent: VideoJsComponent): UiComponent | null; isVideoJsComponentInstance(component: unknown): boolean; } interface VideoJsUiComponentAdapterDependencies extends UiComponentDependencies { videoJsComponent?: VideoJsComponent; } declare class VideoJsUiComponentAdapter implements UiComponent { private static componentsStorage_; static setComponentsStorage(storage: VideoJsUiComponentsStorage): void; static removeComponentsStorage(): void; protected readonly type_: string; protected readonly name_: string; protected readonly options_: Record; protected readonly videoJsComponentValueProvider_: ValueProvider; protected readonly data_: VideoJsUiComponentData; constructor(dependencies: VideoJsUiComponentAdapterDependencies); getVideoJsComponent(): VideoJsComponent | null; show(): void; hide(): void; getChild(name: string): UiComponent | null; getAllChildren(): Array; addChild(component: UiComponent): void; removeChild(name: string): void; hasClass(value: string): boolean; addClass(...classesToAdd: Array): void; removeClass(...classesToRemove: Array): void; getAttribute(attribute: string): string | null; setAttribute(attribute: string, value: string): void; removeAttribute(attribute: string): void; getDOMElement(): Element | null; protected handleKeyPress_(event: KeyboardEvent): void; protected handleKeyDown_(event: KeyboardEvent): void; protected enableTouchActivity_(): void; protected emitTap_(): void; focus(): void; blur(): void; getWidth(): number; setWidth(value: number): void; getHeight(): number; setHeight(value: number): void; getComputedWidth(): number; getComputedHeight(): number; getComponentName(): string; dispose(): void; } declare class VideojsUiManagerAdapter extends BaseVideoJsService implements UiManager { private static DefaultComponentsMap_; static overrideDefaultComponent(componentToOverride: keyof typeof DefaultPlayerComponents, componentFactory: typeof VideoJsUiComponentAdapter): void; private playerComponent_; /** @internal */ constructor(dependencies: VideoJsServiceDependencies); protected handlePlayerAttach_(player: VideoJsPlayer): void; protected handlePlayerDetach_(): void; protected handleUpdateConfiguration_(config: PlayerConfiguration): void; protected handleDispose_(): void; private readonly setupPlayerUiOptions_; addLanguagePack(language: LanguageKey, languagePack: Record): void; getPlayerContainerUiComponent(): UiComponent | null; } interface KeySystemConfig { licenseServerUri: string; licenseServerUriMap?: Record; serverCertificateUri?: string; serverCertificate?: Uint8Array; persistentState?: MediaKeysRequirement; distinctiveIdentifier?: MediaKeysRequirement; videoRobustness?: string; audioRobustness?: string; sessionType?: MediaKeySessionType; getContentId?: (contentId: string) => string; } type SourceKeySystems = Record; interface Source { mimeType: string; url: string; keySystems?: SourceKeySystems; vmap?: string; } /** * See: {@link https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/html5/reference/js/StreamRequest} */ interface StreamRequest { adTagParameters: unknown | null; apiKey: string; authToken: string; format: string; omidAccessModeRules: unknown; streamActivityMonitorId: string; } interface ImaDaiIntegrationLoadOptions { streamRequest: StreamRequest; /** * A fallback stream to use if the IMA DAI SDK fails to get a stream */ fallbackSource: Source; /** * A function to resolve the source URL for a pod stream by replacing the placeholder in the provided URL with the given stream ID. Should return valid source object. */ podSourceResolver?: (streamId: string) => Source; } interface ImaDaiIntegration { /** * Request a stream via the IMA DAI SDK or fallback to a provided fallback stream */ load(options: ImaDaiIntegrationLoadOptions): void; /** * Check if the IMA DAI stream is playing. Returns true if it is, false otherwise. */ getIsImaDaiStream(): boolean; /** * Getter for the content duration (without ads). */ getContentDuration(): number; /** * Get the current ad duration if in ad mode, or content duration without ads otherwise. */ getRelativeDuration(): number; /** * Whether it is possible to perform a seek now. */ getCanSeekNow(): boolean; /** * Get the current time for the current ad if in ad mode, or current content time (without ads) otherwise. */ getRelativeCurrentTime(): number; /** * Get the total duration of all known ads (applicable for VOD only). */ getTotalAdsDuration(): number; /** * Convert a given content time to stream time with ads. */ convertContentTimeToStreamTime(contentTime: number): number; /** * Convert a given stream time to content time without ads. */ convertStreamTimeToContentTime(streamTime: number): number; /** @internal */ updateConfiguration(imaDaiConfiguration: ImaDaiConfiguration, prev: ImaDaiConfiguration): void; /** @internal */ dispose(): void; } interface SocialSharingIntegration { /** @internal */ updateConfiguration(SocialConfiguration: SocialSharingConfiguration, prev: SocialSharingConfiguration): void; /** @internal */ dispose(): void; } interface PinningIntegration { /** * Activate or deactivate pinning mode based on the current state. */ togglePinning(): void; /** @internal */ updateConfiguration(pinningConfiguration: PinningConfiguration, prev: PinningConfiguration): void; /** @internal */ dispose(): void; } interface EndScreenIntegration { /** @internal */ updateConfiguration(endScreenConfiguration: EndScreenConfiguration, prev: EndScreenConfiguration): void; /** @internal */ dispose(): void; } interface ThumbnailsIntegration { /** @internal */ updateConfiguration(configuration: ThumbnailsConfiguration, prev: ThumbnailsConfiguration): void; /** @internal */ dispose(): void; } interface PlaylistUiIntegration { togglePlaylistSidebar(): void; /** @internal */ updateConfiguration(configuration: PlaylistUiConfiguration, prev: PlaylistUiConfiguration): void; /** @internal */ dispose(): void; } type ImaDaiIntegrationFactory = new (...args: Array) => ImaDaiIntegration; type SocialSharingIntegrationFactory = new (...args: Array) => SocialSharingIntegration; type PinningIntegrationFactory = new (...args: Array) => PinningIntegration; type ImaClientSideIntegrationFactory = new (...args: Array) => ImaClientSideIntegration; type EndScreenIntegrationFactory = new (...args: Array) => EndScreenIntegration; type ThumbnailsIntegrationFactory = new (...args: Array) => ThumbnailsIntegration; type PlaylistUiIntegrationFactory = new (...args: Array) => PlaylistUiIntegration; type SsaiIntegrationFactory = new (...args: Array) => SsaiIntegration; interface IntegrationsManager { imaDaiIntegration: ImaDaiIntegration; socialSharingIntegration: SocialSharingIntegration; pinningIntegration: PinningIntegration; imaClientSideIntegration: ImaClientSideIntegration; endScreenIntegration: EndScreenIntegration; thumbnailsIntegration: ThumbnailsIntegration; playlistUiIntegration: PlaylistUiIntegration; ssaiIntegration: SsaiIntegration; /** @internal */ updateConfiguration(configuration: IntegrationsConfiguration, prev: IntegrationsConfiguration): void; /** @internal */ dispose(): void; } interface IntegrationsManagerDependencies { imaDaiIntegration: ImaDaiIntegration; socialSharingIntegration: SocialSharingIntegration; pinningIntegration: PinningIntegration; imaClientSideIntegration: ImaClientSideIntegration; endScreenIntegration: EndScreenIntegration; thumbnailsIntegration: ThumbnailsIntegration; playlistUiIntegration: PlaylistUiIntegration; ssaiIntegration: SsaiIntegration; } declare class IntegrationsManagerImpl implements IntegrationsManager { private static imaDaiIntegrationFactory_; private static socialSharingIntegrationFactory_; private static pinningIntegrationFactory_; private static imaClientSideIntegrationFactory_; private static endScreenIntegrationFactory_; private static thumbnailsIntegrationFactory_; private static playlistUiIntegrationFactory_; private static ssaiIntegrationFactory_; /** * Get the currently registered ImaDaiIntegrationFactory */ static getImaDaiIntegrationFactory(): ImaDaiIntegrationFactory; /** * Register the ImaDaiIntegrationFactory. Calling this before initializing a player will enable the IMA DAI integration. */ static registerImaDaiIntegrationFactory(imaDaiIntegrationFactory: ImaDaiIntegrationFactory): void; /** * Deregister the ImaDaiIntegrationFactory. If the IMA DAI integration was previously registered for a player, calling this before initializing a new player will disable the IMA DAI integration for the new player. */ static deregisterImaDaiIntegrationFactory(): void; /** * Get the currently registered SocialSharingIntegrationFactory */ static getSocialSharingIntegrationFactory(): SocialSharingIntegrationFactory; /** * Register the SocialSharingIntegrationFactory. Calling this before initializing a player will enable the Social Sharing integration. */ static registerSocialSharingIntegrationFactory(socialSharingIntegrationFactory: SocialSharingIntegrationFactory): void; /** * Deregister the SocialSharingIntegrationFactory. If the Social Sharing integration was previously registered for a player, calling this before initializing a new player will disable the Social Sharing integration for the new player. */ static deregisterSocialSharingIntegrationFactory(): void; /** * Get the currently registered EndScreenIntegrationFactory */ static getEndScreenIntegrationFactory(): EndScreenIntegrationFactory; /** * Register the EndScreenIntegrationFactory. Calling this before initializing a player will enable the Endscreen integration. */ static registerEndScreenIntegrationFactory(endScreenIntegrationFactory: EndScreenIntegrationFactory): void; /** * Deregister the EndScreenIntegrationFactory. If the Endscreen integration was previously registered for a player, calling this before initializing a new player will disable the Endscreen integration for the new player. */ static deregisterEndScreenIntegrationFactory(): void; /** * Get the currently registered PinningIntegrationFactory */ static getPinningIntegrationFactory(): PinningIntegrationFactory; /** * Register the PinningIntegrationFactory. Calling this before initializing a player will enable the Pinning integration. */ static registerPinningIntegrationFactory(pinningIntegrationFactory: PinningIntegrationFactory): void; /** * Deregister the PinningIntegrationFactory. If the Pinning integration was previously registered for a player, calling this before initializing a new player will disable the Pinning integration for the new player. */ static deregisterPinningIntegrationFactory(): void; /** * Get the currently registered ImaClientSideIntegrationFactory */ static getImaClientSideIntegrationFactory(): ImaClientSideIntegrationFactory; /** * Register the ImaClientSideIntegrationFactory. Calling this before initializing a player will enable the IMA Client Side integration. */ static registerImaClientSideIntegrationFactory(imaClientSideIntegrationFactory: ImaClientSideIntegrationFactory): void; /** * Deregister the ImaClientSideIntegrationFactory. If the IMA Client Side integration was previously registered for a player, calling this before initializing a new player will disable the IMA Client Side integration for the new player. */ static deregisterImaClientSideIntegrationFactory(): void; /** * Get the currently registered ThumbnailsIntegrationFactory */ static getThumbnailsIntegrationFactory(): ThumbnailsIntegrationFactory; /** * Register the ThumbnailsIntegrationFactory. Calling this before initializing a player will enable the Thumbnails integration. */ static registerThumbnailsIntegrationFactory(thumbnailsIntegrationFactory: ThumbnailsIntegrationFactory): void; /** * Deregister the ThumbnailsIntegrationFactory. If the Thumbnails integration was previously registered for a player, calling this before initializing a new player will disable the Thumbnails integration for the new player. */ static deregisterThumbnailsIntegrationFactory(): void; /** * Get the currently registered PlaylistUiIntegrationFactory */ static getPlaylistUiIntegrationFactory(): PlaylistUiIntegrationFactory; /** * Register the PlaylistUiIntegrationFactory. Calling this before initializing a player will enable the Playlist UI integration. */ static registerPlaylistUiIntegrationFactory(playlistUiIntegrationFactory: PlaylistUiIntegrationFactory): void; /** * Deregister the PlaylistUiIntegrationFactory. If the Playlist UI integration was previously registered for a player, calling this before initializing a new player will disable the Playlist UI integration for the new player. */ static deregisterPlaylistUiIntegrationFactory(): void; static getSsaiIntegrationFactory(): SsaiIntegrationFactory; static registerSsaiIntegrationFactory(ssaiIntegrationFactory: SsaiIntegrationFactory): void; static deregisterSsaiIntegrationFactory(): void; readonly imaDaiIntegration: ImaDaiIntegration; readonly socialSharingIntegration: SocialSharingIntegration; readonly pinningIntegration: PinningIntegration; readonly imaClientSideIntegration: ImaClientSideIntegration; readonly endScreenIntegration: EndScreenIntegration; readonly thumbnailsIntegration: ThumbnailsIntegration; readonly playlistUiIntegration: PlaylistUiIntegration; readonly ssaiIntegration: SsaiIntegration; /** @internal */ constructor(dependencies: IntegrationsManagerDependencies); /** @internal */ updateConfiguration(configuration: IntegrationsConfiguration, prev: IntegrationsConfiguration): void; /** @internal */ dispose(): void; } declare class ConfigurationManager extends Store { constructor(); } interface VideoCuePointDto { id?: string; /** cue point name */ name?: string; /** cue point type */ type?: string; /** time of the cue point in seconds; example: 10.527 */ time?: number; /** optional metadata string (128 single-byte characters maximum) */ metadata?: string; /** * whether video is force-stopped at the cue point * @default false * @example true */ 'force-stop'?: boolean; } declare class BrightcoveVideoCuePoint { readonly id: string; readonly name: string; readonly type: 'code' | 'ad'; readonly startTime: number; readonly endTime: number; readonly metadata: string; readonly forceStop: boolean; constructor(cuePointDto: VideoCuePointDto, startTime: number, endTime: number); toString(): string; } interface KeySystemDto { license_url?: string; license_urls?: Record; certificate_url?: string; key_request_url?: string; key_request_urls?: Record; } interface VideoSourceDto { /** average bitrate */ avg_bitrate?: number; /** frame width in pixels */ width?: number; /** frame height in pixels */ height?: number; /** size in bytes */ size?: number; /** duration in milliseconds */ duration?: number; /** the asset id for the source */ asset_id?: string; /** the stream name for the source */ stream_name?: string; /** the video codec */ codecs?: string; codec?: string; profiles?: string; src?: string; ext_x_version?: string; /** the video container */ container?: string; /** the address for rtmp streams */ app_name?: string; /** the type (for HLS streams) */ type?: string; /** url to the vmap file that describes ads on the source */ vmap?: string; key_systems?: Record; encryption?: Record; } interface MapToSourceOptions { watermarkingToken?: string | null; authToken?: string | null; } declare class BrightcoveKeySystem { readonly certificateUrl: string; readonly keyRequestUrl: string; readonly keyRequestUrls?: Record; readonly licenseUrl: string; readonly licenseUrls?: Record; constructor(keySystemDto: KeySystemDto); mapToSourceKeySystem(keySystem: string): KeySystemConfig; } declare class BrightcoveVideoSource { private readonly dto_; private src_; readonly codecs: string; readonly codec: string; readonly profiles: string; readonly type: string; readonly container: string; readonly encryption: Record; readonly extXVersion: number | null; readonly keySystems: Record; readonly isDrmEncrypted: boolean; readonly vmap: string; private readonly parsedUrl_; constructor(videoSourceDto: VideoSourceDto); private mapKeySystems_; get sourceUrl(): string; get isHttps(): boolean; get isHttp(): boolean; get hasValidSource(): boolean; get isHls(): boolean; get isDash(): boolean; get isHss(): boolean; get isMp4(): boolean; get mimeType(): string; get hasCodecInfo(): boolean; get hasH265(): boolean; get hasH264(): boolean; get isAes128Encryption(): boolean; get isBrightcoveHlsEncrypted(): boolean; get hasKeySystems(): boolean; get hasFairplay(): boolean; get hasLegacyFairplay(): boolean; get hasWidevine(): boolean; get hasPlayReady(): boolean; copy(): BrightcoveVideoSource; mapToSource(options: MapToSourceOptions): Source; private isCodec_; private getSourceKeySystems_; } interface VideoTextTrackDto { id?: string; /** URL for the .vtt file */ src?: string; /** array of sources for .vtt files (note that in many cases there will be one source with a src value identical to the text_tracks.src value, but this array is included in case there are multiple protocols available, such as http and https) */ sources?: Array<{ src?: string; }>; /** kind of text track */ kind?: string; /** 2-letter language code, such as "en" or "ko" */ srclang?: string; /** mime_type for the track */ mime_type?: string; /** label for the track */ label?: string; /** whether this is the default track */ default?: boolean; /** If this field is present, it means that references for this text track are available in the associated video's manifest */ in_band_metadata_track_dispatch_type?: string; } declare const KeySystem: { readonly Widevine: "com.widevine.alpha"; readonly Playready: "com.microsoft.playready"; readonly Fairplay: "com.apple.fps"; readonly FairplayLegacy: "com.apple.fps.1_0"; }; declare const StreamingProtocol: { readonly Hls: "hls"; readonly Dash: "dash"; readonly Hss: "hss"; }; declare const Container: { readonly Mp4: "mp4"; readonly WebM: "webm"; readonly Mpeg2Ts: "mpeg2ts"; readonly Ogg: "ogg"; }; declare const AudioCodecs: { readonly Aac: "aac"; readonly Ac3: "ac3"; readonly Ec3: "ec3"; readonly Opus: "opus"; readonly Vorbis: "vorbis"; readonly Flac: "flac"; }; declare const VideoCodecs: { readonly H265: "h265"; readonly H264: "h264"; readonly Theora: "theora"; readonly Vp8: "vp8"; readonly Vp9: "vp9"; }; interface KeySystemCapabilities { persistent: boolean; basic: boolean; } interface EmeCapabilities { [KeySystem.Widevine]: KeySystemCapabilities; [KeySystem.Playready]: KeySystemCapabilities; [KeySystem.Fairplay]: KeySystemCapabilities; [KeySystem.FairplayLegacy]: KeySystemCapabilities; } interface StreamingProtocolCapabilities { mse: boolean; native: boolean; } interface StreamingCapabilities { [StreamingProtocol.Hls]: StreamingProtocolCapabilities; [StreamingProtocol.Dash]: StreamingProtocolCapabilities; [StreamingProtocol.Hss]: StreamingProtocolCapabilities; } interface CodecCapabilities { mse: boolean; native: boolean; transmuxer: boolean; } interface Mp4VideoCodecsCapabilities { [VideoCodecs.H264]: CodecCapabilities; [VideoCodecs.H265]: CodecCapabilities; [VideoCodecs.Vp9]: CodecCapabilities; } interface Mp4AudioCodecsCapabilities { [AudioCodecs.Aac]: CodecCapabilities; [AudioCodecs.Ac3]: CodecCapabilities; [AudioCodecs.Ec3]: CodecCapabilities; [AudioCodecs.Opus]: CodecCapabilities; [AudioCodecs.Flac]: CodecCapabilities; } interface OggVideoCodecsCapabilities { [VideoCodecs.Theora]: CodecCapabilities; [VideoCodecs.Vp8]: CodecCapabilities; [VideoCodecs.Vp9]: CodecCapabilities; } interface OggAudioCodecsCapabilities { [AudioCodecs.Flac]: CodecCapabilities; [AudioCodecs.Opus]: CodecCapabilities; [AudioCodecs.Vorbis]: CodecCapabilities; } interface WebMVideoCodecsCapabilities { [VideoCodecs.Vp8]: CodecCapabilities; [VideoCodecs.Vp9]: CodecCapabilities; } interface WebMAudioCodecsCapabilities { [AudioCodecs.Vorbis]: CodecCapabilities; [AudioCodecs.Opus]: CodecCapabilities; } interface Mpeg2tsVideoCodecsCapabilities { [VideoCodecs.H264]: CodecCapabilities; [VideoCodecs.H265]: CodecCapabilities; } interface Mpeg2tsAudioCodecsCapabilities { [AudioCodecs.Aac]: CodecCapabilities; [AudioCodecs.Ac3]: CodecCapabilities; [AudioCodecs.Ec3]: CodecCapabilities; } interface ContainerCapabilities { video: V; audio: A; } interface MediaCapabilities { [Container.Mp4]: ContainerCapabilities; [Container.Ogg]: ContainerCapabilities; [Container.WebM]: ContainerCapabilities; [Container.Mpeg2Ts]: ContainerCapabilities; } interface CapabilitiesProbeResult { isSecureContext: boolean; isHttps: boolean; eme: EmeCapabilities; streaming: StreamingCapabilities; media: MediaCapabilities; } interface EnvCapabilitiesProvider { probe(): Promise; } declare class BrightcoveVideoTextTrack { readonly id: string; readonly kind: string; readonly label: string; readonly mimeType: string; readonly src: string; readonly sources: Array; readonly default: boolean; readonly language: string; constructor(textTrackDto: VideoTextTrackDto); getSource(capabilities: CapabilitiesProbeResult): string; } interface VideoLinkDto { /** text for the link */ text?: string; /** URL for the link */ url?: string; } interface VideoVariantDto { /** * The language for this variant in the language-country code format (examples: en-US, es-ES) * @example "es-ES" */ language?: string; /** The title of the video in this language */ name?: string; /** The video short description in this language */ description?: string; /** The video long description in this language */ long_description?: string; /** map of `fieldname: value` pairs, where values are for this language; values have a maximum length of 1024 single-byte characters. Note: be sure to use the **internal** name for the field, not the display name */ custom_fields?: object; } interface VideoTranscriptionDto { /** System id for the text track */ id?: string; /** label for the track */ label?: string; /** mime-type for the track - should be `text/plain` */ mime_type?: string; /** URL for the transcription file */ src?: string; /** 2-letter language code, such as "en" or "ko" */ lang?: string; } interface VideoDto { /** video id */ id?: string; /** video title */ name?: string; /** when the video was created */ created_at?: string; /** map of fieldname-value pairs */ custom_fields?: Record; /** array of cue point maps */ cue_points?: Array; /** video short description */ description?: string; /** video duration in milliseconds */ duration?: number; /** * whether video is AD_SUPPORTED * @default "AD_SUPPORTED" * @example "AD_SUPPORTED" */ economics?: 'AD_SUPPORTED' | 'FREE'; /** * Array of [labels](/cms/managing-videos/working-with-labels.html) for the video * @default [] * @example ["/nature/wildlife/avian/coastal_birds","/nature/wildlife/avian/coastal_birds/sandpipers","/nature/wildlife/avian/forest_birds"] */ labels?: Array; /** Associates specified EPA playback rights with video. */ playback_rights_id?: string; poster?: string; published_at?: string; thumbnail?: string; poster_sources?: Array<{ src?: string; }>; thumbnail_sources?: Array<{ src?: string; }>; /** The mapping projection for 360° videos, e.g. "equirectangular" */ projection?: string; /** map of scheduling properties */ link?: VideoLinkDto; /** video long description */ long_description?: string; /** whether video is enabled for offline viewing */ offline_enabled?: boolean; /** video reference-id (must be unique within the account) */ reference_id?: string; /** array of tags */ tags?: Array; /** array of video sources (renditions) */ sources?: Array; /** array of text track maps */ text_tracks?: Array; /** array of transcription objects - can only be added on update, not creation */ transcripts?: Array; /** when the video was last modified */ updated_at?: string; /** array of variant objects containing multi-lingual metadata */ variants?: Array; /** map of key/value pairs for ad requests */ ad_keys?: object; } interface BrightcoveVideoSourceOptions { capabilities: CapabilitiesProbeResult; transformOptions: MapToSourceOptions; drmConfiguration?: DrmConfiguration; } declare class BrightcoveVideoModel { readonly poster: string; readonly thumbnail: string; readonly posterSources: Array; readonly thumbnailSources: Array; readonly sources: Array; readonly textTracks: Array; readonly offlineEnabled: boolean; readonly id: string; readonly name: string; readonly referenceId: string; readonly createdAt: Date | null; readonly publishedAt: Date | null; readonly updatedAt: Date | null; readonly customFields: Record; readonly cuePoints: Array; readonly description: string; readonly duration: number; readonly economics: 'AD_SUPPORTED' | 'FREE'; readonly labels: Array; readonly playbackRightsId: string; readonly projection: string; readonly tags: Array; private readonly dto_; constructor(videoDto: VideoDto); private mapCuePoints_; getSources(options: BrightcoveVideoSourceOptions): Array; transformSources(sources: Array, options: BrightcoveVideoSourceOptions): Array; sortSources(sources: Array): Array; filterUnsupported(options: BrightcoveVideoSourceOptions): Array; get mediaInfo(): MediaInfo; } interface PlaylistShuffleOptions { rest?: boolean; } interface Playlist { updateConfiguration(configuration: PlaylistConfiguration): void; reset(): void; add(items: Array, index?: number): Array; remove(index: number, count: number): Array; getLastIndex(): number; getPreviousIndex(): number; getCurrentIndex(): number; getNextIndex(): number; moveTo(index: number): boolean; moveToNext(): boolean; moveToPrevious(): boolean; moveToFirst(): boolean; moveToLast(): boolean; getItems(): Array; getCurrentItem(): T | null; sort(compare: (a: T, b: T) => number): void; reverse(): void; shuffle(options?: PlaylistShuffleOptions): void; } type AutoAdvanceHandler = (item: Source | BrightcoveVideoModel) => void; interface PlaylistManager { createPlaylistFromRemoteSources(sources: Array): Playlist; createPlaylistFromBrightcoveVideoModels(models: Array): Playlist; setPlaylist(playlist: Playlist): void; getCurrentPlaylist(): Playlist | null; setAutoAdvanceHandler(handler: AutoAdvanceHandler): void; dispose(): void; updateConfiguration(config: PlaylistConfiguration, prev: PlaylistConfiguration): void; } declare enum LoggerLevel { Off = "off", Error = "error", Warn = "warn", Info = "info", Verbose = "verbose" } interface PlaylistDto { /** Video Cloud account id */ account_id?: string; /** date/time created */ created_at?: string; /** playlist description */ description?: string; /** the playlist id */ id?: string; /** the playlist name */ name?: string; /** the playlist reference id */ reference_id?: string; /** the playlist type: EXPLICIT or smart playlist type */ type?: string; /** date/time last modified */ updated_at?: string; /** array of video ids (EXPLICIT playlists only) */ video_ids?: Array; /** search string to retrieve the videos (smart playlists only) */ search?: string; /** array of video maps */ videos?: Array; } declare class BrightcovePlaylistModel { readonly id: string; readonly name: string; readonly referenceId: string; readonly type: string; readonly search: string; readonly description: string; readonly updatedAt: Date | null; readonly createdAt: Date | null; readonly videos: Array; constructor(playlistDto: PlaylistDto); } interface BrightcoveServiceResponseData { abort: () => void; promise: Promise; } type PlaybackApiSort = 'name' | 'reference_id' | 'created_at' | 'published_at' | 'updated_at' | 'schedule_starts_at' | 'schedule_ends_at' | 'state' | 'plays_total' | 'plays_trailing_week' | '-name' | '-reference_id' | '-created_at' | '-published_at' | '-updated_at' | '-schedule_starts_at' | '-schedule_ends_at' | '-state' | '-plays_total' | '-plays_trailing_week'; interface PlaybackApiVideoPayload { videoId: string; } interface PlaybackApiListPayload { limit?: number; offset?: number; } interface PlaybackApiRelatedVideosPayload extends PlaybackApiVideoPayload, PlaybackApiListPayload { } interface PlaybackApiSearchVideosPayload extends PlaybackApiListPayload { q: string; sort?: PlaybackApiSort; } interface PlaybackApiPlaylistPayload extends PlaybackApiListPayload { playlistId: string; } type HeartbeatErrorHandler = (error: PlayerError) => void; interface PlaybackQuality { readonly droppedVideoFrames: number; readonly totalVideoFrames: number; readonly creationTime: number; } interface PlaybackIntegration { updateConfiguration(configuration: PlayerConfiguration, prev: PlayerConfiguration): void; attach(root: HTMLDivElement): void; getVideoElement(): HTMLVideoElement | null; detach(): void; play(): void; pause(): void; getPlaybackRate(): number; setPlaybackRate(rate: number): void; mute(): void; unmute(): void; getIsMuted(): boolean; stop(reason?: string | PlayerError): void; getBufferedRanges(): Array; getBufferedPercent(): number; getQualityLevels(): Array; selectQualityLevel(level: QualityLevel): void; selectAutoQualityLevel(): void; getAudioTracks(): Array; selectAudioTrack(audioTrack: AudioTrack): void; getTextTracks(): Array; addTextTrack(options: TextTrackOptions): TextTrack | null; removeTextTrack(textTrack: TextTrack): void; getId3MetadataTrack(): TextTrack | null; getMediaCuePointsTrack(): TextTrack | null; getCurrentSource(): Source | null; getThumbnailTracks(): Array; selectThumbnailTrack(track: ThumbnailTrack): void; addThumbnailTrack(options: ThumbnailTrackOptions): void; removeThumbnailTrack(track: ThumbnailTrack): void; getIsInPictureInPicture(): boolean; getIsPictureInPictureAvailable(): boolean; enablePictureInPicture(): void; disablePictureInPicture(): void; enterPictureInPicture(): void; exitPictureInPicture(): void; getSeekableRanges(): Array; getPlayedRanges(): Array; seek(seekTarget: number): void; getCurrentTime(): number; getVolumeLevel(): number; setVolumeLevel(level: number): void; dispose(): void; load(sources: Array): void; getPlaybackState(): PlayerState$1; getDuration(): number; getIsEnded(): boolean; getVideoPlaybackQuality(): PlaybackQuality | null; } interface BrightcoveIntegration { updateAccountId(accountId: string): void; setHeartbeatErrorHandler(handler: HeartbeatErrorHandler): void; updateConfiguration(configuration: BrightcoveConfiguration, prev: BrightcoveConfiguration): void; getVideoById(payload: PlaybackApiVideoPayload): BrightcoveServiceResponseData; getPlaylistById(payload: PlaybackApiPlaylistPayload): BrightcoveServiceResponseData; getVideosBySearch(payload: PlaybackApiSearchVideosPayload): BrightcoveServiceResponseData>; getRelatedVideosById(payload: PlaybackApiRelatedVideosPayload): BrightcoveServiceResponseData>; dispose(): void; startGSCSession(): void; stopGSCSession(): void; getHasPendingSession(): boolean; } interface Logger { getLoggerLevel(): LoggerLevel; setLoggerLevel(level: LoggerLevel): void; debug(...args: Array): void; } declare enum RequestType { Segment = "segment", SegmentKey = "segment-key", SegmentMediaInitialization = "segment-media-initialization", HlsPlaylist = "hls-playlist", DashManifest = "dash-manifest", DashClockSync = "dash-clock-sync", DashSidx = "dash-sidx", ContentSteeringManifest = "content-steering-manifest", License = "license", BrightcoveService = "brightcove-service" } type NetworkResponseType = '' | 'arraybuffer' | 'blob' | 'document' | 'json' | 'text'; interface NetworkRequest { headers: Record; uri: string; metadata: Record; body?: unknown; } interface NetworkResponse { headers: Record; responseUrl: string; body?: unknown; responseType?: NetworkResponseType; } type Interceptor = (payload: T) => T; type RequestInterceptor = Interceptor; type ResponseInterceptor = Interceptor; interface NetworkingManager { addRequestInterceptor(type: RequestType, requestInterceptor: RequestInterceptor): boolean; removeRequestInterceptor(type: RequestType, requestInterceptor: RequestInterceptor): boolean; clearRequestInterceptorsByType(type: RequestType): boolean; clearAllRequestInterceptors(): boolean; addResponseInterceptor(type: RequestType, responseInterceptor: ResponseInterceptor): boolean; removeResponseInterceptor(type: RequestType, responseInterceptor: ResponseInterceptor): boolean; clearResponseInterceptorsByType(type: RequestType): boolean; clearAllResponseInterceptors(): boolean; clearAllInterceptors(): boolean; updateConfiguration(configuration: PlayerNetworkConfiguration, prev: PlayerNetworkConfiguration): void; dispose(): void; } interface PlayerDependencies { integrationsManager: IntegrationsManager; playlistManager: PlaylistManager; networkingManager: NetworkingManager; playbackIntegration: PlaybackIntegration; brightcoveIntegration: BrightcoveIntegration; configurationManager: ConfigurationManager; eventEmitter: EventEmitter; stateProvider: StateProvider; envCapabilitiesProvider: EnvCapabilitiesProvider; logger: Logger; version: string; versionHash: string; } declare class Player { static LoggerLevel: typeof LoggerLevel; static RequestType: typeof RequestType; static Event: { readonly PlayerStateChanged: "playerStateChanged"; readonly PlayerMutedStatusChanged: "playerMutedStatusChanged"; readonly PlayerVolumeChanged: "playerVolumeChanged"; readonly PlayerTimeChanged: "playerTimeChanged"; readonly PlayerDurationChanged: "playerDurationChanged"; readonly PlayerRateChanged: "playerRateChanged"; readonly PlayerEnded: "playerEnded"; readonly PlayerError: "playerError"; readonly PlayerVideoElementChanged: "playerVideoElementChanged"; readonly PlayerPlay: "playerPlay"; readonly PlayerPlaying: "playerPlaying"; readonly PlayerPause: "playerPause"; readonly PlayerWaiting: "playerWaiting"; readonly PlayerDisposed: "playerDisposed"; readonly PlayerLoadedMetadata: "playerLoadedMetadata"; readonly PlayerLoadedData: "playerLoadedData"; readonly PlayerLoadStart: "playerLoadStart"; readonly PlayerCanPlay: "playerCanPlay"; readonly PlayerCanPlayThrough: "playerCanplayThrough"; readonly PlayerProgress: "playerProgress"; readonly PlayerSeeking: "playerSeeking"; readonly PlayerSeeked: "playerSeeked"; readonly PlayerAbort: "playerAbort"; readonly PlayerEmptied: "playerEmptied"; readonly PlayerStalled: "playerStalled"; readonly PlayerSuspend: "playerSuspend"; readonly PlayerResize: "playerResize"; readonly PlayerTextTracksChanged: "playerTextTracksChanged"; readonly PlayerThumbnailTracksChanged: "playerThumbnailTracksChanged"; readonly PlayerAudioTracksChanged: "playerAudioTracksChanged"; readonly PlayerQualityLevelsChanged: "playerQualityLevelsChanged"; readonly PlayerEnablePictureInPicture: "playerEnablePictureInPicture"; readonly PlayerDisablePictureInPicture: "playerDisablePictureInPictureChanged"; readonly PlayerEnterPictureInPicture: "playerEnterPictureInPicture"; readonly PlayerExitPictureInPicture: "playerExitPictureInPicture"; readonly ManifestRequestStart: "manifestrequeststart"; readonly ManifestRequestComplete: "manifestrequestcomplete"; readonly ManifestParseStart: "manifestparsestart"; readonly ManifestParseComplete: "manifestparsecomplete"; readonly PlaylistRequestStart: "playlistrequeststart"; readonly PlaylistRequestComplete: "playlistrequestcomplete"; readonly PlaylistParseStart: "playlistparsestart"; readonly PlaylistParseComplete: "playlistparsecomplete"; readonly SegmentSelected: "segmentselected"; readonly SegmentLoadStart: "segmentloadstart"; readonly SegmentLoaded: "segmentloaded"; readonly SegmentKeyLoadStart: "segmentkeyloadstart"; readonly SegmentKeyLoadComplete: "segmentkeyloadcomplete"; readonly SegmentDecryptionStart: "segmentdecryptionstart"; readonly SegmentDecryptionComplete: "segmentdecryptioncomplete"; readonly SegmentTransmuxingStart: "segmenttransmuxingstart"; readonly SegmentTransmuxingComplete: "segmenttransmuxingcomplete"; readonly SegmentTransmuxingTrackInfoAvailable: "segmenttransmuxingtrackinfoavailable"; readonly SegmentTransmuxingTimingInfoAvailable: "segmenttransmuxingtiminginfoavailable"; readonly SegmentAppendStart: "segmentappendstart"; readonly SegmentAppendComplete: "segmentappendcomplete"; readonly RenditionDisabled: "renditiondisabled"; readonly RenditionEnabled: "renditionenabled"; readonly RenditionSelected: "renditionselected"; readonly GapJumped: "gapjumped"; readonly BandwidthUpdate: "bandwidthupdate"; readonly TimelineChange: "timelinechange"; readonly CodecsChange: "codecschange"; readonly SeekableRangesChanged: "seekablerangeschanged"; readonly BufferedRangesChanged: "bufferedrangeschanged"; readonly PlayedRangesChanged: "playedrangeschanged"; readonly ContentSteeringLoadStart: "contentSteeringloadstart"; readonly ContentSteeringLoadComplete: "contentsteeringloadcomplete"; readonly ContentSteeringParsed: "contentsteeringparsed"; readonly EMEKeySystemAccessCompleted: "emeKeySystemAccessCompleted"; readonly EMEKeySessionCreated: "emeKeySessionCreated"; readonly EMEKeySessionUpdated: "emeKeySessionUpdated"; readonly EMEKeySessionClosed: "emeKeySessionClosed"; readonly EMEKeySessionRemoved: "emeKeySessionRemoved"; readonly EMEKeyStatusesChanged: "emeKeyStatusesChanged"; /** * Update the Brightcove Account ID associated with the current player */ readonly EMEKeyMessage: "emeKeyMessage"; readonly EMELicenseRequestAttempted: "emeLicenseRequestAttempted"; readonly Ads: { readonly ContentChanged: "contentchanged"; readonly ContentUpdate: "contentUpdate"; readonly ContentResumed: "contentresumed"; readonly Ready: "adsready"; readonly Cancelled: "adscancelled"; readonly ReadyForPreroll: "adsReadyForPreroll"; readonly ReadyForPostroll: "adsReadyForPostroll"; readonly NoPreroll: "adsNoPreroll"; readonly NoPostroll: "adsNoPostroll"; readonly AdStart: "adStart"; readonly AdEnd: "adEnd"; readonly AdSkip: "adskip"; readonly AdTimeout: "adTimeout"; }; readonly Integrations: { readonly ImaDai: { readonly ImaDaiSdkLoaded: "imaDaiSdkLoaded"; }; readonly Pinning: { readonly BeforePinningEnabled: "beforepinenabled"; readonly PinningEnabled: "pinenabled"; readonly BeforePinningDisabled: "beforepindisabled"; readonly PinningDisabled: "pindisabled"; readonly BeforePin: "beforepin"; readonly Pin: "pin"; readonly BeforeUnpin: "beforeunpin"; readonly Unpin: "unpin"; readonly BeforePinClose: "beforepinclose"; readonly PinClose: "pinclose"; }; readonly ImaClientSide: { readonly ImaClientSideAdClick: "imaClientSideAdClick"; readonly ImaClientSideAdStarted: "imaClientSideAdStarted"; readonly ImaClientSideAdComplete: "imaClientSideAdComplete"; readonly ImaClientSideFirstQuartile: "imaClientSideFirstQuartile"; readonly ImaClientSideMidPoint: "imaClientSideMidPoint"; readonly ImaClientSideThirdQuartile: "imaClientSideThirdQuartile"; readonly ImaClientSideVolumeChanged: "imaClientSideVolumeChanged"; readonly ImaClientSidePaused: "imaClientSidePaused"; readonly ImaClientSideResumed: "imaClientSideResumed"; readonly ImaClientSideSkipped: "imaClientSideSkipped"; readonly ImaClientSideAllAdsCompleted: "imaClientSideAllAdsCompleted"; readonly ImaClientSideAdError: "imaClientSideAdError"; readonly ImaClientSideSdkLoaded: "imaClientSideSdkLoaded"; readonly ImaClientSideAdsRequest: "imaClientSideAdsRequest"; readonly ImaClientSideAdsPodEnded: "imaClientSideAdsPodEnded"; readonly ImaClientSideAdsPodStarted: "imaClientSideAdsPodStarted"; readonly ImaClientSideAdsLoad: "imaClientSideAdsLoad"; }; readonly Ssai: { readonly ClickThrough: "ssaiClickThrough"; }; }; readonly SpatialNavigation: { readonly FocusableComponentsChanged: "focusableComponentsChanged"; readonly EndOfFocusableComponents: "endOfFocusableComponents"; }; }; private readonly configurationManager_; private readonly eventEmitter_; private readonly stateProvider_; private readonly playlistManager_; private readonly integrationsManager_; private readonly networkingManager_; private readonly playbackIntegration_; private readonly brightcoveIntegration_; private readonly envCapabilitiesProvider_; private readonly logger_; private readonly version_; private readonly versionHash_; private currentSourceLicenseRequestInterceptor_; private startSessionHandler_; private stopSessionHandler_; constructor(dependencies: PlayerDependencies); private readonly playlistAutoAdvanceHandler_; private readonly heartbeatErrorHandler_; /** * Update the Brightcove Account ID associated with the current player */ updateAccountId(accountId: string): void; /** * Get the SDK version */ getVersion(): string; /** * Get the SDK version hash */ getVersionHash(): string; /** * Get the Integrations Manager instance */ getIntegrationsManager(): IntegrationsManager; /** * Get the player configuration object */ getConfiguration(): PlayerConfiguration; /** * Update the player's configuration */ updateConfiguration(chunk: DeepPartial): PlayerConfiguration; /** * Get the Playlist Manager instance */ getPlaylistManager(): Omit; /** * Reset the player configuration to its default state */ resetConfiguration(): void; protected forwardUpdateConfiguration_(newConfiguration: PlayerConfiguration, previousConfiguration: PlayerConfiguration): void; /** * Get the current logger level */ getLoggerLevel(): LoggerLevel; /** * Set the current logger level */ setLoggerLevel(level: LoggerLevel): void; /** * Add a player event listener */ addEventListener(event: K, callback: EventHandler): void; /** * Add a player event listener that will execute a handler on only one occurence of the event */ once(event: K, callback: EventHandler): void; /** * Remove a specific event listener */ removeEventListener(event: K, callback: EventHandler): void; /** * Remove all event listeners for a specific event */ removeAllEventListenersForType(event: K): void; /** * Remove all event listeners for all events */ removeAllEventListeners(): void; /** * Attach the player to a root `

` element on the page */ attach(root: HTMLDivElement): void; getVideoElement(): HTMLVideoElement | null; /** * Disable all player behavior and remove it from the page */ detach(): void; /** * Initiate playback of a video */ play(): void; /** * Pause a video */ pause(): void; /** * Get the current playback rate of the video */ getPlaybackRate(): number; /** * Set the current playback rate of the video */ setPlaybackRate(rate: number): void; /** * Mute the current video */ mute(): void; /** * Unmute the current video */ unmute(): void; /** * Get whether the current video is muted */ getIsMuted(): boolean; /** * Get an array of time ranges representing the parts of the media that are already downloaded and available for playback. */ getBufferedRanges(): Array; /** * Get an array of time ranges representing points in the media timeline that have been played. */ getPlayedRanges(): Array; /** * Get available media playback quality metrics as specified by the W3C's Media Playback Quality API. */ getVideoPlaybackQuality(): PlaybackQuality | null; /** * Get the percentage of the current video that is currently buffered. */ getBufferedPercent(): number; /** * Get an array of currently available audio tracks */ getAudioTracks(): Array; /** * Enable a specific audio track */ selectAudioTrack(audioTrack: AudioTrack): void; /** * Enable a specific thumbnail preview track */ selectThumbnailTrack(selectedTrack: ThumbnailTrack): void; /** * Get an array of available thumbnail preview tracks */ getThumbnailTracks(): Array; /** * Add a new thumbnail preview track */ addThumbnailTrack(options: ThumbnailTrackOptions): void; /** * Remove a specific thumbnail preview track */ removeThumbnailTrack(track: ThumbnailTrack): void; /** * Get an array of currently available quality levels */ getQualityLevels(): Array; /** * Enable a specific quality level and disable adaptive bitrate switching to all other quality levels */ selectQualityLevel(level: QualityLevel): void; /** * Enable adaptive bitrate switching to all quality levels */ selectAutoQualityLevel(): void; /** * Get an array of all available text tracks */ getTextTracks(): Array; /** * Get text track containing in-band ID3 metadata */ getId3MetadataTrack(): TextTrack | null; /** * Get text track containing cuepoint metadata */ getCuePointsMetadataTrack(): TextTrack | null; /** * Get the current source. */ getCurrentSource(): Source | null; /** * Add a text track */ addTextTrack(textTrackOptions: TextTrackOptions): TextTrack | null; /** * Remove a text track */ removeTextTrack(textTrack: TextTrack): void; /** * Get whether the player is currently in picture-in-picture mode */ getIsInPictureInPicture(): boolean; /** * Get whether picture-in-picture mode is available */ getIsPictureInPictureAvailable(): boolean; /** * Enable picture-in-picture mode */ enablePictureInPicture(): void; /** * Disable picture-in-picture mode */ disablePictureInPicture(): void; /** * Enter picture-in-picture mode */ enterPictureInPicture(): void; /** * Exit picture-in-picture mode */ exitPictureInPicture(): void; /** * Get an array of time ranges representing parts of the media that are currently seekable */ getSeekableRanges(): Array; /** * Seek to a specific time in a video */ seek(seekTarget: number): void; /** * Get the current time of a video in seconds */ getCurrentTime(): number; /** * Get the current volume level between 0 and 1 */ getVolumeLevel(): number; /** * Set the current volume level to a number between 0 and 1 */ setVolumeLevel(level: number): void; /** * Get the duration of the currently loaded video in seconds */ getDuration(): number; /** * Get whether the current video has ended */ getIsEnded(): boolean; /** * Get the current playback state of the player */ getCurrentPlaybackState(): PlayerState$1; /** * Get the NetworkingManager instance */ getNetworkingManager(): Omit; /** * Dispose the player and remove it from the DOM */ dispose(): void; /** * Load a remote video source */ loadRemoteVideo(source: Source): void; /** * Load a video source from a Brightcove video model returned by the Playback API */ loadBrightcoveVideoModel(model: BrightcoveVideoModel): void; protected handleVideoModel_(model: BrightcoveVideoModel, sources: Array, capabilities: CapabilitiesProbeResult): void; /** * Unload the current source without disposing the player */ stop(reason?: string | PlayerError): void; /** * Fetch a specific video model from the Playback API by ID */ getVideoByIdFromPlaybackApi(payload: PlaybackApiVideoPayload): BrightcoveServiceResponseData; /** * Fetch a list of related video models from the Playback API by ID */ getRelatedVideosByVideoIdFromPlaybackApi(payload: PlaybackApiRelatedVideosPayload): BrightcoveServiceResponseData>; /** * Fetch a list of video models from the Playback API by search params * See {@link https://apis.support.brightcove.com/cms/searching/cmsplayback-api-videos-search.html | Playback API Search Syntax} */ getVideosBySearchFromPlaybackApi(payload: PlaybackApiSearchVideosPayload): BrightcoveServiceResponseData>; /** * Fetch a specific video playlist model from the Playback API by ID */ getPlaylistByIdFromPlaybackApi(payload: PlaybackApiPlaylistPayload): BrightcoveServiceResponseData; /** * Get information about the technical capabilities of the current environment */ probeEnvCapabilities(): Promise; } interface PlayerWithUiDependencies extends PlayerDependencies { uiManager: UiManager; spatialNavigationManager: SpatialNavigationManager; uiComponentsStorage: UiComponentsStorage; } declare class PlayerWithUi extends Player { private readonly uiManager_; private readonly spatialNavigationManager_; private readonly uiComponentsStorage_; constructor(deps: PlayerWithUiDependencies); /** * Get the active UiManager instance */ getUiManager(): Omit; /** * Get the active SpationalNavigationManager instance */ getSpatialNavigationManager(): Omit; protected forwardUpdateConfiguration_(newConfiguration: PlayerConfiguration, previousConfiguration: PlayerConfiguration): void; protected handleVideoModel_(model: BrightcoveVideoModel, sources: Array, capabilities: CapabilitiesProbeResult): void; /** * Dispose the player and all UI */ dispose(): void; } /** * @module ui */ type BaseUiComponent = new (dependencies: BaseComponentDependencies) => UiComponent; type BaseClickableUiComponent = new (dependencies: ClickableComponentDependencies) => IClickableComponent; type BaseButtonUiComponent = new (dependencies: ClickableComponentDependencies) => IClickableComponent; type BigPlayButtonUiComponent = new (dependencies: ClickableComponentDependencies) => IClickableComponent; type CloseButtonUiComponent = new (dependencies: ClickableComponentDependencies) => IClickableComponent; type FullscreenToggleUiComponent = new (dependencies: ClickableComponentDependencies) => IClickableComponent; type PictureInPictureToggleUiComponent = new (dependencies: ClickableComponentDependencies) => IClickableComponent; type MuteToggleUiComponent = new (dependencies: ClickableComponentDependencies) => IClickableComponent; type PlayToggleUiComponent = new (dependencies: PlayToggleComponentDependencies) => IClickableComponent; type SeekToLiveUiComponent = new (dependencies: ClickableComponentDependencies) => IClickableComponent; type MenuItemUiComponent = new (dependencies: MenuItemComponentDependencies) => IMenuItemComponent; type PosterImageUiComponent = new (dependencies: ClickableComponentDependencies) => IPosterImageComponent; type SkipBackwardUiComponent = new (dependencies: ClickableComponentDependencies) => IClickableComponent; type SkipForwardUiComponent = new (dependencies: ClickableComponentDependencies) => IClickableComponent; type LoadingSpinnerUiComponent = new (dependencies: UiComponentDependencies) => UiComponent; type ModalDialogUiComponent = new (dependencies: ModalDialogComponentDependencies) => IModalDialogComponent; type ErrorDisplayUiComponent = new (dependencies: ModalDialogComponentDependencies) => IModalDialogComponent; type TextTrackSettingsUiComponent = new (dependencies: TextTrackSettingsComponentDependencies) => IModalDialogComponent; type TitleBarUiComponent = new (dependencies: UiComponentDependencies) => ITitleBarComponent; type LiveDisplayUiComponent = new (dependencies: UiComponentDependencies) => UiComponent; type SliderUiComponent = new (dependencies: SliderComponentDependencies) => ISliderComponent; type VolumeControlUiComponent = new (dependencies: VolumeControlComponentDependencies) => UiComponent; type VolumePanelUiComponent = new (dependencies: VolumePanelComponentDependencies) => UiComponent; type TimeDisplayUiComponent = new (dependencies: UiComponentDependencies) => UiComponent; type TimeDividerUiComponent = new (dependencies: UiComponentDependencies) => UiComponent; type DurationDisplayUiComponent = new (dependencies: UiComponentDependencies) => UiComponent; type RemainingTimeDisplayUiComponent = new (dependencies: RemainingTimeDisplayComponentDependencies) => UiComponent; type SpacerUiComponent = new (dependencies: UiComponentDependencies) => UiComponent; type CustomControlSpacerUiComponent = new (dependencies: UiComponentDependencies) => UiComponent; type PlaybackRateMenuItemUiComponent = new (dependencies: PlaybackRateMenuItemComponentDependencies) => IMenuItemComponent; type TextTrackMenuItemUiComponent = new (dependencies: TextTrackMenuItemComponentDependencies) => IMenuItemComponent; type AudioTrackMenuItemUiComponent = new (dependencies: AudioTrackMenuItemComponentDependencies) => IMenuItemComponent; type ChaptersTrackMenuItemUiComponent = new (dependencies: ChaptersMenuItemComponentDependencies) => IMenuItemComponent; type SubsCapsTrackMenuItemUiComponent = new (dependencies: TextTrackMenuItemComponentDependencies) => IMenuItemComponent; type MenuButtonUiComponent = new (dependencies: MenuButtonComponentDependencies) => IMenuButtonComponent; type PlaybackRateMenuButtonUiComponent = new (dependencies: MenuButtonComponentDependencies) => IMenuButtonComponent; type TextTrackButtonUiComponent = new (dependencies: MenuButtonComponentDependencies) => IMenuButtonComponent; type ChaptersButtonUiComponent = new (dependencies: MenuButtonComponentDependencies) => IMenuButtonComponent; type DescriptionsButtonUiComponent = new (dependencies: MenuButtonComponentDependencies) => IMenuButtonComponent; type AudioTrackButtonUiComponent = new (dependencies: MenuButtonComponentDependencies) => IMenuButtonComponent; type SubsCapsButtonUiComponent = new (dependencies: MenuButtonComponentDependencies) => IMenuButtonComponent; type MouseTimeDisplayUiComponent = new (dependencies: UiComponentDependencies) => UiComponent; type LoadProgressBarUiComponent = new (dependencies: UiComponentDependencies) => UiComponent; type PlayProgressBarUiComponent = new (dependencies: UiComponentDependencies) => UiComponent; type SeekBarUiComponent = new (dependencies: SliderComponentDependencies) => ISeekBarComponent; type ProgressControlUiComponent = new (dependencies: UiComponentDependencies) => IProgressControlComponent; type ControlBarUiComponent = new (dependencies: UiComponentDependencies) => UiComponent; type ThumbnailDisplayUiComponent = new (dependencies: UiComponentDependencies) => IThumbnailDisplayComponent; type NextPlaylistItemEndScreenModalUiComponent = new (dependencies: ModalDialogComponentDependencies) => IModalDialogComponent; type SocialButtonUiComponent = new (dependencies: ClickableComponentDependencies) => IClickableComponent; type SocialOverlayUiComponent = new (dependencies: ModalDialogComponentDependencies) => IModalDialogComponent; type CustomEndScreenModalUiComponent = new (dependencies: ModalDialogComponentDependencies) => IModalDialogComponent; type PlaylistSidebarUiComponent = new (dependencies: UiComponentDependencies) => UiComponent; type CollapsiblePlaylistSidebarUiComponent = new (dependencies: UiComponentDependencies) => UiComponent; type NextPlaylistButtonUiComponent = new (dependencies: ClickableComponentDependencies) => IClickableComponent; type NextPlaylistOverlayUiComponent = new (dependencies: UiComponentDependencies) => UiComponent; type SsaiAdClickTargetComponent = new (dependencies: ClickableComponentDependencies) => IClickableComponent; type SsaiAdMarkerComponent = new (dependencies: UiComponentDependencies) => UiComponent; type SsaiAdStatusOverlayComponent = new (dependencies: UiComponentDependencies) => ISsaiOverlayComponent; type SsaiCountdownOverlayComponent = new (dependencies: UiComponentDependencies) => ISsaiOverlayComponent; type SsaiSkipAdCountdownOverlayComponent = new (dependencies: UiComponentDependencies) => ISsaiOverlayComponent; type SsaiSkipAdOverlayComponent = new (dependencies: ClickableComponentDependencies) => ISsaiSkipAdOverlayComponent; export { IntegrationsManagerImpl as IntegrationsManager, KeySystem, PlayerWithUi as Player, UiComponentType, VideojsUiManagerAdapter as UiManager }; export type { AudioTrackButtonUiComponent, AudioTrackMenuItemUiComponent, BaseButtonUiComponent, BaseClickableUiComponent, BaseUiComponent, BigPlayButtonUiComponent, ChaptersButtonUiComponent, ChaptersTrackMenuItemUiComponent, CloseButtonUiComponent, CollapsiblePlaylistSidebarUiComponent, ControlBarUiComponent, CustomControlSpacerUiComponent, CustomEndScreenModalUiComponent, DescriptionsButtonUiComponent, DurationDisplayUiComponent, ErrorDisplayUiComponent, FullscreenToggleUiComponent, LiveDisplayUiComponent, LoadProgressBarUiComponent, LoadingSpinnerUiComponent, MenuButtonUiComponent, MenuItemUiComponent, ModalDialogUiComponent, MouseTimeDisplayUiComponent, MuteToggleUiComponent, NextPlaylistButtonUiComponent, NextPlaylistItemEndScreenModalUiComponent, NextPlaylistOverlayUiComponent, PictureInPictureToggleUiComponent, PlayProgressBarUiComponent, PlayToggleUiComponent, PlaybackRateMenuButtonUiComponent, PlaybackRateMenuItemUiComponent, PlaylistSidebarUiComponent, PosterImageUiComponent, ProgressControlUiComponent, RemainingTimeDisplayUiComponent, SeekBarUiComponent, SeekToLiveUiComponent, SkipBackwardUiComponent, SkipForwardUiComponent, SliderUiComponent, SocialButtonUiComponent, SocialOverlayUiComponent, SpacerUiComponent, SsaiAdClickTargetComponent, SsaiAdMarkerComponent, SsaiAdStatusOverlayComponent, SsaiCountdownOverlayComponent, SsaiSkipAdCountdownOverlayComponent, SsaiSkipAdOverlayComponent, SubsCapsButtonUiComponent, SubsCapsTrackMenuItemUiComponent, TextTrackButtonUiComponent, TextTrackMenuItemUiComponent, TextTrackSettingsUiComponent, ThumbnailDisplayUiComponent, TimeDisplayUiComponent, TimeDividerUiComponent, TitleBarUiComponent, VolumeControlUiComponent, VolumePanelUiComponent };