bitmovin-player-react-native 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/com/bitmovin/player/reactnative/PlayerModule.kt +47 -0
  4. package/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt +32 -3
  5. package/build/adaptationConfig.d.ts +1 -1
  6. package/build/adaptationConfig.js.map +1 -1
  7. package/build/advertising.d.ts +54 -1
  8. package/build/advertising.d.ts.map +1 -1
  9. package/build/advertising.js.map +1 -1
  10. package/build/audioSession.d.ts +3 -3
  11. package/build/audioSession.js +2 -2
  12. package/build/audioSession.js.map +1 -1
  13. package/build/bitmovinCastManager.d.ts +3 -3
  14. package/build/bitmovinCastManager.js +2 -2
  15. package/build/bitmovinCastManager.js.map +1 -1
  16. package/build/bufferConfig.d.ts +2 -2
  17. package/build/bufferConfig.js.map +1 -1
  18. package/build/components/PlayerView/events.d.ts +16 -16
  19. package/build/components/PlayerView/events.js.map +1 -1
  20. package/build/components/PlayerView/nativeEvents.d.ts +16 -16
  21. package/build/components/PlayerView/nativeEvents.js.map +1 -1
  22. package/build/components/PlayerView/pictureInPictureConfig.d.ts +1 -1
  23. package/build/components/PlayerView/pictureInPictureConfig.js.map +1 -1
  24. package/build/components/PlayerView/playerViewConfig.d.ts +2 -2
  25. package/build/components/PlayerView/playerViewConfig.js.map +1 -1
  26. package/build/decoder/decoderConfig.d.ts +2 -2
  27. package/build/decoder/decoderConfig.js.map +1 -1
  28. package/build/drm/index.d.ts +2 -2
  29. package/build/drm/index.js.map +1 -1
  30. package/build/drm/widevineConfig.d.ts +5 -5
  31. package/build/drm/widevineConfig.js.map +1 -1
  32. package/build/events.d.ts +10 -10
  33. package/build/events.js.map +1 -1
  34. package/build/media.d.ts +4 -0
  35. package/build/media.d.ts.map +1 -1
  36. package/build/media.js.map +1 -1
  37. package/build/modules/PlayerModule.d.ts +12 -1
  38. package/build/modules/PlayerModule.d.ts.map +1 -1
  39. package/build/modules/PlayerModule.js.map +1 -1
  40. package/build/offline/offlineContentConfig.d.ts +1 -1
  41. package/build/offline/offlineContentConfig.js.map +1 -1
  42. package/build/offline/offlineContentManager.d.ts +2 -2
  43. package/build/offline/offlineContentManager.js +2 -2
  44. package/build/offline/offlineContentManager.js.map +1 -1
  45. package/build/offline/offlineContentManagerListener.d.ts +13 -13
  46. package/build/offline/offlineContentManagerListener.js +1 -1
  47. package/build/offline/offlineContentManagerListener.js.map +1 -1
  48. package/build/offline/offlineContentOptions.d.ts +2 -2
  49. package/build/offline/offlineContentOptions.js.map +1 -1
  50. package/build/offline/offlineDownloadRequest.d.ts +1 -1
  51. package/build/offline/offlineDownloadRequest.js.map +1 -1
  52. package/build/offline/offlineSourceOptions.d.ts +2 -2
  53. package/build/offline/offlineSourceOptions.js.map +1 -1
  54. package/build/offline/offlineState.d.ts +1 -1
  55. package/build/offline/offlineState.js +1 -1
  56. package/build/offline/offlineState.js.map +1 -1
  57. package/build/playbackConfig.d.ts +1 -1
  58. package/build/playbackConfig.js.map +1 -1
  59. package/build/player.d.ts +13 -11
  60. package/build/player.d.ts.map +1 -1
  61. package/build/player.js +42 -11
  62. package/build/player.js.map +1 -1
  63. package/build/source.d.ts +2 -2
  64. package/build/source.js +1 -1
  65. package/build/source.js.map +1 -1
  66. package/build/styleConfig.d.ts +5 -5
  67. package/build/styleConfig.js +1 -1
  68. package/build/styleConfig.js.map +1 -1
  69. package/build/subtitleFormat.d.ts +5 -5
  70. package/build/subtitleFormat.js +5 -5
  71. package/build/subtitleFormat.js.map +1 -1
  72. package/build/subtitleTrack.d.ts +1 -1
  73. package/build/subtitleTrack.js.map +1 -1
  74. package/build/tweaksConfig.d.ts +15 -15
  75. package/build/tweaksConfig.js.map +1 -1
  76. package/ios/FullscreenHandlerModule.swift +26 -3
  77. package/ios/LockedBox.swift +6 -0
  78. package/ios/PlayerModule.swift +40 -0
  79. package/ios/RCTConvert+BitmovinPlayer.swift +41 -0
  80. package/ios/RNBitmovinPlayer.podspec +1 -1
  81. package/package.json +1 -1
  82. package/plugin/build/withBitmovinConfig.js +8 -2
  83. package/plugin/src/withAppGradleDependencies.ts +24 -21
  84. package/plugin/src/withBitmovinAndroidConfig.ts +4 -1
  85. package/plugin/src/withBitmovinConfig.ts +12 -3
  86. package/plugin/src/withBitmovinIosConfig.ts +4 -1
  87. package/src/adaptationConfig.ts +1 -1
  88. package/src/advertising.ts +56 -1
  89. package/src/audioSession.ts +3 -3
  90. package/src/bitmovinCastManager.ts +3 -3
  91. package/src/bufferConfig.ts +2 -2
  92. package/src/components/PlayerView/events.ts +16 -16
  93. package/src/components/PlayerView/nativeEvents.ts +16 -16
  94. package/src/components/PlayerView/pictureInPictureConfig.ts +1 -1
  95. package/src/components/PlayerView/playerViewConfig.ts +2 -2
  96. package/src/decoder/decoderConfig.ts +2 -2
  97. package/src/drm/index.ts +2 -2
  98. package/src/drm/widevineConfig.ts +5 -5
  99. package/src/events.ts +10 -10
  100. package/src/media.ts +4 -0
  101. package/src/modules/PlayerModule.ts +18 -2
  102. package/src/offline/offlineContentConfig.ts +1 -1
  103. package/src/offline/offlineContentManager.ts +2 -2
  104. package/src/offline/offlineContentManagerListener.ts +13 -13
  105. package/src/offline/offlineContentOptions.ts +2 -2
  106. package/src/offline/offlineDownloadRequest.ts +1 -1
  107. package/src/offline/offlineSourceOptions.ts +2 -2
  108. package/src/offline/offlineState.ts +1 -1
  109. package/src/playbackConfig.ts +1 -1
  110. package/src/player.ts +47 -12
  111. package/src/source.ts +2 -2
  112. package/src/styleConfig.ts +5 -5
  113. package/src/subtitleFormat.ts +5 -5
  114. package/src/subtitleTrack.ts +1 -1
  115. package/src/tweaksConfig.ts +15 -15
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"","sourcesContent":["import {\n Ad,\n AdBreak,\n AdConfig,\n AdItem,\n AdQuartile,\n AdSourceType,\n} from './advertising';\nimport { SubtitleTrack } from './subtitleTrack';\nimport { VideoQuality } from './media';\nimport { AudioTrack } from './audioTrack';\nimport { LoadingState } from './source';\nimport { HttpRequestType } from './network/networkConfig';\n\n/**\n * Base event type for all events.\n */\nexport interface Event {\n /**\n * This event name as it is on the native side.\n */\n name: string;\n /**\n * The UNIX timestamp in which this event happened.\n */\n timestamp: number;\n}\n\n/**\n * Base event type for error and warning events.\n */\nexport interface ErrorEvent extends Event {\n /**\n * Error/Warning's code number.\n */\n code?: number;\n /**\n * Error/Warning's localized message.\n */\n message: string;\n /**\n * Underlying data emitted with the error or warning.\n */\n data?: Record<string, any>;\n}\n\n/**\n * Emitted when a source is loaded into the player.\n * Seeking and time shifting are allowed as soon as this event is seen.\n */\nexport type PlayerActiveEvent = Event;\n\n/**\n * Emitted when a source is unloaded from the player.\n * Seeking and time shifting are not allowed anymore after this event.\n */\nexport type PlayerInactiveEvent = Event;\n\n/**\n * Emitted when a player error occurred.\n */\nexport type PlayerErrorEvent = ErrorEvent;\n\n/**\n * Emitted when a player warning occurred.\n */\nexport type PlayerWarningEvent = ErrorEvent;\n\n/**\n * Emitted when the player is destroyed.\n */\nexport type DestroyEvent = Event;\n\n/**\n * Emitted when the player is muted.\n */\nexport type MutedEvent = Event;\n\n/**\n * Emitted when the player is unmuted.\n */\nexport type UnmutedEvent = Event;\n\n/**\n * Emitted when the player is ready for immediate playback, because initial audio/video\n * has been downloaded.\n */\nexport type ReadyEvent = Event;\n\n/**\n * Emitted when the player is paused.\n */\nexport interface PausedEvent extends Event {\n /**\n * The player's playback time from when this event happened.\n */\n time: number;\n}\n\n/**\n * Emitted when the player received an intention to start/resume playback.\n */\nexport interface PlayEvent extends Event {\n /**\n * The player's playback time from when this event happened.\n */\n time: number;\n}\n\n/**\n * Emitted when playback has started.\n */\nexport interface PlayingEvent extends Event {\n /**\n * The player's playback time from when this event happened.\n */\n time: number;\n}\n\n/**\n * Emitted when the playback of the current media has finished.\n */\nexport type PlaybackFinishedEvent = Event;\n\n/**\n * Source object representation the way it appears on event's payloads such as `SeekEvent`, for example.\n *\n * This interface only type hints what should be the shape of a {@link Source} object inside an event's\n * payload during runtime so it has no direct relation with the `Source` class present in `src/source.ts`.\n *\n * Do not mistake it for a `NativeInstance` type.\n */\nexport interface EventSource {\n /**\n * Event's source duration in seconds.\n */\n duration: number;\n /**\n * Whether this event's source is currently active in a player.\n */\n isActive: boolean;\n /**\n * Whether this event's source is currently attached to a player instance.\n */\n isAttachedToPlayer: boolean;\n /**\n * Metadata for this event's source.\n */\n metadata?: Record<string, any>;\n /**\n * The current {@link LoadingState} of the source.\n */\n loadingState: LoadingState;\n}\n\n/**\n * Represents a seeking position.\n */\nexport interface SeekPosition {\n /**\n * The relevant {@link Source}.\n */\n source: EventSource;\n /**\n * The position within the {@link Source} in seconds.\n */\n time: number;\n}\n\n/**\n * Emitted when the player is about to seek to a new position.\n * This event only applies to VoD streams.\n * When looking for an equivalent for live streams, the {@link TimeShiftEvent} is relevant.\n */\nexport interface SeekEvent extends Event {\n /**\n * Origin source metadata.\n */\n from: SeekPosition;\n /**\n * Target source metadata.\n */\n to: SeekPosition;\n}\n\n/**\n * Emitted when seeking has finished and data to continue playback is available.\n * This event only applies to VoD streams.\n * When looking for an equivalent for live streams, the {@link TimeShiftedEvent} is relevant.\n */\nexport type SeekedEvent = Event;\n\n/**\n * Emitted when the player starts time shifting.\n * This event only applies to live streams.\n * When looking for an equivalent for VoD streams, the {@link SeekEvent} is relevant.\n */\nexport interface TimeShiftEvent extends Event {\n /**\n * The position from which we start the time shift\n */\n position: number;\n /**\n * The position to which we want to jump for the time shift\n */\n targetPosition: number;\n}\n\n/**\n * Emitted when time shifting has finished and data is available to continue playback.\n * This event only applies to live streams.\n * When looking for an equivalent for VoD streams, the {@link SeekedEvent} is relevant.\n */\nexport type TimeShiftedEvent = Event;\n\n/**\n * Emitted when the player begins to stall and to buffer due to an empty buffer.\n */\nexport type StallStartedEvent = Event;\n\n/**\n * Emitted when the player ends stalling, due to enough data in the buffer.\n */\nexport type StallEndedEvent = Event;\n\n/**\n * Emitted when the current playback time has changed.\n */\nexport interface TimeChangedEvent extends Event {\n /**\n * The player's playback time from when this event happened.\n */\n currentTime: number;\n}\n\n/**\n * Emitted when a new source loading has started.\n */\nexport interface SourceLoadEvent extends Event {\n /**\n * Source that is about to load.\n */\n source: EventSource;\n}\n\n/**\n * Emitted when a new source is loaded.\n * This does not mean that the source is immediately ready for playback.\n * {@link ReadyEvent} indicates the player is ready for immediate playback.\n */\nexport interface SourceLoadedEvent extends Event {\n /**\n * Source that was loaded into player.\n */\n source: EventSource;\n}\n\n/**\n * Emitted when the current source has been unloaded.\n */\nexport interface SourceUnloadedEvent extends Event {\n /**\n * Source that was unloaded from player.\n */\n source: EventSource;\n}\n\n/**\n * Emitted when a source error occurred.\n */\nexport type SourceErrorEvent = ErrorEvent;\n\n/**\n * Emitted when a source warning occurred.\n */\nexport type SourceWarningEvent = ErrorEvent;\n\n/**\n * Emitted when a new audio track is added to the player.\n */\nexport interface AudioAddedEvent extends Event {\n /**\n * Audio track that has been added.\n */\n audioTrack: AudioTrack;\n}\n\n/**\n * Emitted when the player's selected audio track has changed.\n */\nexport interface AudioChangedEvent extends Event {\n /**\n * Audio track that was previously selected.\n */\n oldAudioTrack: AudioTrack;\n /**\n * Audio track that is selected now.\n */\n newAudioTrack: AudioTrack;\n}\n\n/**\n * Emitted when an audio track is removed from the player.\n */\nexport interface AudioRemovedEvent extends Event {\n /**\n * Audio track that has been removed.\n */\n audioTrack: AudioTrack;\n}\n\n/**\n * Emitted when a new subtitle track is added to the player.\n */\nexport interface SubtitleAddedEvent extends Event {\n /**\n * Subtitle track that has been added.\n */\n subtitleTrack: SubtitleTrack;\n}\n\n/**\n * Emitted when a subtitle track is removed from the player.\n */\nexport interface SubtitleRemovedEvent extends Event {\n /**\n * Subtitle track that has been removed.\n */\n subtitleTrack: SubtitleTrack;\n}\n\n/**\n * Emitted when the player's selected subtitle track has changed.\n */\nexport interface SubtitleChangedEvent extends Event {\n /**\n * Subtitle track that was previously selected.\n */\n oldSubtitleTrack: SubtitleTrack;\n /**\n * Subtitle track that is selected now.\n */\n newSubtitleTrack: SubtitleTrack;\n}\n\n/**\n * Emitted when the player enters Picture in Picture mode.\n *\n * @remarks Platform: iOS, Android\n */\nexport type PictureInPictureEnterEvent = Event;\n\n/**\n * Emitted when the player exits Picture in Picture mode.\n *\n * @remarks Platform: iOS, Android\n */\nexport type PictureInPictureExitEvent = Event;\n\n/**\n * Emitted when the player has finished entering Picture in Picture mode on iOS.\n *\n * @remarks Platform: iOS\n */\nexport type PictureInPictureEnteredEvent = Event;\n\n/**\n * Emitted when the player has finished exiting Picture in Picture mode on iOS.\n *\n * @remarks Platform: iOS\n */\nexport type PictureInPictureExitedEvent = Event;\n\n/**\n * Emitted when the fullscreen functionality has been enabled.\n *\n * @remarks Platform: iOS, Android\n */\nexport type FullscreenEnabledEvent = Event;\n\n/**\n * Emitted when the fullscreen functionality has been disabled.\n *\n * @remarks Platform: iOS, Android\n */\nexport type FullscreenDisabledEvent = Event;\n\n/**\n * Emitted when the player enters fullscreen mode.\n *\n * @remarks Platform: iOS, Android\n */\nexport type FullscreenEnterEvent = Event;\n\n/**\n * Emitted when the player exits fullscreen mode.\n *\n * @remarks Platform: iOS, Android\n */\nexport type FullscreenExitEvent = Event;\n\n/**\n * Emitted when the availability of the Picture in Picture mode changed on Android.\n *\n * @remarks Platform: Android\n */\nexport interface PictureInPictureAvailabilityChangedEvent extends Event {\n /**\n * Whether Picture in Picture is available.\n */\n isPictureInPictureAvailable: boolean;\n}\n\n/**\n * Emitted when an ad break has started.\n */\nexport interface AdBreakStartedEvent extends Event {\n /**\n * The {@link AdBreak} that has started.\n */\n adBreak?: AdBreak;\n}\n\n/**\n * Emitted when an ad break has finished.\n */\nexport interface AdBreakFinishedEvent extends Event {\n /**\n * The {@link AdBreak} that has finished.\n */\n adBreak?: AdBreak;\n}\n\n/**\n * Emitted when the playback of an ad has started.\n */\nexport interface AdStartedEvent extends Event {\n /**\n * The {@link Ad} this event is related to.\n */\n ad?: Ad;\n /**\n * The target URL to open once the user clicks on the ad.\n */\n clickThroughUrl?: string;\n /**\n * The {@link AdSourceType} of the started ad.\n */\n clientType?: AdSourceType;\n /**\n * The duration of the ad in seconds.\n */\n duration: number;\n /**\n * The index of the ad in the queue.\n */\n indexInQueue: number;\n /**\n * The position of the corresponding ad.\n */\n position?: string;\n /**\n * The skip offset of the ad in seconds.\n */\n skipOffset: number;\n /**\n * The main content time at which the ad is played.\n */\n timeOffset: number;\n}\n\n/**\n * Emitted when an ad has finished playback.\n */\nexport interface AdFinishedEvent extends Event {\n /**\n * The {@link Ad} that finished playback.\n */\n ad?: Ad;\n}\n\n/**\n * Emitted when an error with the ad playback occurs.\n */\nexport interface AdErrorEvent extends ErrorEvent {\n /**\n * The {@link AdConfig} for which the ad error occurred.\n */\n adConfig?: AdConfig;\n /**\n * The {@link AdItem} for which the ad error occurred.\n */\n adItem?: AdItem;\n}\n\n/**\n * Emitted when an ad was clicked.\n */\nexport interface AdClickedEvent extends Event {\n /**\n * The click through url of the ad.\n */\n clickThroughUrl?: string;\n}\n\n/**\n * Emitted when an ad was skipped.\n */\nexport interface AdSkippedEvent extends Event {\n /**\n * The ad that was skipped.\n */\n ad?: Ad;\n}\n\n/**\n * Emitted when the playback of an ad has progressed over a quartile boundary.\n */\nexport interface AdQuartileEvent extends Event {\n /**\n * The {@link AdQuartile} boundary that playback has progressed over.\n */\n quartile: AdQuartile;\n}\n\n/**\n * Emitted when an ad manifest was successfully downloaded, parsed and added into the ad break schedule.\n */\nexport interface AdScheduledEvent extends Event {\n /**\n * The total number of scheduled ads.\n */\n numberOfAds: number;\n}\n\n/**\n * Emitted when the download of an ad manifest is started.\n */\nexport interface AdManifestLoadEvent extends Event {\n /**\n * The {@link AdBreak} this event is related to.\n */\n adBreak?: AdBreak;\n /**\n * The {@link AdConfig} of the loaded ad manifest.\n */\n adConfig?: AdConfig;\n}\n\n/**\n * Emitted when an ad manifest was successfully loaded.\n */\nexport interface AdManifestLoadedEvent extends Event {\n /**\n * The {@link AdBreak} this event is related to.\n */\n adBreak?: AdBreak;\n /**\n * The {@link AdConfig} of the loaded ad manifest.\n */\n adConfig?: AdConfig;\n /**\n * How long it took for the ad tag to be downloaded in milliseconds.\n */\n downloadTime: number;\n}\n\n/**\n * Emitted when current video download quality has changed.\n */\nexport interface VideoDownloadQualityChangedEvent extends Event {\n /**\n * The new quality\n */\n newVideoQuality: VideoQuality;\n /**\n * The previous quality\n */\n oldVideoQuality: VideoQuality;\n}\n\n/**\n * Emitted when the current video playback quality has changed.\n */\nexport interface VideoPlaybackQualityChangedEvent extends Event {\n /**\n * The new quality\n */\n newVideoQuality: VideoQuality;\n /**\n * The previous quality\n */\n oldVideoQuality: VideoQuality;\n}\n\n/**\n * Emitted when casting to a cast-compatible device is available.\n */\nexport type CastAvailableEvent = Event;\n\n/**\n * Emitted when the playback on a cast-compatible device was paused.\n *\n * On Android {@link PausedEvent} is also emitted while casting.\n */\nexport type CastPausedEvent = Event;\n\n/**\n * Emitted when the playback on a cast-compatible device has finished.\n *\n * On Android {@link PlaybackFinishedEvent} is also emitted while casting.\n */\nexport type CastPlaybackFinishedEvent = Event;\n\n/**\n * Emitted when playback on a cast-compatible device has started.\n *\n * On Android {@link PlayingEvent} is also emitted while casting.\n */\nexport type CastPlayingEvent = Event;\n\n/**\n * Emitted when the cast app is launched successfully.\n */\nexport interface CastStartedEvent extends Event {\n /**\n * The name of the cast device on which the app was launched.\n */\n deviceName: string | null;\n}\n\n/**\n * Emitted when casting is initiated, but the user still needs to choose which device should be used.\n */\nexport type CastStartEvent = Event;\n\n/**\n * Emitted when casting to a cast-compatible device is stopped.\n */\nexport type CastStoppedEvent = Event;\n\n/**\n * Emitted when the time update from the currently used cast-compatible device is received.\n */\nexport type CastTimeUpdatedEvent = Event;\n\n/**\n * Contains information for the {@link CastWaitingForDeviceEvent}.\n */\nexport interface CastPayload {\n /**\n * The current time in seconds.\n */\n currentTime: number;\n /**\n * The name of the chosen cast device.\n */\n deviceName: string | null;\n /**\n * The type of the payload (always `\"cast\"`).\n */\n type: string;\n}\n\n/**\n * Emitted when a cast-compatible device has been chosen and the player is waiting for the device to get ready for\n * playback.\n */\nexport interface CastWaitingForDeviceEvent extends Event {\n /**\n * The {@link CastPayload} object for the event\n */\n castPayload: CastPayload;\n}\n\n/**\n * Emitted when a download was finished.\n */\nexport interface DownloadFinishedEvent extends Event {\n /**\n * The time needed to finish the request, in seconds.\n */\n downloadTime: number;\n /**\n * Which type of request this was.\n */\n requestType: HttpRequestType;\n /**\n * The HTTP status code of the request.\n * If opening the connection failed, a value of `0` is returned.\n */\n httpStatus: number;\n /**\n * If the download was successful.\n */\n isSuccess: boolean;\n /**\n * The last redirect location, or `null` if no redirect happened.\n */\n lastRedirectLocation?: string;\n /**\n * The size of the downloaded data, in bytes.\n */\n size: number;\n /**\n * The URL of the request.\n */\n url: string;\n}\n\n/**\n * Emitted when the player transitions from one playback speed to another.\n * @remarks Platform: iOS, tvOS\n */\nexport interface PlaybackSpeedChangedEvent extends Event {\n /**\n * The playback speed before the change happened.\n */\n from: number;\n /**\n * The playback speed after the change happened.\n */\n to: number;\n}\n\n/**\n * Emitted when a subtitle entry transitions into the active status.\n */\nexport interface CueEnterEvent extends Event {\n /**\n * The playback time in seconds when the subtitle should be rendered.\n */\n start: number;\n /**\n * The playback time in seconds when the subtitle should be hidden.\n */\n end: number;\n /**\n * The textual content of this subtitle.\n */\n text?: string;\n /**\n * Data URI for image data of this subtitle.\n */\n image?: string;\n}\n\n/**\n * Emitted when an active subtitle entry transitions into the inactive status.\n */\nexport interface CueExitEvent extends Event {\n /**\n * The playback time in seconds when the subtitle should be rendered.\n */\n start: number;\n /**\n * The playback time in seconds when the subtitle should be hidden.\n */\n end: number;\n /**\n * The textual content of this subtitle.\n */\n text?: string;\n /**\n * Data URI for image data of this subtitle.\n */\n image?: string;\n}\n"]}
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"","sourcesContent":["import {\n Ad,\n AdBreak,\n AdConfig,\n AdItem,\n AdQuartile,\n AdSourceType,\n} from './advertising';\nimport { SubtitleTrack } from './subtitleTrack';\nimport { VideoQuality } from './media';\nimport { AudioTrack } from './audioTrack';\nimport { LoadingState } from './source';\nimport { HttpRequestType } from './network/networkConfig';\n\n/**\n * Base event type for all events.\n */\nexport interface Event {\n /**\n * This event name as it is on the native side.\n */\n name: string;\n /**\n * The UNIX timestamp in which this event happened.\n */\n timestamp: number;\n}\n\n/**\n * Base event type for error and warning events.\n */\nexport interface ErrorEvent extends Event {\n /**\n * Error/Warning's code number.\n */\n code?: number;\n /**\n * Error/Warning's localized message.\n */\n message: string;\n /**\n * Underlying data emitted with the error or warning.\n */\n data?: Record<string, any>;\n}\n\n/**\n * Emitted when a source is loaded into the player.\n * Seeking and time shifting are allowed as soon as this event is seen.\n */\nexport type PlayerActiveEvent = Event;\n\n/**\n * Emitted when a source is unloaded from the player.\n * Seeking and time shifting are not allowed anymore after this event.\n */\nexport type PlayerInactiveEvent = Event;\n\n/**\n * Emitted when a player error occurred.\n */\nexport type PlayerErrorEvent = ErrorEvent;\n\n/**\n * Emitted when a player warning occurred.\n */\nexport type PlayerWarningEvent = ErrorEvent;\n\n/**\n * Emitted when the player is destroyed.\n */\nexport type DestroyEvent = Event;\n\n/**\n * Emitted when the player is muted.\n */\nexport type MutedEvent = Event;\n\n/**\n * Emitted when the player is unmuted.\n */\nexport type UnmutedEvent = Event;\n\n/**\n * Emitted when the player is ready for immediate playback, because initial audio/video\n * has been downloaded.\n */\nexport type ReadyEvent = Event;\n\n/**\n * Emitted when the player is paused.\n */\nexport interface PausedEvent extends Event {\n /**\n * The player's playback time from when this event happened.\n */\n time: number;\n}\n\n/**\n * Emitted when the player received an intention to start/resume playback.\n */\nexport interface PlayEvent extends Event {\n /**\n * The player's playback time from when this event happened.\n */\n time: number;\n}\n\n/**\n * Emitted when playback has started.\n */\nexport interface PlayingEvent extends Event {\n /**\n * The player's playback time from when this event happened.\n */\n time: number;\n}\n\n/**\n * Emitted when the playback of the current media has finished.\n */\nexport type PlaybackFinishedEvent = Event;\n\n/**\n * Source object representation the way it appears on event's payloads such as `SeekEvent`, for example.\n *\n * This interface only type hints what should be the shape of a {@link Source} object inside an event's\n * payload during runtime so it has no direct relation with the `Source` class present in `src/source.ts`.\n *\n * Do not mistake it for a `NativeInstance` type.\n */\nexport interface EventSource {\n /**\n * Event's source duration in seconds.\n */\n duration: number;\n /**\n * Whether this event's source is currently active in a player.\n */\n isActive: boolean;\n /**\n * Whether this event's source is currently attached to a player instance.\n */\n isAttachedToPlayer: boolean;\n /**\n * Metadata for this event's source.\n */\n metadata?: Record<string, any>;\n /**\n * The current {@link LoadingState} of the source.\n */\n loadingState: LoadingState;\n}\n\n/**\n * Represents a seeking position.\n */\nexport interface SeekPosition {\n /**\n * The relevant {@link Source}.\n */\n source: EventSource;\n /**\n * The position within the {@link Source} in seconds.\n */\n time: number;\n}\n\n/**\n * Emitted when the player is about to seek to a new position.\n * This event only applies to VoD streams.\n * When looking for an equivalent for live streams, the {@link TimeShiftEvent} is relevant.\n */\nexport interface SeekEvent extends Event {\n /**\n * Origin source metadata.\n */\n from: SeekPosition;\n /**\n * Target source metadata.\n */\n to: SeekPosition;\n}\n\n/**\n * Emitted when seeking has finished and data to continue playback is available.\n * This event only applies to VoD streams.\n * When looking for an equivalent for live streams, the {@link TimeShiftedEvent} is relevant.\n */\nexport type SeekedEvent = Event;\n\n/**\n * Emitted when the player starts time shifting.\n * This event only applies to live streams.\n * When looking for an equivalent for VoD streams, the {@link SeekEvent} is relevant.\n */\nexport interface TimeShiftEvent extends Event {\n /**\n * The position from which we start the time shift\n */\n position: number;\n /**\n * The position to which we want to jump for the time shift\n */\n targetPosition: number;\n}\n\n/**\n * Emitted when time shifting has finished and data is available to continue playback.\n * This event only applies to live streams.\n * When looking for an equivalent for VoD streams, the {@link SeekedEvent} is relevant.\n */\nexport type TimeShiftedEvent = Event;\n\n/**\n * Emitted when the player begins to stall and to buffer due to an empty buffer.\n */\nexport type StallStartedEvent = Event;\n\n/**\n * Emitted when the player ends stalling, due to enough data in the buffer.\n */\nexport type StallEndedEvent = Event;\n\n/**\n * Emitted when the current playback time has changed.\n */\nexport interface TimeChangedEvent extends Event {\n /**\n * The player's playback time from when this event happened.\n */\n currentTime: number;\n}\n\n/**\n * Emitted when a new source loading has started.\n */\nexport interface SourceLoadEvent extends Event {\n /**\n * Source that is about to load.\n */\n source: EventSource;\n}\n\n/**\n * Emitted when a new source is loaded.\n * This does not mean that the source is immediately ready for playback.\n * {@link ReadyEvent} indicates the player is ready for immediate playback.\n */\nexport interface SourceLoadedEvent extends Event {\n /**\n * Source that was loaded into player.\n */\n source: EventSource;\n}\n\n/**\n * Emitted when the current source has been unloaded.\n */\nexport interface SourceUnloadedEvent extends Event {\n /**\n * Source that was unloaded from player.\n */\n source: EventSource;\n}\n\n/**\n * Emitted when a source error occurred.\n */\nexport type SourceErrorEvent = ErrorEvent;\n\n/**\n * Emitted when a source warning occurred.\n */\nexport type SourceWarningEvent = ErrorEvent;\n\n/**\n * Emitted when a new audio track is added to the player.\n */\nexport interface AudioAddedEvent extends Event {\n /**\n * Audio track that has been added.\n */\n audioTrack: AudioTrack;\n}\n\n/**\n * Emitted when the player's selected audio track has changed.\n */\nexport interface AudioChangedEvent extends Event {\n /**\n * Audio track that was previously selected.\n */\n oldAudioTrack: AudioTrack;\n /**\n * Audio track that is selected now.\n */\n newAudioTrack: AudioTrack;\n}\n\n/**\n * Emitted when an audio track is removed from the player.\n */\nexport interface AudioRemovedEvent extends Event {\n /**\n * Audio track that has been removed.\n */\n audioTrack: AudioTrack;\n}\n\n/**\n * Emitted when a new subtitle track is added to the player.\n */\nexport interface SubtitleAddedEvent extends Event {\n /**\n * Subtitle track that has been added.\n */\n subtitleTrack: SubtitleTrack;\n}\n\n/**\n * Emitted when a subtitle track is removed from the player.\n */\nexport interface SubtitleRemovedEvent extends Event {\n /**\n * Subtitle track that has been removed.\n */\n subtitleTrack: SubtitleTrack;\n}\n\n/**\n * Emitted when the player's selected subtitle track has changed.\n */\nexport interface SubtitleChangedEvent extends Event {\n /**\n * Subtitle track that was previously selected.\n */\n oldSubtitleTrack: SubtitleTrack;\n /**\n * Subtitle track that is selected now.\n */\n newSubtitleTrack: SubtitleTrack;\n}\n\n/**\n * Emitted when the player enters Picture in Picture mode.\n *\n * @platform iOS, Android\n */\nexport type PictureInPictureEnterEvent = Event;\n\n/**\n * Emitted when the player exits Picture in Picture mode.\n *\n * @platform iOS, Android\n */\nexport type PictureInPictureExitEvent = Event;\n\n/**\n * Emitted when the player has finished entering Picture in Picture mode on iOS.\n *\n * @platform iOS\n */\nexport type PictureInPictureEnteredEvent = Event;\n\n/**\n * Emitted when the player has finished exiting Picture in Picture mode on iOS.\n *\n * @platform iOS\n */\nexport type PictureInPictureExitedEvent = Event;\n\n/**\n * Emitted when the fullscreen functionality has been enabled.\n *\n * @platform iOS, Android\n */\nexport type FullscreenEnabledEvent = Event;\n\n/**\n * Emitted when the fullscreen functionality has been disabled.\n *\n * @platform iOS, Android\n */\nexport type FullscreenDisabledEvent = Event;\n\n/**\n * Emitted when the player enters fullscreen mode.\n *\n * @platform iOS, Android\n */\nexport type FullscreenEnterEvent = Event;\n\n/**\n * Emitted when the player exits fullscreen mode.\n *\n * @platform iOS, Android\n */\nexport type FullscreenExitEvent = Event;\n\n/**\n * Emitted when the availability of the Picture in Picture mode changed on Android.\n *\n * @platform Android\n */\nexport interface PictureInPictureAvailabilityChangedEvent extends Event {\n /**\n * Whether Picture in Picture is available.\n */\n isPictureInPictureAvailable: boolean;\n}\n\n/**\n * Emitted when an ad break has started.\n */\nexport interface AdBreakStartedEvent extends Event {\n /**\n * The {@link AdBreak} that has started.\n */\n adBreak?: AdBreak;\n}\n\n/**\n * Emitted when an ad break has finished.\n */\nexport interface AdBreakFinishedEvent extends Event {\n /**\n * The {@link AdBreak} that has finished.\n */\n adBreak?: AdBreak;\n}\n\n/**\n * Emitted when the playback of an ad has started.\n */\nexport interface AdStartedEvent extends Event {\n /**\n * The {@link Ad} this event is related to.\n */\n ad?: Ad;\n /**\n * The target URL to open once the user clicks on the ad.\n */\n clickThroughUrl?: string;\n /**\n * The {@link AdSourceType} of the started ad.\n */\n clientType?: AdSourceType;\n /**\n * The duration of the ad in seconds.\n */\n duration: number;\n /**\n * The index of the ad in the queue.\n */\n indexInQueue: number;\n /**\n * The position of the corresponding ad.\n */\n position?: string;\n /**\n * The skip offset of the ad in seconds.\n */\n skipOffset: number;\n /**\n * The main content time at which the ad is played.\n */\n timeOffset: number;\n}\n\n/**\n * Emitted when an ad has finished playback.\n */\nexport interface AdFinishedEvent extends Event {\n /**\n * The {@link Ad} that finished playback.\n */\n ad?: Ad;\n}\n\n/**\n * Emitted when an error with the ad playback occurs.\n */\nexport interface AdErrorEvent extends ErrorEvent {\n /**\n * The {@link AdConfig} for which the ad error occurred.\n */\n adConfig?: AdConfig;\n /**\n * The {@link AdItem} for which the ad error occurred.\n */\n adItem?: AdItem;\n}\n\n/**\n * Emitted when an ad was clicked.\n */\nexport interface AdClickedEvent extends Event {\n /**\n * The click through url of the ad.\n */\n clickThroughUrl?: string;\n}\n\n/**\n * Emitted when an ad was skipped.\n */\nexport interface AdSkippedEvent extends Event {\n /**\n * The ad that was skipped.\n */\n ad?: Ad;\n}\n\n/**\n * Emitted when the playback of an ad has progressed over a quartile boundary.\n */\nexport interface AdQuartileEvent extends Event {\n /**\n * The {@link AdQuartile} boundary that playback has progressed over.\n */\n quartile: AdQuartile;\n}\n\n/**\n * Emitted when an ad manifest was successfully downloaded, parsed and added into the ad break schedule.\n */\nexport interface AdScheduledEvent extends Event {\n /**\n * The total number of scheduled ads.\n */\n numberOfAds: number;\n}\n\n/**\n * Emitted when the download of an ad manifest is started.\n */\nexport interface AdManifestLoadEvent extends Event {\n /**\n * The {@link AdBreak} this event is related to.\n */\n adBreak?: AdBreak;\n /**\n * The {@link AdConfig} of the loaded ad manifest.\n */\n adConfig?: AdConfig;\n}\n\n/**\n * Emitted when an ad manifest was successfully loaded.\n */\nexport interface AdManifestLoadedEvent extends Event {\n /**\n * The {@link AdBreak} this event is related to.\n */\n adBreak?: AdBreak;\n /**\n * The {@link AdConfig} of the loaded ad manifest.\n */\n adConfig?: AdConfig;\n /**\n * How long it took for the ad tag to be downloaded in milliseconds.\n */\n downloadTime: number;\n}\n\n/**\n * Emitted when current video download quality has changed.\n */\nexport interface VideoDownloadQualityChangedEvent extends Event {\n /**\n * The new quality\n */\n newVideoQuality: VideoQuality;\n /**\n * The previous quality\n */\n oldVideoQuality: VideoQuality;\n}\n\n/**\n * Emitted when the current video playback quality has changed.\n */\nexport interface VideoPlaybackQualityChangedEvent extends Event {\n /**\n * The new quality\n */\n newVideoQuality: VideoQuality;\n /**\n * The previous quality\n */\n oldVideoQuality: VideoQuality;\n}\n\n/**\n * Emitted when casting to a cast-compatible device is available.\n */\nexport type CastAvailableEvent = Event;\n\n/**\n * Emitted when the playback on a cast-compatible device was paused.\n *\n * On Android {@link PausedEvent} is also emitted while casting.\n */\nexport type CastPausedEvent = Event;\n\n/**\n * Emitted when the playback on a cast-compatible device has finished.\n *\n * On Android {@link PlaybackFinishedEvent} is also emitted while casting.\n */\nexport type CastPlaybackFinishedEvent = Event;\n\n/**\n * Emitted when playback on a cast-compatible device has started.\n *\n * On Android {@link PlayingEvent} is also emitted while casting.\n */\nexport type CastPlayingEvent = Event;\n\n/**\n * Emitted when the cast app is launched successfully.\n */\nexport interface CastStartedEvent extends Event {\n /**\n * The name of the cast device on which the app was launched.\n */\n deviceName: string | null;\n}\n\n/**\n * Emitted when casting is initiated, but the user still needs to choose which device should be used.\n */\nexport type CastStartEvent = Event;\n\n/**\n * Emitted when casting to a cast-compatible device is stopped.\n */\nexport type CastStoppedEvent = Event;\n\n/**\n * Emitted when the time update from the currently used cast-compatible device is received.\n */\nexport type CastTimeUpdatedEvent = Event;\n\n/**\n * Contains information for the {@link CastWaitingForDeviceEvent}.\n */\nexport interface CastPayload {\n /**\n * The current time in seconds.\n */\n currentTime: number;\n /**\n * The name of the chosen cast device.\n */\n deviceName: string | null;\n /**\n * The type of the payload (always `\"cast\"`).\n */\n type: string;\n}\n\n/**\n * Emitted when a cast-compatible device has been chosen and the player is waiting for the device to get ready for\n * playback.\n */\nexport interface CastWaitingForDeviceEvent extends Event {\n /**\n * The {@link CastPayload} object for the event\n */\n castPayload: CastPayload;\n}\n\n/**\n * Emitted when a download was finished.\n */\nexport interface DownloadFinishedEvent extends Event {\n /**\n * The time needed to finish the request, in seconds.\n */\n downloadTime: number;\n /**\n * Which type of request this was.\n */\n requestType: HttpRequestType;\n /**\n * The HTTP status code of the request.\n * If opening the connection failed, a value of `0` is returned.\n */\n httpStatus: number;\n /**\n * If the download was successful.\n */\n isSuccess: boolean;\n /**\n * The last redirect location, or `null` if no redirect happened.\n */\n lastRedirectLocation?: string;\n /**\n * The size of the downloaded data, in bytes.\n */\n size: number;\n /**\n * The URL of the request.\n */\n url: string;\n}\n\n/**\n * Emitted when the player transitions from one playback speed to another.\n * @platform iOS, tvOS\n */\nexport interface PlaybackSpeedChangedEvent extends Event {\n /**\n * The playback speed before the change happened.\n */\n from: number;\n /**\n * The playback speed after the change happened.\n */\n to: number;\n}\n\n/**\n * Emitted when a subtitle entry transitions into the active status.\n */\nexport interface CueEnterEvent extends Event {\n /**\n * The playback time in seconds when the subtitle should be rendered.\n */\n start: number;\n /**\n * The playback time in seconds when the subtitle should be hidden.\n */\n end: number;\n /**\n * The textual content of this subtitle.\n */\n text?: string;\n /**\n * Data URI for image data of this subtitle.\n */\n image?: string;\n}\n\n/**\n * Emitted when an active subtitle entry transitions into the inactive status.\n */\nexport interface CueExitEvent extends Event {\n /**\n * The playback time in seconds when the subtitle should be rendered.\n */\n start: number;\n /**\n * The playback time in seconds when the subtitle should be hidden.\n */\n end: number;\n /**\n * The textual content of this subtitle.\n */\n text?: string;\n /**\n * Data URI for image data of this subtitle.\n */\n image?: string;\n}\n"]}
package/build/media.d.ts CHANGED
@@ -81,5 +81,9 @@ export interface AudioQuality {
81
81
  * The codec of the media quality.
82
82
  */
83
83
  codec?: string;
84
+ /**
85
+ * The number of audio channels or -1 if unknown.
86
+ */
87
+ channelCount?: number;
84
88
  }
85
89
  //# sourceMappingURL=media.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;OAYG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;OAYG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"media.js","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Quality definition of a video representation.\n */\nexport interface VideoQuality {\n /**\n * The id of the media quality.\n */\n id: string;\n /**\n * The label of the media quality that should be exposed to the user.\n */\n label?: string;\n /**\n * The bitrate of the media quality.\n */\n bitrate?: number;\n /**\n * The codec of the media quality.\n */\n codec?: string;\n /**\n * The frame rate of the video quality. If the frame rate is not known or not applicable a value of -1 will be returned.\n */\n frameRate?: number;\n /**\n * The height of the video quality.\n */\n height?: number;\n /**\n * The width of the video quality.\n */\n width?: number;\n}\n\n/**\n * Quality definition of an audio representation.\n *\n * @platform Android\n */\nexport interface AudioQuality {\n /**\n * The id of the media quality.\n */\n id: string;\n /**\n * The label of the media quality that should be exposed to the user.\n */\n label?: string;\n /**\n * The bitrate in bits per second. This is the peak bitrate if known, or else the average bitrate\n * if known, or else -1.\n */\n bitrate?: number;\n /**\n * The average bitrate in bits per second, or -1 if unknown or not applicable. The\n * way in which this field is populated depends on the type of media to which the format\n * corresponds:\n *\n * - DASH representations: Always -1.\n * - HLS variants: The `AVERAGE-BANDWIDTH` attribute defined on the corresponding\n * `EXT-X-STREAM-INF` tag in the multivariant playlist, or -1 if not present.\n * - SmoothStreaming track elements: The `Bitrate` attribute defined on the\n * corresponding `TrackElement` in the manifest, or -1 if not present.\n * - Progressive container formats: Often -1, but may be populated with\n * the average bitrate of the container if known.\n */\n averageBitrate?: number;\n /**\n * The peak bitrate in bits per second, or -1 if unknown or not applicable. The way\n * in which this field is populated depends on the type of media to which the format corresponds:\n *\n * - DASH representations: The `@bandwidth` attribute of the corresponding\n * `Representation` element in the manifest.\n * - HLS variants: The `BANDWIDTH` attribute defined on the corresponding\n * `EXT-X-STREAM-INF` tag.\n * - SmoothStreaming track elements: Always -1.\n * - Progressive container formats: Often -1, but may be populated with\n * the peak bitrate of the container if known.\n */\n peakBitrate?: number;\n /**\n * The codec of the media quality.\n */\n codec?: string;\n}\n"]}
1
+ {"version":3,"file":"media.js","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Quality definition of a video representation.\n */\nexport interface VideoQuality {\n /**\n * The id of the media quality.\n */\n id: string;\n /**\n * The label of the media quality that should be exposed to the user.\n */\n label?: string;\n /**\n * The bitrate of the media quality.\n */\n bitrate?: number;\n /**\n * The codec of the media quality.\n */\n codec?: string;\n /**\n * The frame rate of the video quality. If the frame rate is not known or not applicable a value of -1 will be returned.\n */\n frameRate?: number;\n /**\n * The height of the video quality.\n */\n height?: number;\n /**\n * The width of the video quality.\n */\n width?: number;\n}\n\n/**\n * Quality definition of an audio representation.\n *\n * @platform Android\n */\nexport interface AudioQuality {\n /**\n * The id of the media quality.\n */\n id: string;\n /**\n * The label of the media quality that should be exposed to the user.\n */\n label?: string;\n /**\n * The bitrate in bits per second. This is the peak bitrate if known, or else the average bitrate\n * if known, or else -1.\n */\n bitrate?: number;\n /**\n * The average bitrate in bits per second, or -1 if unknown or not applicable. The\n * way in which this field is populated depends on the type of media to which the format\n * corresponds:\n *\n * - DASH representations: Always -1.\n * - HLS variants: The `AVERAGE-BANDWIDTH` attribute defined on the corresponding\n * `EXT-X-STREAM-INF` tag in the multivariant playlist, or -1 if not present.\n * - SmoothStreaming track elements: The `Bitrate` attribute defined on the\n * corresponding `TrackElement` in the manifest, or -1 if not present.\n * - Progressive container formats: Often -1, but may be populated with\n * the average bitrate of the container if known.\n */\n averageBitrate?: number;\n /**\n * The peak bitrate in bits per second, or -1 if unknown or not applicable. The way\n * in which this field is populated depends on the type of media to which the format corresponds:\n *\n * - DASH representations: The `@bandwidth` attribute of the corresponding\n * `Representation` element in the manifest.\n * - HLS variants: The `BANDWIDTH` attribute defined on the corresponding\n * `EXT-X-STREAM-INF` tag.\n * - SmoothStreaming track elements: Always -1.\n * - Progressive container formats: Often -1, but may be populated with\n * the peak bitrate of the container if known.\n */\n peakBitrate?: number;\n /**\n * The codec of the media quality.\n */\n codec?: string;\n /**\n * The number of audio channels or -1 if unknown.\n */\n channelCount?: number;\n}\n"]}
@@ -1,5 +1,12 @@
1
1
  import { NativeModule } from 'expo-modules-core';
2
- export type PlayerModuleEvents = Record<string, any>;
2
+ import { ImaSettings } from '../advertising';
3
+ export type PlayerModuleEvents = {
4
+ onImaBeforeInitialization: ({ nativeId, id, settings, }: {
5
+ nativeId: string;
6
+ id: number;
7
+ settings: ImaSettings;
8
+ }) => void;
9
+ };
3
10
  declare class PlayerModule extends NativeModule<PlayerModuleEvents> {
4
11
  /**
5
12
  * Call .play() on nativeId's player.
@@ -117,6 +124,10 @@ declare class PlayerModule extends NativeModule<PlayerModuleEvents> {
117
124
  * Skip current ad for nativeId's player.
118
125
  */
119
126
  skipAd(nativeId: string): Promise<void>;
127
+ /**
128
+ * Applies the JS-updated IMA settings for a before-initialization callback.
129
+ */
130
+ setPreparedImaSettings(id: number, settings: ImaSettings): Promise<void>;
120
131
  /**
121
132
  * Check if player can play at specified playback speed (iOS only).
122
133
  */
@@ -1 +1 @@
1
- {"version":3,"file":"PlayerModule.d.ts","sourceRoot":"","sources":["../../src/modules/PlayerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,mBAAmB,CAAC;AAEtE,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAErD,OAAO,OAAO,YAAa,SAAQ,YAAY,CAAC,kBAAkB,CAAC;IACjE;;OAEG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAErC;;OAEG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAEtC;;OAEG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAErC;;OAEG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAEvC;;OAEG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAEnD;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAE1D;;OAEG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAExC;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAE1D;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAEnD;;OAEG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,IAA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IAAI,CAAC;IAE1E;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC;IAEjE;;OAEG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC;IAEtD;;OAEG;IACH,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAE5D;;OAEG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CACpE;;AAED,wBAAiE"}
@@ -1 +1 @@
1
- {"version":3,"file":"PlayerModule.js","sourceRoot":"","sources":["../../src/modules/PlayerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AA0PtE,eAAe,mBAAmB,CAAe,cAAc,CAAC,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo-modules-core';\n\nexport type PlayerModuleEvents = Record<string, any>;\n\ndeclare class PlayerModule extends NativeModule<PlayerModuleEvents> {\n /**\n * Call .play() on nativeId's player.\n */\n play(nativeId: string): Promise<void>;\n\n /**\n * Call .pause() on nativeId's player.\n */\n pause(nativeId: string): Promise<void>;\n\n /**\n * Call .mute() on nativeId's player.\n */\n mute(nativeId: string): Promise<void>;\n\n /**\n * Call .unmute() on nativeId's player.\n */\n unmute(nativeId: string): Promise<void>;\n\n /**\n * Call .seek(time) on nativeId's player.\n */\n seek(nativeId: string, time: number): Promise<void>;\n\n /**\n * Sets timeShift on nativeId's player.\n */\n timeShift(nativeId: string, offset: number): Promise<void>;\n\n /**\n * Call .destroy() on nativeId's player and remove from registry.\n */\n destroy(nativeId: string): Promise<void>;\n\n /**\n * Call .setVolume(volume) on nativeId's player.\n */\n setVolume(nativeId: string, volume: number): Promise<void>;\n\n /**\n * Resolve nativeId's current volume.\n */\n getVolume(nativeId: string): Promise<number | null>;\n\n /**\n * Resolve nativeId's current time.\n */\n currentTime(nativeId: string, mode?: string): Promise<number | null>;\n\n /**\n * Resolve nativeId's current playing state.\n */\n isPlaying(nativeId: string): Promise<boolean | null>;\n\n /**\n * Resolve nativeId's current paused state.\n */\n isPaused(nativeId: string): Promise<boolean | null>;\n\n /**\n * Resolve nativeId's active source duration.\n */\n duration(nativeId: string): Promise<number | null>;\n\n /**\n * Resolve nativeId's current muted state.\n */\n isMuted(nativeId: string): Promise<boolean | null>;\n\n /**\n * Call .unload() on nativeId's player.\n */\n unload(nativeId: string): Promise<void>;\n\n /**\n * Resolve nativeId's current time shift value.\n */\n getTimeShift(nativeId: string): Promise<number | null>;\n\n /**\n * Resolve nativeId's live stream state.\n */\n isLive(nativeId: string): Promise<boolean | null>;\n\n /**\n * Resolve nativeId's maximum time shift value.\n */\n getMaxTimeShift(nativeId: string): Promise<number | null>;\n\n /**\n * Resolve nativeId's current playback speed.\n */\n getPlaybackSpeed(nativeId: string): Promise<number | null>;\n\n /**\n * Set playback speed for nativeId's player.\n */\n setPlaybackSpeed(nativeId: string, playbackSpeed: number): Promise<void>;\n\n /**\n * Resolve nativeId's current ad state.\n */\n isAd(nativeId: string): Promise<boolean | null>;\n\n /**\n * Set maximum selectable bitrate for nativeId's player.\n */\n setMaxSelectableBitrate(nativeId: string, maxBitrate: number): Promise<void>;\n\n /**\n * Resolve nativeId's AirPlay activation state (iOS only).\n */\n isAirPlayActive(nativeId: string): Promise<boolean | null>;\n\n /**\n * Resolve nativeId's AirPlay availability state (iOS only).\n */\n isAirPlayAvailable(nativeId: string): Promise<boolean | null>;\n\n /**\n * Resolve nativeId's cast availability state.\n */\n isCastAvailable(nativeId: string): Promise<boolean | null>;\n\n /**\n * Resolve nativeId's current casting state.\n */\n isCasting(nativeId: string): Promise<boolean | null>;\n\n /**\n * Initiate casting for nativeId's player.\n */\n castVideo(nativeId: string): Promise<void>;\n\n /**\n * Stop casting for nativeId's player.\n */\n castStop(nativeId: string): Promise<void>;\n\n /**\n * Skip current ad for nativeId's player.\n */\n skipAd(nativeId: string): Promise<void>;\n\n /**\n * Check if player can play at specified playback speed (iOS only).\n */\n canPlayAtPlaybackSpeed(\n nativeId: string,\n playbackSpeed: number\n ): Promise<boolean | null>;\n\n /**\n * Creates a new Player instance using the provided config.\n */\n initializeWithConfig(\n nativeId: string,\n config?: Record<string, any>,\n networkNativeId?: string,\n decoderNativeId?: string\n ): Promise<void>;\n\n /**\n * Creates a new analytics-enabled Player instance.\n */\n initializeWithAnalyticsConfig(\n nativeId: string,\n analyticsConfig: Record<string, any>,\n config?: Record<string, any>,\n networkNativeId?: string,\n decoderNativeId?: string\n ): Promise<void>;\n\n /**\n * Load source into the player.\n * Requires SourceModule dependency.\n */\n loadSource(nativeId: string, sourceNativeId: string): Promise<void>;\n\n /**\n * Load offline content into the player.\n */\n loadOfflineContent(\n nativeId: string,\n offlineContentId: string,\n options?: Record<string, any>\n ): Promise<void>;\n\n /**\n * Get current audio track.\n */\n getAudioTrack(nativeId: string): Promise<any | null>;\n\n /**\n * Get available audio tracks.\n */\n getAvailableAudioTracks(nativeId: string): Promise<any[]>;\n\n /**\n * Set audio track.\n */\n setAudioTrack(nativeId: string, trackId: string): Promise<void>;\n\n /**\n * Get current subtitle track.\n */\n getSubtitleTrack(nativeId: string): Promise<any | null>;\n\n /**\n * Get available subtitle tracks.\n */\n getAvailableSubtitles(nativeId: string): Promise<any[]>;\n\n /**\n * Set subtitle track.\n */\n setSubtitleTrack(nativeId: string, trackId: string): Promise<void>;\n\n /**\n * Schedule an ad.\n */\n scheduleAd(nativeId: string, adConfig: Record<string, any>): Promise<void>;\n\n /**\n * Get thumbnail for time position.\n */\n getThumbnail(nativeId: string, time: number): Promise<any | null>;\n\n /**\n * Get current video quality.\n */\n getVideoQuality(nativeId: string): Promise<any | null>;\n\n /**\n * Get available video qualities.\n */\n getAvailableVideoQualities(nativeId: string): Promise<any[]>;\n\n /**\n * Set video quality.\n */\n setVideoQuality(nativeId: string, qualityId: string): Promise<void>;\n}\n\nexport default requireNativeModule<PlayerModule>('PlayerModule');\n"]}
1
+ {"version":3,"file":"PlayerModule.js","sourceRoot":"","sources":["../../src/modules/PlayerModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AA0QtE,eAAe,mBAAmB,CAAe,cAAc,CAAC,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from 'expo-modules-core';\nimport { ImaSettings } from '../advertising';\n\nexport type PlayerModuleEvents = {\n onImaBeforeInitialization: ({\n nativeId,\n id,\n settings,\n }: {\n nativeId: string;\n id: number;\n settings: ImaSettings;\n }) => void;\n};\n\ndeclare class PlayerModule extends NativeModule<PlayerModuleEvents> {\n /**\n * Call .play() on nativeId's player.\n */\n play(nativeId: string): Promise<void>;\n\n /**\n * Call .pause() on nativeId's player.\n */\n pause(nativeId: string): Promise<void>;\n\n /**\n * Call .mute() on nativeId's player.\n */\n mute(nativeId: string): Promise<void>;\n\n /**\n * Call .unmute() on nativeId's player.\n */\n unmute(nativeId: string): Promise<void>;\n\n /**\n * Call .seek(time) on nativeId's player.\n */\n seek(nativeId: string, time: number): Promise<void>;\n\n /**\n * Sets timeShift on nativeId's player.\n */\n timeShift(nativeId: string, offset: number): Promise<void>;\n\n /**\n * Call .destroy() on nativeId's player and remove from registry.\n */\n destroy(nativeId: string): Promise<void>;\n\n /**\n * Call .setVolume(volume) on nativeId's player.\n */\n setVolume(nativeId: string, volume: number): Promise<void>;\n\n /**\n * Resolve nativeId's current volume.\n */\n getVolume(nativeId: string): Promise<number | null>;\n\n /**\n * Resolve nativeId's current time.\n */\n currentTime(nativeId: string, mode?: string): Promise<number | null>;\n\n /**\n * Resolve nativeId's current playing state.\n */\n isPlaying(nativeId: string): Promise<boolean | null>;\n\n /**\n * Resolve nativeId's current paused state.\n */\n isPaused(nativeId: string): Promise<boolean | null>;\n\n /**\n * Resolve nativeId's active source duration.\n */\n duration(nativeId: string): Promise<number | null>;\n\n /**\n * Resolve nativeId's current muted state.\n */\n isMuted(nativeId: string): Promise<boolean | null>;\n\n /**\n * Call .unload() on nativeId's player.\n */\n unload(nativeId: string): Promise<void>;\n\n /**\n * Resolve nativeId's current time shift value.\n */\n getTimeShift(nativeId: string): Promise<number | null>;\n\n /**\n * Resolve nativeId's live stream state.\n */\n isLive(nativeId: string): Promise<boolean | null>;\n\n /**\n * Resolve nativeId's maximum time shift value.\n */\n getMaxTimeShift(nativeId: string): Promise<number | null>;\n\n /**\n * Resolve nativeId's current playback speed.\n */\n getPlaybackSpeed(nativeId: string): Promise<number | null>;\n\n /**\n * Set playback speed for nativeId's player.\n */\n setPlaybackSpeed(nativeId: string, playbackSpeed: number): Promise<void>;\n\n /**\n * Resolve nativeId's current ad state.\n */\n isAd(nativeId: string): Promise<boolean | null>;\n\n /**\n * Set maximum selectable bitrate for nativeId's player.\n */\n setMaxSelectableBitrate(nativeId: string, maxBitrate: number): Promise<void>;\n\n /**\n * Resolve nativeId's AirPlay activation state (iOS only).\n */\n isAirPlayActive(nativeId: string): Promise<boolean | null>;\n\n /**\n * Resolve nativeId's AirPlay availability state (iOS only).\n */\n isAirPlayAvailable(nativeId: string): Promise<boolean | null>;\n\n /**\n * Resolve nativeId's cast availability state.\n */\n isCastAvailable(nativeId: string): Promise<boolean | null>;\n\n /**\n * Resolve nativeId's current casting state.\n */\n isCasting(nativeId: string): Promise<boolean | null>;\n\n /**\n * Initiate casting for nativeId's player.\n */\n castVideo(nativeId: string): Promise<void>;\n\n /**\n * Stop casting for nativeId's player.\n */\n castStop(nativeId: string): Promise<void>;\n\n /**\n * Skip current ad for nativeId's player.\n */\n skipAd(nativeId: string): Promise<void>;\n\n /**\n * Applies the JS-updated IMA settings for a before-initialization callback.\n */\n setPreparedImaSettings(id: number, settings: ImaSettings): Promise<void>;\n\n /**\n * Check if player can play at specified playback speed (iOS only).\n */\n canPlayAtPlaybackSpeed(\n nativeId: string,\n playbackSpeed: number\n ): Promise<boolean | null>;\n\n /**\n * Creates a new Player instance using the provided config.\n */\n initializeWithConfig(\n nativeId: string,\n config?: Record<string, any>,\n networkNativeId?: string,\n decoderNativeId?: string\n ): Promise<void>;\n\n /**\n * Creates a new analytics-enabled Player instance.\n */\n initializeWithAnalyticsConfig(\n nativeId: string,\n analyticsConfig: Record<string, any>,\n config?: Record<string, any>,\n networkNativeId?: string,\n decoderNativeId?: string\n ): Promise<void>;\n\n /**\n * Load source into the player.\n * Requires SourceModule dependency.\n */\n loadSource(nativeId: string, sourceNativeId: string): Promise<void>;\n\n /**\n * Load offline content into the player.\n */\n loadOfflineContent(\n nativeId: string,\n offlineContentId: string,\n options?: Record<string, any>\n ): Promise<void>;\n\n /**\n * Get current audio track.\n */\n getAudioTrack(nativeId: string): Promise<any | null>;\n\n /**\n * Get available audio tracks.\n */\n getAvailableAudioTracks(nativeId: string): Promise<any[]>;\n\n /**\n * Set audio track.\n */\n setAudioTrack(nativeId: string, trackId: string): Promise<void>;\n\n /**\n * Get current subtitle track.\n */\n getSubtitleTrack(nativeId: string): Promise<any | null>;\n\n /**\n * Get available subtitle tracks.\n */\n getAvailableSubtitles(nativeId: string): Promise<any[]>;\n\n /**\n * Set subtitle track.\n */\n setSubtitleTrack(nativeId: string, trackId: string): Promise<void>;\n\n /**\n * Schedule an ad.\n */\n scheduleAd(nativeId: string, adConfig: Record<string, any>): Promise<void>;\n\n /**\n * Get thumbnail for time position.\n */\n getThumbnail(nativeId: string, time: number): Promise<any | null>;\n\n /**\n * Get current video quality.\n */\n getVideoQuality(nativeId: string): Promise<any | null>;\n\n /**\n * Get available video qualities.\n */\n getAvailableVideoQualities(nativeId: string): Promise<any[]>;\n\n /**\n * Set video quality.\n */\n setVideoQuality(nativeId: string, qualityId: string): Promise<void>;\n}\n\nexport default requireNativeModule<PlayerModule>('PlayerModule');\n"]}
@@ -2,7 +2,7 @@ import { NativeInstanceConfig } from '../nativeInstance';
2
2
  import { SourceConfig } from '../source';
3
3
  /**
4
4
  * Object used to configure a new `OfflineContentManager` instance.
5
- * @remarks Platform: Android, iOS
5
+ * @platform Android, iOS
6
6
  */
7
7
  export interface OfflineContentConfig extends NativeInstanceConfig {
8
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"offlineContentConfig.js","sourceRoot":"","sources":["../../src/offline/offlineContentConfig.ts"],"names":[],"mappings":"","sourcesContent":["import { NativeInstanceConfig } from '../nativeInstance';\nimport { SourceConfig } from '../source';\n\n/**\n * Object used to configure a new `OfflineContentManager` instance.\n * @remarks Platform: Android, iOS\n */\nexport interface OfflineContentConfig extends NativeInstanceConfig {\n /**\n * An identifier for this source that is unique within the location and must never change.\n * The root folder will contain a folder based on this id.\n */\n identifier: string;\n /**\n * The `SourceConfig` used to download the offline resources.\n */\n sourceConfig: SourceConfig;\n}\n"]}
1
+ {"version":3,"file":"offlineContentConfig.js","sourceRoot":"","sources":["../../src/offline/offlineContentConfig.ts"],"names":[],"mappings":"","sourcesContent":["import { NativeInstanceConfig } from '../nativeInstance';\nimport { SourceConfig } from '../source';\n\n/**\n * Object used to configure a new `OfflineContentManager` instance.\n * @platform Android, iOS\n */\nexport interface OfflineContentConfig extends NativeInstanceConfig {\n /**\n * An identifier for this source that is unique within the location and must never change.\n * The root folder will contain a folder based on this id.\n */\n identifier: string;\n /**\n * The `SourceConfig` used to download the offline resources.\n */\n sourceConfig: SourceConfig;\n}\n"]}
@@ -8,7 +8,7 @@ import { OfflineState } from './offlineState';
8
8
  * without an active network connection. An OfflineContentManager instance can be created via
9
9
  * the constructor and will be idle until initialized.
10
10
  *
11
- * @remarks Platform: Android, iOS
11
+ * @platform Android, iOS
12
12
  */
13
13
  export declare class OfflineContentManager extends NativeInstance<OfflineContentConfig> {
14
14
  isInitialized: boolean;
@@ -77,7 +77,7 @@ export declare class OfflineContentManager extends NativeInstance<OfflineContent
77
77
  * When finished successfully data will be passed to the `OfflineContentManagerListener.onDrmLicenseUpdated`.
78
78
  * Errors are transmitted to the `OfflineContentManagerListener.onError`.
79
79
  *
80
- * @remarks Platform: Android
80
+ * @platform Android
81
81
  */
82
82
  releaseLicense: () => Promise<void>;
83
83
  /**
@@ -40,7 +40,7 @@ const handleBitmovinNativeOfflineEvent = (data, listeners) => {
40
40
  * without an active network connection. An OfflineContentManager instance can be created via
41
41
  * the constructor and will be idle until initialized.
42
42
  *
43
- * @remarks Platform: Android, iOS
43
+ * @platform Android, iOS
44
44
  */
45
45
  export class OfflineContentManager extends NativeInstance {
46
46
  isInitialized = false;
@@ -160,7 +160,7 @@ export class OfflineContentManager extends NativeInstance {
160
160
  * When finished successfully data will be passed to the `OfflineContentManagerListener.onDrmLicenseUpdated`.
161
161
  * Errors are transmitted to the `OfflineContentManagerListener.onError`.
162
162
  *
163
- * @remarks Platform: Android
163
+ * @platform Android
164
164
  */
165
165
  releaseLicense = async () => {
166
166
  return OfflineModule.releaseLicense(this.nativeId);
@@ -1 +1 @@
1
- {"version":3,"file":"offlineContentManager.js","sourceRoot":"","sources":["../../src/offline/offlineContentManager.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAGL,gBAAgB,GACjB,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,gCAAgC,GAAG,CACvC,IAAoC,EACpC,SAA6C,EAC7C,EAAE;IACF,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC7B,IAAI,CAAC,QAAQ;YAAE,OAAO;QAEtB,IAAI,IAAI,CAAC,SAAS,KAAK,gBAAgB,CAAC,WAAW,EAAE,CAAC;YACpD,QAAQ,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;aAAM,IAAI,IAAI,CAAC,SAAS,KAAK,gBAAgB,CAAC,OAAO,EAAE,CAAC;YACvD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Aa,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrD,CAAC,CAAC;IAEF;;OAEG;IACH,WAAW,GAAG,KAAK,IAAqB,EAAE;QACxC,OAAO,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAClD,CAAC,CAAC;IAEF;;OAEG;IACH,SAAS,GAAG,KAAK,IAAmB,EAAE;QACpC,OAAO,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC,CAAC;IAEF;;;;OAIG;IACH,eAAe,GAAG,KAAK,IAAmB,EAAE;QAC1C,OAAO,aAAa,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtD,CAAC,CAAC;IAEF;;;;;;OAMG;IACH,cAAc,GAAG,KAAK,IAAmB,EAAE;QACzC,OAAO,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrD,CAAC,CAAC;IAEF;;;;OAIG;IACH,mBAAmB,GAAG,KAAK,IAAmB,EAAE;QAC9C,OAAO,aAAa,CAAC,mBAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1D,CAAC,CAAC;CACH","sourcesContent":["import { EventSubscription } from 'expo-modules-core';\nimport NativeInstance from '../nativeInstance';\nimport {\n BitmovinNativeOfflineEventData,\n OfflineContentManagerListener,\n OfflineEventType,\n} from './offlineContentManagerListener';\nimport { OfflineContentConfig } from './offlineContentConfig';\nimport { OfflineDownloadRequest } from './offlineDownloadRequest';\nimport { OfflineState } from './offlineState';\nimport { Drm } from '../drm';\nimport OfflineModule from './offlineModule';\n\nconst handleBitmovinNativeOfflineEvent = (\n data: BitmovinNativeOfflineEventData,\n listeners: Set<OfflineContentManagerListener>\n) => {\n listeners.forEach((listener) => {\n if (!listener) return;\n\n if (data.eventType === OfflineEventType.onCompleted) {\n listener.onCompleted?.(data);\n } else if (data.eventType === OfflineEventType.onError) {\n listener.onError?.(data);\n } else if (data.eventType === OfflineEventType.onProgress) {\n listener.onProgress?.(data);\n } else if (data.eventType === OfflineEventType.onOptionsAvailable) {\n listener.onOptionsAvailable?.(data);\n } else if (data.eventType === OfflineEventType.onDrmLicenseUpdated) {\n listener.onDrmLicenseUpdated?.(data);\n } else if (data.eventType === OfflineEventType.onDrmLicenseExpired) {\n listener.onDrmLicenseExpired?.(data);\n } else if (data.eventType === OfflineEventType.onSuspended) {\n listener.onSuspended?.(data);\n } else if (data.eventType === OfflineEventType.onResumed) {\n listener.onResumed?.(data);\n } else if (data.eventType === OfflineEventType.onCanceled) {\n listener.onCanceled?.(data);\n }\n });\n};\n\n/**\n * Provides the means to download and store sources locally that can be played back with a Player\n * without an active network connection. An OfflineContentManager instance can be created via\n * the constructor and will be idle until initialized.\n *\n * @remarks Platform: Android, iOS\n */\nexport class OfflineContentManager extends NativeInstance<OfflineContentConfig> {\n isInitialized = false;\n isDestroyed = false;\n private eventSubscription?: EventSubscription;\n private listeners: Set<OfflineContentManagerListener> =\n new Set<OfflineContentManagerListener>();\n private drm?: Drm;\n\n /**\n * Allocates the native `OfflineManager` instance and its resources natively.\n * Registers the `DeviceEventEmitter` listener to receive data from the native `OfflineContentManagerListener` callbacks\n */\n initialize = async (): Promise<void> => {\n if (!this.isInitialized && this.config) {\n this.eventSubscription = OfflineModule.addListener(\n 'onBitmovinOfflineEvent',\n (event: BitmovinNativeOfflineEventData) => {\n if (this.nativeId !== event.nativeId) {\n return;\n }\n\n handleBitmovinNativeOfflineEvent(event, this.listeners);\n }\n );\n\n if (this.config.sourceConfig.drmConfig) {\n this.drm = new Drm(this.config.sourceConfig.drmConfig);\n await this.drm.initialize();\n }\n\n await OfflineModule.initializeWithConfig(\n this.nativeId,\n {\n identifier: this.config.identifier,\n sourceConfig: this.config.sourceConfig,\n },\n this.drm?.nativeId\n );\n }\n\n this.isInitialized = true;\n return Promise.resolve();\n };\n\n /**\n * Adds a listener to the receive data from the native `OfflineContentManagerListener` callbacks\n * Returns a function that removes this listener from the `OfflineContentManager` that registered it.\n */\n addListener = (listener: OfflineContentManagerListener): (() => void) => {\n this.listeners.add(listener);\n\n return () => {\n this.listeners.delete(listener);\n };\n };\n\n /**\n * Destroys the native `OfflineManager` and releases all of its allocated resources.\n */\n destroy = async (): Promise<void> => {\n if (!this.isDestroyed) {\n this.isDestroyed = true;\n this.eventSubscription?.remove?.();\n this.listeners.clear();\n this.drm?.destroy();\n\n return OfflineModule.release(this.nativeId);\n }\n\n return Promise.resolve();\n };\n\n /**\n * Gets the current state of the `OfflineContentManager`\n */\n state = async (): Promise<OfflineState> => {\n return OfflineModule.getState(this.nativeId) as Promise<OfflineState>;\n };\n\n /**\n * Loads the current `OfflineContentOptions`.\n * When the options are loaded the data will be passed to the `OfflineContentManagerListener.onOptionsAvailable`.\n */\n getOptions = async (): Promise<void> => {\n return OfflineModule.getOptions(this.nativeId);\n };\n\n /**\n * Enqueues downloads according to the `OfflineDownloadRequest`.\n * The promise will reject in the event of null or invalid request parameters.\n * The promise will reject when calling this method when download has already started or is completed.\n * The promise will resolve when the download has been queued. The download will is not finished when the promise resolves.\n */\n download = async (request: OfflineDownloadRequest): Promise<void> => {\n return OfflineModule.download(this.nativeId, request);\n };\n\n /**\n * Resumes all suspended actions.\n */\n resume = async (): Promise<void> => {\n return OfflineModule.resume(this.nativeId);\n };\n\n /**\n * Suspends all active actions.\n */\n suspend = async (): Promise<void> => {\n return OfflineModule.suspend(this.nativeId);\n };\n\n /**\n * Cancels and deletes the active download.\n */\n cancelDownload = async (): Promise<void> => {\n return OfflineModule.cancelDownload(this.nativeId);\n };\n\n /**\n * Resolves how many bytes of storage are used by the offline content.\n */\n usedStorage = async (): Promise<number> => {\n return OfflineModule.usedStorage(this.nativeId);\n };\n\n /**\n * Deletes everything related to the related content ID.\n */\n deleteAll = async (): Promise<void> => {\n return OfflineModule.deleteAll(this.nativeId);\n };\n\n /**\n * Downloads the offline license.\n * When finished successfully, data will be passed to the `OfflineContentManagerListener.onDrmLicenseUpdated`.\n * Errors are transmitted to the `OfflineContentManagerListener.onError`.\n */\n downloadLicense = async (): Promise<void> => {\n return OfflineModule.downloadLicense(this.nativeId);\n };\n\n /**\n * Releases the currently held offline license.\n * When finished successfully data will be passed to the `OfflineContentManagerListener.onDrmLicenseUpdated`.\n * Errors are transmitted to the `OfflineContentManagerListener.onError`.\n *\n * @remarks Platform: Android\n */\n releaseLicense = async (): Promise<void> => {\n return OfflineModule.releaseLicense(this.nativeId);\n };\n\n /**\n * Renews the already downloaded DRM license.\n * When finished successfully data will be passed to the `OfflineContentManagerListener.onDrmLicenseUpdated`.\n * Errors are transmitted to the `OfflineContentManagerListener.onError`.\n */\n renewOfflineLicense = async (): Promise<void> => {\n return OfflineModule.renewOfflineLicense(this.nativeId);\n };\n}\n"]}
1
+ {"version":3,"file":"offlineContentManager.js","sourceRoot":"","sources":["../../src/offline/offlineContentManager.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAGL,gBAAgB,GACjB,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,gCAAgC,GAAG,CACvC,IAAoC,EACpC,SAA6C,EAC7C,EAAE;IACF,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC7B,IAAI,CAAC,QAAQ;YAAE,OAAO;QAEtB,IAAI,IAAI,CAAC,SAAS,KAAK,gBAAgB,CAAC,WAAW,EAAE,CAAC;YACpD,QAAQ,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;aAAM,IAAI,IAAI,CAAC,SAAS,KAAK,gBAAgB,CAAC,OAAO,EAAE,CAAC;YACvD,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;aAAM,IAAI,IAAI,CAAC,SAAS,KAA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AG,KAAK,IAAqB,EAAE;QACxC,OAAO,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAClD,CAAC,CAAC;IAEF;;OAEG;IACH,SAAS,GAAG,KAAK,IAAmB,EAAE;QACpC,OAAO,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC,CAAC;IAEF;;;;OAIG;IACH,eAAe,GAAG,KAAK,IAAmB,EAAE;QAC1C,OAAO,aAAa,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtD,CAAC,CAAC;IAEF;;;;;;OAMG;IACH,cAAc,GAAG,KAAK,IAAmB,EAAE;QACzC,OAAO,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrD,CAAC,CAAC;IAEF;;;;OAIG;IACH,mBAAmB,GAAG,KAAK,IAAmB,EAAE;QAC9C,OAAO,aAAa,CAAC,mBAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1D,CAAC,CAAC;CACH","sourcesContent":["import { EventSubscription } from 'expo-modules-core';\nimport NativeInstance from '../nativeInstance';\nimport {\n BitmovinNativeOfflineEventData,\n OfflineContentManagerListener,\n OfflineEventType,\n} from './offlineContentManagerListener';\nimport { OfflineContentConfig } from './offlineContentConfig';\nimport { OfflineDownloadRequest } from './offlineDownloadRequest';\nimport { OfflineState } from './offlineState';\nimport { Drm } from '../drm';\nimport OfflineModule from './offlineModule';\n\nconst handleBitmovinNativeOfflineEvent = (\n data: BitmovinNativeOfflineEventData,\n listeners: Set<OfflineContentManagerListener>\n) => {\n listeners.forEach((listener) => {\n if (!listener) return;\n\n if (data.eventType === OfflineEventType.onCompleted) {\n listener.onCompleted?.(data);\n } else if (data.eventType === OfflineEventType.onError) {\n listener.onError?.(data);\n } else if (data.eventType === OfflineEventType.onProgress) {\n listener.onProgress?.(data);\n } else if (data.eventType === OfflineEventType.onOptionsAvailable) {\n listener.onOptionsAvailable?.(data);\n } else if (data.eventType === OfflineEventType.onDrmLicenseUpdated) {\n listener.onDrmLicenseUpdated?.(data);\n } else if (data.eventType === OfflineEventType.onDrmLicenseExpired) {\n listener.onDrmLicenseExpired?.(data);\n } else if (data.eventType === OfflineEventType.onSuspended) {\n listener.onSuspended?.(data);\n } else if (data.eventType === OfflineEventType.onResumed) {\n listener.onResumed?.(data);\n } else if (data.eventType === OfflineEventType.onCanceled) {\n listener.onCanceled?.(data);\n }\n });\n};\n\n/**\n * Provides the means to download and store sources locally that can be played back with a Player\n * without an active network connection. An OfflineContentManager instance can be created via\n * the constructor and will be idle until initialized.\n *\n * @platform Android, iOS\n */\nexport class OfflineContentManager extends NativeInstance<OfflineContentConfig> {\n isInitialized = false;\n isDestroyed = false;\n private eventSubscription?: EventSubscription;\n private listeners: Set<OfflineContentManagerListener> =\n new Set<OfflineContentManagerListener>();\n private drm?: Drm;\n\n /**\n * Allocates the native `OfflineManager` instance and its resources natively.\n * Registers the `DeviceEventEmitter` listener to receive data from the native `OfflineContentManagerListener` callbacks\n */\n initialize = async (): Promise<void> => {\n if (!this.isInitialized && this.config) {\n this.eventSubscription = OfflineModule.addListener(\n 'onBitmovinOfflineEvent',\n (event: BitmovinNativeOfflineEventData) => {\n if (this.nativeId !== event.nativeId) {\n return;\n }\n\n handleBitmovinNativeOfflineEvent(event, this.listeners);\n }\n );\n\n if (this.config.sourceConfig.drmConfig) {\n this.drm = new Drm(this.config.sourceConfig.drmConfig);\n await this.drm.initialize();\n }\n\n await OfflineModule.initializeWithConfig(\n this.nativeId,\n {\n identifier: this.config.identifier,\n sourceConfig: this.config.sourceConfig,\n },\n this.drm?.nativeId\n );\n }\n\n this.isInitialized = true;\n return Promise.resolve();\n };\n\n /**\n * Adds a listener to the receive data from the native `OfflineContentManagerListener` callbacks\n * Returns a function that removes this listener from the `OfflineContentManager` that registered it.\n */\n addListener = (listener: OfflineContentManagerListener): (() => void) => {\n this.listeners.add(listener);\n\n return () => {\n this.listeners.delete(listener);\n };\n };\n\n /**\n * Destroys the native `OfflineManager` and releases all of its allocated resources.\n */\n destroy = async (): Promise<void> => {\n if (!this.isDestroyed) {\n this.isDestroyed = true;\n this.eventSubscription?.remove?.();\n this.listeners.clear();\n this.drm?.destroy();\n\n return OfflineModule.release(this.nativeId);\n }\n\n return Promise.resolve();\n };\n\n /**\n * Gets the current state of the `OfflineContentManager`\n */\n state = async (): Promise<OfflineState> => {\n return OfflineModule.getState(this.nativeId) as Promise<OfflineState>;\n };\n\n /**\n * Loads the current `OfflineContentOptions`.\n * When the options are loaded the data will be passed to the `OfflineContentManagerListener.onOptionsAvailable`.\n */\n getOptions = async (): Promise<void> => {\n return OfflineModule.getOptions(this.nativeId);\n };\n\n /**\n * Enqueues downloads according to the `OfflineDownloadRequest`.\n * The promise will reject in the event of null or invalid request parameters.\n * The promise will reject when calling this method when download has already started or is completed.\n * The promise will resolve when the download has been queued. The download will is not finished when the promise resolves.\n */\n download = async (request: OfflineDownloadRequest): Promise<void> => {\n return OfflineModule.download(this.nativeId, request);\n };\n\n /**\n * Resumes all suspended actions.\n */\n resume = async (): Promise<void> => {\n return OfflineModule.resume(this.nativeId);\n };\n\n /**\n * Suspends all active actions.\n */\n suspend = async (): Promise<void> => {\n return OfflineModule.suspend(this.nativeId);\n };\n\n /**\n * Cancels and deletes the active download.\n */\n cancelDownload = async (): Promise<void> => {\n return OfflineModule.cancelDownload(this.nativeId);\n };\n\n /**\n * Resolves how many bytes of storage are used by the offline content.\n */\n usedStorage = async (): Promise<number> => {\n return OfflineModule.usedStorage(this.nativeId);\n };\n\n /**\n * Deletes everything related to the related content ID.\n */\n deleteAll = async (): Promise<void> => {\n return OfflineModule.deleteAll(this.nativeId);\n };\n\n /**\n * Downloads the offline license.\n * When finished successfully, data will be passed to the `OfflineContentManagerListener.onDrmLicenseUpdated`.\n * Errors are transmitted to the `OfflineContentManagerListener.onError`.\n */\n downloadLicense = async (): Promise<void> => {\n return OfflineModule.downloadLicense(this.nativeId);\n };\n\n /**\n * Releases the currently held offline license.\n * When finished successfully data will be passed to the `OfflineContentManagerListener.onDrmLicenseUpdated`.\n * Errors are transmitted to the `OfflineContentManagerListener.onError`.\n *\n * @platform Android\n */\n releaseLicense = async (): Promise<void> => {\n return OfflineModule.releaseLicense(this.nativeId);\n };\n\n /**\n * Renews the already downloaded DRM license.\n * When finished successfully data will be passed to the `OfflineContentManagerListener.onDrmLicenseUpdated`.\n * Errors are transmitted to the `OfflineContentManagerListener.onError`.\n */\n renewOfflineLicense = async (): Promise<void> => {\n return OfflineModule.renewOfflineLicense(this.nativeId);\n };\n}\n"]}
@@ -2,7 +2,7 @@ import { OfflineContentOptions } from './offlineContentOptions';
2
2
  import { OfflineState } from './offlineState';
3
3
  /**
4
4
  * Enum to hold the `eventType` on the `BitmovinNativeOfflineEventData`
5
- * @remarks Platform: Android, iOS
5
+ * @platform Android, iOS
6
6
  */
7
7
  export declare enum OfflineEventType {
8
8
  onCompleted = "onCompleted",
@@ -17,7 +17,7 @@ export declare enum OfflineEventType {
17
17
  }
18
18
  /**
19
19
  * The base interface for all offline events.
20
- * @remarks Platform: Android, iOS
20
+ * @platform Android, iOS
21
21
  */
22
22
  export interface OfflineEvent<T extends OfflineEventType> {
23
23
  /**
@@ -39,7 +39,7 @@ export interface OfflineEvent<T extends OfflineEventType> {
39
39
  }
40
40
  /**
41
41
  * Emitted when the download process has completed.
42
- * @remarks Platform: Android, iOS
42
+ * @platform Android, iOS
43
43
  */
44
44
  export interface OnCompletedEvent extends OfflineEvent<OfflineEventType.onCompleted> {
45
45
  /**
@@ -49,7 +49,7 @@ export interface OnCompletedEvent extends OfflineEvent<OfflineEventType.onComple
49
49
  }
50
50
  /**
51
51
  * Emitted when an error has occurred.
52
- * @remarks Platform: Android, iOS
52
+ * @platform Android, iOS
53
53
  */
54
54
  export interface OnErrorEvent extends OfflineEvent<OfflineEventType.onError> {
55
55
  /**
@@ -63,7 +63,7 @@ export interface OnErrorEvent extends OfflineEvent<OfflineEventType.onError> {
63
63
  }
64
64
  /**
65
65
  * Emitted when there is a progress change for the process call.
66
- * @remarks Platform: Android, iOS
66
+ * @platform Android, iOS
67
67
  */
68
68
  export interface OnProgressEvent extends OfflineEvent<OfflineEventType.onProgress> {
69
69
  /**
@@ -73,7 +73,7 @@ export interface OnProgressEvent extends OfflineEvent<OfflineEventType.onProgres
73
73
  }
74
74
  /**
75
75
  * Emitted when the `OfflineContentOptions` is available after a `OfflineContentManager.getOptions` call.
76
- * @remarks Platform: Android, iOS
76
+ * @platform Android, iOS
77
77
  */
78
78
  export interface OnOptionsAvailableEvent extends OfflineEvent<OfflineEventType.onOptionsAvailable> {
79
79
  /**
@@ -83,37 +83,37 @@ export interface OnOptionsAvailableEvent extends OfflineEvent<OfflineEventType.o
83
83
  }
84
84
  /**
85
85
  * Emitted when the DRM license was updated.
86
- * @remarks Platform: Android, iOS
86
+ * @platform Android, iOS
87
87
  */
88
88
  export type OnDrmLicenseUpdatedEvent = OfflineEvent<OfflineEventType.onDrmLicenseUpdated>;
89
89
  /**
90
90
  * Emitted when the DRM license has expired.
91
- * @remarks Platform: iOS
91
+ * @platform iOS
92
92
  */
93
93
  export type OnDrmLicenseExpiredEvent = OfflineEvent<OfflineEventType.onDrmLicenseExpired>;
94
94
  /**
95
95
  * Emitted when all active actions have been suspended.
96
- * @remarks Platform: Android, iOS
96
+ * @platform Android, iOS
97
97
  */
98
98
  export type OnSuspendedEvent = OfflineEvent<OfflineEventType.onSuspended>;
99
99
  /**
100
100
  * Emitted when all actions have been resumed.
101
- * @remarks Platform: Android, iOS
101
+ * @platform Android, iOS
102
102
  */
103
103
  export type OnResumedEvent = OfflineEvent<OfflineEventType.onResumed>;
104
104
  /**
105
105
  * Emitted when the download of the media content was canceled by the user and all partially downloaded content has been deleted from disk.
106
- * @remarks Platform: Android, iOS
106
+ * @platform Android, iOS
107
107
  */
108
108
  export type OnCanceledEvent = OfflineEvent<OfflineEventType.onCanceled>;
109
109
  /**
110
110
  * The type aggregation for all possible native offline events received from the `DeviceEventEmitter`
111
- * @remarks Platform: Android, iOS
111
+ * @platform Android, iOS
112
112
  */
113
113
  export type BitmovinNativeOfflineEventData = OnCompletedEvent | OnOptionsAvailableEvent | OnProgressEvent | OnErrorEvent | OnDrmLicenseUpdatedEvent | OnDrmLicenseExpiredEvent | OnSuspendedEvent | OnResumedEvent | OnCanceledEvent;
114
114
  /**
115
115
  * The listener that can be passed to the `OfflineContentManager` to receive callbacks for different events.
116
- * @remarks Platform: Android, iOS
116
+ * @platform Android, iOS
117
117
  */
118
118
  export interface OfflineContentManagerListener {
119
119
  /**
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Enum to hold the `eventType` on the `BitmovinNativeOfflineEventData`
3
- * @remarks Platform: Android, iOS
3
+ * @platform Android, iOS
4
4
  */
5
5
  export var OfflineEventType;
6
6
  (function (OfflineEventType) {
@@ -1 +1 @@
1
- {"version":3,"file":"offlineContentManagerListener.js","sourceRoot":"","sources":["../../src/offline/offlineContentManagerListener.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,+CAA2B,CAAA;IAC3B,uCAAmB,CAAA;IACnB,6CAAyB,CAAA;IACzB,6DAAyC,CAAA;IACzC,+DAA2C,CAAA;IAC3C,+DAA2C,CAAA;IAC3C,+CAA2B,CAAA;IAC3B,2CAAuB,CAAA;IACvB,6CAAyB,CAAA;AAC3B,CAAC,EAVW,gBAAgB,KAAhB,gBAAgB,QAU3B","sourcesContent":["import { OfflineContentOptions } from './offlineContentOptions';\nimport { OfflineState } from './offlineState';\n\n/**\n * Enum to hold the `eventType` on the `BitmovinNativeOfflineEventData`\n * @remarks Platform: Android, iOS\n */\nexport enum OfflineEventType {\n onCompleted = 'onCompleted',\n onError = 'onError',\n onProgress = 'onProgress',\n onOptionsAvailable = 'onOptionsAvailable',\n onDrmLicenseUpdated = 'onDrmLicenseUpdated',\n onDrmLicenseExpired = 'onDrmLicenseExpired',\n onSuspended = 'onSuspended',\n onResumed = 'onResumed',\n onCanceled = 'onCanceled',\n}\n\n/**\n * The base interface for all offline events.\n * @remarks Platform: Android, iOS\n */\nexport interface OfflineEvent<T extends OfflineEventType> {\n /**\n * The native id associated with the `OfflineContentManager` emitting this event\n */\n nativeId: string;\n /**\n * The supplied id representing the source associated with the `OfflineContentManager` emitting this event.\n */\n identifier: string;\n /**\n * The `OfflineEventType` that correlates to which native `OfflineContentManagerListener` method was called.\n */\n eventType: T;\n /**\n * The current offline download state\n */\n state: OfflineState;\n}\n\n/**\n * Emitted when the download process has completed.\n * @remarks Platform: Android, iOS\n */\nexport interface OnCompletedEvent\n extends OfflineEvent<OfflineEventType.onCompleted> {\n /**\n * The options that are available to download\n */\n options?: OfflineContentOptions;\n}\n\n/**\n * Emitted when an error has occurred.\n * @remarks Platform: Android, iOS\n */\nexport interface OnErrorEvent extends OfflineEvent<OfflineEventType.onError> {\n /**\n * The error code of the process error\n */\n code?: number;\n /**\n * The error message of the process error\n */\n message?: string;\n}\n\n/**\n * Emitted when there is a progress change for the process call.\n * @remarks Platform: Android, iOS\n */\nexport interface OnProgressEvent\n extends OfflineEvent<OfflineEventType.onProgress> {\n /**\n * The progress for the current process\n */\n progress: number;\n}\n\n/**\n * Emitted when the `OfflineContentOptions` is available after a `OfflineContentManager.getOptions` call.\n * @remarks Platform: Android, iOS\n */\nexport interface OnOptionsAvailableEvent\n extends OfflineEvent<OfflineEventType.onOptionsAvailable> {\n /**\n * The options that are available to download\n */\n options?: OfflineContentOptions;\n}\n\n/**\n * Emitted when the DRM license was updated.\n * @remarks Platform: Android, iOS\n */\nexport type OnDrmLicenseUpdatedEvent =\n OfflineEvent<OfflineEventType.onDrmLicenseUpdated>;\n\n/**\n * Emitted when the DRM license has expired.\n * @remarks Platform: iOS\n */\nexport type OnDrmLicenseExpiredEvent =\n OfflineEvent<OfflineEventType.onDrmLicenseExpired>;\n\n/**\n * Emitted when all active actions have been suspended.\n * @remarks Platform: Android, iOS\n */\nexport type OnSuspendedEvent = OfflineEvent<OfflineEventType.onSuspended>;\n\n/**\n * Emitted when all actions have been resumed.\n * @remarks Platform: Android, iOS\n */\nexport type OnResumedEvent = OfflineEvent<OfflineEventType.onResumed>;\n\n/**\n * Emitted when the download of the media content was canceled by the user and all partially downloaded content has been deleted from disk.\n * @remarks Platform: Android, iOS\n */\nexport type OnCanceledEvent = OfflineEvent<OfflineEventType.onCanceled>;\n\n/**\n * The type aggregation for all possible native offline events received from the `DeviceEventEmitter`\n * @remarks Platform: Android, iOS\n */\nexport type BitmovinNativeOfflineEventData =\n | OnCompletedEvent\n | OnOptionsAvailableEvent\n | OnProgressEvent\n | OnErrorEvent\n | OnDrmLicenseUpdatedEvent\n | OnDrmLicenseExpiredEvent\n | OnSuspendedEvent\n | OnResumedEvent\n | OnCanceledEvent;\n\n/**\n * The listener that can be passed to the `OfflineContentManager` to receive callbacks for different events.\n * @remarks Platform: Android, iOS\n */\nexport interface OfflineContentManagerListener {\n /**\n * Emitted when the download process has completed.\n *\n * @param e The `OnCompletedEvent` that was emitted\n */\n onCompleted?: (e: OnCompletedEvent) => void;\n /**\n * Emitted when an error has occurred.\n *\n * @param e The `OnErrorEvent` that was emitted\n */\n onError?: (e: OnErrorEvent) => void;\n /**\n * Emitted when there is a progress change for the process call.\n *\n * @param e The `OnProgressEvent` that was emitted\n */\n onProgress?: (e: OnProgressEvent) => void;\n /**\n * Emitted when the `OfflineContentOptions` is available after a `OfflineContentManager.getOptions` call.\n *\n * @param e The `OnOptionsAvailableEvent` that was emitted\n */\n onOptionsAvailable?: (e: OnOptionsAvailableEvent) => void;\n /**\n * Emitted when the DRM license was updated.\n *\n * @param e The `OnDrmLicenseUpdatedEvent` that was emitted\n */\n onDrmLicenseUpdated?: (e: OnDrmLicenseUpdatedEvent) => void;\n /**\n * Emitted when the DRM license has expired.\n *\n * @param e The `OnDrmLicenseExpiredEvent` that was emitted\n */\n onDrmLicenseExpired?: (e: OnDrmLicenseExpiredEvent) => void;\n /**\n * Emitted when all active actions have been suspended.\n *\n * @param e The `OnSuspendedEvent` that was emitted\n */\n onSuspended?: (e: OnSuspendedEvent) => void;\n /**\n * Emitted when all actions have been resumed.\n *\n * @param e The `OnResumedEvent` that was emitted\n */\n onResumed?: (e: OnResumedEvent) => void;\n /**\n * Emitted when the download of the media content was canceled by the user and all partially downloaded content has been deleted from disk.\n *\n * @param e The `OnCanceledEvent` that was emitted\n */\n onCanceled?: (e: OnCanceledEvent) => void;\n}\n"]}
1
+ {"version":3,"file":"offlineContentManagerListener.js","sourceRoot":"","sources":["../../src/offline/offlineContentManagerListener.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,+CAA2B,CAAA;IAC3B,uCAAmB,CAAA;IACnB,6CAAyB,CAAA;IACzB,6DAAyC,CAAA;IACzC,+DAA2C,CAAA;IAC3C,+DAA2C,CAAA;IAC3C,+CAA2B,CAAA;IAC3B,2CAAuB,CAAA;IACvB,6CAAyB,CAAA;AAC3B,CAAC,EAVW,gBAAgB,KAAhB,gBAAgB,QAU3B","sourcesContent":["import { OfflineContentOptions } from './offlineContentOptions';\nimport { OfflineState } from './offlineState';\n\n/**\n * Enum to hold the `eventType` on the `BitmovinNativeOfflineEventData`\n * @platform Android, iOS\n */\nexport enum OfflineEventType {\n onCompleted = 'onCompleted',\n onError = 'onError',\n onProgress = 'onProgress',\n onOptionsAvailable = 'onOptionsAvailable',\n onDrmLicenseUpdated = 'onDrmLicenseUpdated',\n onDrmLicenseExpired = 'onDrmLicenseExpired',\n onSuspended = 'onSuspended',\n onResumed = 'onResumed',\n onCanceled = 'onCanceled',\n}\n\n/**\n * The base interface for all offline events.\n * @platform Android, iOS\n */\nexport interface OfflineEvent<T extends OfflineEventType> {\n /**\n * The native id associated with the `OfflineContentManager` emitting this event\n */\n nativeId: string;\n /**\n * The supplied id representing the source associated with the `OfflineContentManager` emitting this event.\n */\n identifier: string;\n /**\n * The `OfflineEventType` that correlates to which native `OfflineContentManagerListener` method was called.\n */\n eventType: T;\n /**\n * The current offline download state\n */\n state: OfflineState;\n}\n\n/**\n * Emitted when the download process has completed.\n * @platform Android, iOS\n */\nexport interface OnCompletedEvent\n extends OfflineEvent<OfflineEventType.onCompleted> {\n /**\n * The options that are available to download\n */\n options?: OfflineContentOptions;\n}\n\n/**\n * Emitted when an error has occurred.\n * @platform Android, iOS\n */\nexport interface OnErrorEvent extends OfflineEvent<OfflineEventType.onError> {\n /**\n * The error code of the process error\n */\n code?: number;\n /**\n * The error message of the process error\n */\n message?: string;\n}\n\n/**\n * Emitted when there is a progress change for the process call.\n * @platform Android, iOS\n */\nexport interface OnProgressEvent\n extends OfflineEvent<OfflineEventType.onProgress> {\n /**\n * The progress for the current process\n */\n progress: number;\n}\n\n/**\n * Emitted when the `OfflineContentOptions` is available after a `OfflineContentManager.getOptions` call.\n * @platform Android, iOS\n */\nexport interface OnOptionsAvailableEvent\n extends OfflineEvent<OfflineEventType.onOptionsAvailable> {\n /**\n * The options that are available to download\n */\n options?: OfflineContentOptions;\n}\n\n/**\n * Emitted when the DRM license was updated.\n * @platform Android, iOS\n */\nexport type OnDrmLicenseUpdatedEvent =\n OfflineEvent<OfflineEventType.onDrmLicenseUpdated>;\n\n/**\n * Emitted when the DRM license has expired.\n * @platform iOS\n */\nexport type OnDrmLicenseExpiredEvent =\n OfflineEvent<OfflineEventType.onDrmLicenseExpired>;\n\n/**\n * Emitted when all active actions have been suspended.\n * @platform Android, iOS\n */\nexport type OnSuspendedEvent = OfflineEvent<OfflineEventType.onSuspended>;\n\n/**\n * Emitted when all actions have been resumed.\n * @platform Android, iOS\n */\nexport type OnResumedEvent = OfflineEvent<OfflineEventType.onResumed>;\n\n/**\n * Emitted when the download of the media content was canceled by the user and all partially downloaded content has been deleted from disk.\n * @platform Android, iOS\n */\nexport type OnCanceledEvent = OfflineEvent<OfflineEventType.onCanceled>;\n\n/**\n * The type aggregation for all possible native offline events received from the `DeviceEventEmitter`\n * @platform Android, iOS\n */\nexport type BitmovinNativeOfflineEventData =\n | OnCompletedEvent\n | OnOptionsAvailableEvent\n | OnProgressEvent\n | OnErrorEvent\n | OnDrmLicenseUpdatedEvent\n | OnDrmLicenseExpiredEvent\n | OnSuspendedEvent\n | OnResumedEvent\n | OnCanceledEvent;\n\n/**\n * The listener that can be passed to the `OfflineContentManager` to receive callbacks for different events.\n * @platform Android, iOS\n */\nexport interface OfflineContentManagerListener {\n /**\n * Emitted when the download process has completed.\n *\n * @param e The `OnCompletedEvent` that was emitted\n */\n onCompleted?: (e: OnCompletedEvent) => void;\n /**\n * Emitted when an error has occurred.\n *\n * @param e The `OnErrorEvent` that was emitted\n */\n onError?: (e: OnErrorEvent) => void;\n /**\n * Emitted when there is a progress change for the process call.\n *\n * @param e The `OnProgressEvent` that was emitted\n */\n onProgress?: (e: OnProgressEvent) => void;\n /**\n * Emitted when the `OfflineContentOptions` is available after a `OfflineContentManager.getOptions` call.\n *\n * @param e The `OnOptionsAvailableEvent` that was emitted\n */\n onOptionsAvailable?: (e: OnOptionsAvailableEvent) => void;\n /**\n * Emitted when the DRM license was updated.\n *\n * @param e The `OnDrmLicenseUpdatedEvent` that was emitted\n */\n onDrmLicenseUpdated?: (e: OnDrmLicenseUpdatedEvent) => void;\n /**\n * Emitted when the DRM license has expired.\n *\n * @param e The `OnDrmLicenseExpiredEvent` that was emitted\n */\n onDrmLicenseExpired?: (e: OnDrmLicenseExpiredEvent) => void;\n /**\n * Emitted when all active actions have been suspended.\n *\n * @param e The `OnSuspendedEvent` that was emitted\n */\n onSuspended?: (e: OnSuspendedEvent) => void;\n /**\n * Emitted when all actions have been resumed.\n *\n * @param e The `OnResumedEvent` that was emitted\n */\n onResumed?: (e: OnResumedEvent) => void;\n /**\n * Emitted when the download of the media content was canceled by the user and all partially downloaded content has been deleted from disk.\n *\n * @param e The `OnCanceledEvent` that was emitted\n */\n onCanceled?: (e: OnCanceledEvent) => void;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Superclass of entries which can be selected to download for offline playback
3
- * @remarks Platform: Android, iOS
3
+ * @platform Android, iOS
4
4
  */
5
5
  export interface OfflineContentOptionEntry {
6
6
  /**
@@ -14,7 +14,7 @@ export interface OfflineContentOptionEntry {
14
14
  }
15
15
  /**
16
16
  * Represents the downloadable options provided via the `onOptionsAvailable` callback on `OfflineContentManagerListener`
17
- * @remarks Platform: Android, iOS
17
+ * @platform Android, iOS
18
18
  */
19
19
  export interface OfflineContentOptions {
20
20
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"offlineContentOptions.js","sourceRoot":"","sources":["../../src/offline/offlineContentOptions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Superclass of entries which can be selected to download for offline playback\n * @remarks Platform: Android, iOS\n */\nexport interface OfflineContentOptionEntry {\n /**\n * The ID of the option.\n */\n id: string;\n /**\n * The language of the option.\n */\n language?: string;\n}\n\n/**\n * Represents the downloadable options provided via the `onOptionsAvailable` callback on `OfflineContentManagerListener`\n * @remarks Platform: Android, iOS\n */\nexport interface OfflineContentOptions {\n /**\n * Represents the audio options available for download\n */\n audioOptions: OfflineContentOptionEntry[];\n /**\n * Represents the text options available for download\n */\n textOptions: OfflineContentOptionEntry[];\n}\n"]}
1
+ {"version":3,"file":"offlineContentOptions.js","sourceRoot":"","sources":["../../src/offline/offlineContentOptions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Superclass of entries which can be selected to download for offline playback\n * @platform Android, iOS\n */\nexport interface OfflineContentOptionEntry {\n /**\n * The ID of the option.\n */\n id: string;\n /**\n * The language of the option.\n */\n language?: string;\n}\n\n/**\n * Represents the downloadable options provided via the `onOptionsAvailable` callback on `OfflineContentManagerListener`\n * @platform Android, iOS\n */\nexport interface OfflineContentOptions {\n /**\n * Represents the audio options available for download\n */\n audioOptions: OfflineContentOptionEntry[];\n /**\n * Represents the text options available for download\n */\n textOptions: OfflineContentOptionEntry[];\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Represents the configuration to start a download.
3
- * @remarks Platform: Android, iOS
3
+ * @platform Android, iOS
4
4
  */
5
5
  export interface OfflineDownloadRequest {
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"offlineDownloadRequest.js","sourceRoot":"","sources":["../../src/offline/offlineDownloadRequest.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents the configuration to start a download.\n * @remarks Platform: Android, iOS\n */\nexport interface OfflineDownloadRequest {\n /**\n * Minimum video bitrate to download. The nearest higher available bitrate will be selected.\n */\n minimumBitrate?: number;\n\n /**\n * Audio tracks with IDs to download.\n */\n audioOptionIds?: string[];\n\n /**\n * Text tracks with IDs to download.\n */\n textOptionIds?: string[];\n}\n"]}
1
+ {"version":3,"file":"offlineDownloadRequest.js","sourceRoot":"","sources":["../../src/offline/offlineDownloadRequest.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents the configuration to start a download.\n * @platform Android, iOS\n */\nexport interface OfflineDownloadRequest {\n /**\n * Minimum video bitrate to download. The nearest higher available bitrate will be selected.\n */\n minimumBitrate?: number;\n\n /**\n * Audio tracks with IDs to download.\n */\n audioOptionIds?: string[];\n\n /**\n * Text tracks with IDs to download.\n */\n textOptionIds?: string[];\n}\n"]}
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Object used configure how the native offline managers create and get offline source configurations
3
- * @remarks Platform: Android, iOS
3
+ * @platform Android, iOS
4
4
  */
5
5
  export interface OfflineSourceOptions {
6
6
  /**
7
7
  * Whether or not the player should restrict playback only to audio, video and subtitle tracks which are stored offline on the device. This has to be set to true if the device has no network access.
8
- * @remarks Platform: iOS
8
+ * @platform iOS
9
9
  */
10
10
  restrictedToAssetCache?: boolean;
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"offlineSourceOptions.js","sourceRoot":"","sources":["../../src/offline/offlineSourceOptions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Object used configure how the native offline managers create and get offline source configurations\n * @remarks Platform: Android, iOS\n */\nexport interface OfflineSourceOptions {\n /**\n * Whether or not the player should restrict playback only to audio, video and subtitle tracks which are stored offline on the device. This has to be set to true if the device has no network access.\n * @remarks Platform: iOS\n */\n restrictedToAssetCache?: boolean;\n}\n"]}
1
+ {"version":3,"file":"offlineSourceOptions.js","sourceRoot":"","sources":["../../src/offline/offlineSourceOptions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Object used configure how the native offline managers create and get offline source configurations\n * @platform Android, iOS\n */\nexport interface OfflineSourceOptions {\n /**\n * Whether or not the player should restrict playback only to audio, video and subtitle tracks which are stored offline on the device. This has to be set to true if the device has no network access.\n * @platform iOS\n */\n restrictedToAssetCache?: boolean;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Contains the state an OfflineContentManager can have.
3
- * @remarks Platform: Android, iOS
3
+ * @platform Android, iOS
4
4
  */
5
5
  export declare enum OfflineState {
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Contains the state an OfflineContentManager can have.
3
- * @remarks Platform: Android, iOS
3
+ * @platform Android, iOS
4
4
  */
5
5
  export var OfflineState;
6
6
  (function (OfflineState) {
@@ -1 +1 @@
1
- {"version":3,"file":"offlineState.js","sourceRoot":"","sources":["../../src/offline/offlineState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAN,IAAY,YAiBX;AAjBD,WAAY,YAAY;IACtB;;OAEG;IACH,yCAAyB,CAAA;IACzB;;OAEG;IACH,2CAA2B,CAAA;IAC3B;;OAEG;IACH,uCAAuB,CAAA;IACvB;;OAEG;IACH,+CAA+B,CAAA;AACjC,CAAC,EAjBW,YAAY,KAAZ,YAAY,QAiBvB","sourcesContent":["/**\n * Contains the state an OfflineContentManager can have.\n * @remarks Platform: Android, iOS\n */\nexport enum OfflineState {\n /**\n * The offline content is downloaded and ready for offline playback.\n */\n Downloaded = 'Downloaded',\n /**\n * The offline content is currently downloading.\n */\n Downloading = 'Downloading',\n /**\n * The download of the offline content is suspended, and is only partly downloaded yet.\n */\n Suspended = 'Suspended',\n /**\n * The offline content is not downloaded. However, some data may be still cached.\n */\n NotDownloaded = 'NotDownloaded',\n}\n"]}
1
+ {"version":3,"file":"offlineState.js","sourceRoot":"","sources":["../../src/offline/offlineState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAN,IAAY,YAiBX;AAjBD,WAAY,YAAY;IACtB;;OAEG;IACH,yCAAyB,CAAA;IACzB;;OAEG;IACH,2CAA2B,CAAA;IAC3B;;OAEG;IACH,uCAAuB,CAAA;IACvB;;OAEG;IACH,+CAA+B,CAAA;AACjC,CAAC,EAjBW,YAAY,KAAZ,YAAY,QAiBvB","sourcesContent":["/**\n * Contains the state an OfflineContentManager can have.\n * @platform Android, iOS\n */\nexport enum OfflineState {\n /**\n * The offline content is downloaded and ready for offline playback.\n */\n Downloaded = 'Downloaded',\n /**\n * The offline content is currently downloading.\n */\n Downloading = 'Downloading',\n /**\n * The download of the offline content is suspended, and is only partly downloaded yet.\n */\n Suspended = 'Suspended',\n /**\n * The offline content is not downloaded. However, some data may be still cached.\n */\n NotDownloaded = 'NotDownloaded',\n}\n"]}
@@ -81,7 +81,7 @@ export interface PlaybackConfig {
81
81
  /**
82
82
  * Configures decoder behaviour.
83
83
  *
84
- * @remarks Platform: Android
84
+ * @platform Android
85
85
  */
86
86
  decoderConfig?: DecoderConfig;
87
87
  }
@@ -1 +1 @@
1
- {"version":3,"file":"playbackConfig.js","sourceRoot":"","sources":["../src/playbackConfig.ts"],"names":[],"mappings":"","sourcesContent":["import { DecoderConfig } from './decoder/decoderConfig';\n\n/**\n * Configures the playback behaviour of the player.\n */\nexport interface PlaybackConfig {\n /**\n * Whether the player starts playing automatically after loading a source or not. Default is `false`.\n * @example\n * ```\n * const player = new Player({\n * playbackConfig: {\n * isAutoplayEnabled: true,\n * },\n * });\n * ```\n */\n isAutoplayEnabled?: boolean;\n /**\n * Whether the sound is muted on startup or not. Default value is `false`.\n * @example\n * ```\n * const player = new Player({\n * playbackConfig: {\n * isMuted: true,\n * },\n * });\n * ```\n */\n isMuted?: boolean;\n /**\n * Whether time shift / DVR for live streams is enabled or not. Default is `true`.\n * @example\n * ```\n * const player = new Player({\n * playbackConfig: {\n * isTimeShiftEnabled: false,\n * },\n * });\n * ```\n */\n isTimeShiftEnabled?: boolean;\n /**\n * Whether background playback is enabled or not.\n * Default is `false`.\n *\n * When set to `true`, playback is not automatically paused\n * anymore when the app moves to the background.\n * When set to `true`, also make sure to properly configure your app to allow\n * background playback.\n *\n * Default is `false`.\n *\n * @remarks\n * - On Android, {@link MediaControlConfig.isEnabled} has to be `true` for\n * background playback to work.\n * - On tvOS, background playback is only supported for audio-only content.\n *\n * @example\n * ```\n * const player = new Player({\n * playbackConfig: {\n * isBackgroundPlaybackEnabled: true,\n * },\n * });\n * ```\n */\n isBackgroundPlaybackEnabled?: boolean;\n /**\n * Whether the Picture in Picture mode option is enabled or not. Default is `false`.\n * @example\n * ```\n * const player = new Player({\n * playbackConfig: {\n * isPictureInPictureEnabled: true,\n * },\n * });\n * ```\n * @deprecated Use {@link PictureInPictureConfig.isEnabled} instead.\n */\n isPictureInPictureEnabled?: boolean;\n\n /**\n * Configures decoder behaviour.\n *\n * @remarks Platform: Android\n */\n decoderConfig?: DecoderConfig;\n}\n"]}
1
+ {"version":3,"file":"playbackConfig.js","sourceRoot":"","sources":["../src/playbackConfig.ts"],"names":[],"mappings":"","sourcesContent":["import { DecoderConfig } from './decoder/decoderConfig';\n\n/**\n * Configures the playback behaviour of the player.\n */\nexport interface PlaybackConfig {\n /**\n * Whether the player starts playing automatically after loading a source or not. Default is `false`.\n * @example\n * ```\n * const player = new Player({\n * playbackConfig: {\n * isAutoplayEnabled: true,\n * },\n * });\n * ```\n */\n isAutoplayEnabled?: boolean;\n /**\n * Whether the sound is muted on startup or not. Default value is `false`.\n * @example\n * ```\n * const player = new Player({\n * playbackConfig: {\n * isMuted: true,\n * },\n * });\n * ```\n */\n isMuted?: boolean;\n /**\n * Whether time shift / DVR for live streams is enabled or not. Default is `true`.\n * @example\n * ```\n * const player = new Player({\n * playbackConfig: {\n * isTimeShiftEnabled: false,\n * },\n * });\n * ```\n */\n isTimeShiftEnabled?: boolean;\n /**\n * Whether background playback is enabled or not.\n * Default is `false`.\n *\n * When set to `true`, playback is not automatically paused\n * anymore when the app moves to the background.\n * When set to `true`, also make sure to properly configure your app to allow\n * background playback.\n *\n * Default is `false`.\n *\n * @remarks\n * - On Android, {@link MediaControlConfig.isEnabled} has to be `true` for\n * background playback to work.\n * - On tvOS, background playback is only supported for audio-only content.\n *\n * @example\n * ```\n * const player = new Player({\n * playbackConfig: {\n * isBackgroundPlaybackEnabled: true,\n * },\n * });\n * ```\n */\n isBackgroundPlaybackEnabled?: boolean;\n /**\n * Whether the Picture in Picture mode option is enabled or not. Default is `false`.\n * @example\n * ```\n * const player = new Player({\n * playbackConfig: {\n * isPictureInPictureEnabled: true,\n * },\n * });\n * ```\n * @deprecated Use {@link PictureInPictureConfig.isEnabled} instead.\n */\n isPictureInPictureEnabled?: boolean;\n\n /**\n * Configures decoder behaviour.\n *\n * @platform Android\n */\n decoderConfig?: DecoderConfig;\n}\n"]}