bitmovin-player-react-native 1.20.1 → 1.21.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.
@@ -1 +1 @@
1
- {"version":3,"file":"player.js","sourceRoot":"","sources":["../src/player.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAgB,MAAM,UAAU,CAAC;AAKhD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEhD;;;;;;;;GAQG;AACH,MAAM,OAAO,MAAO,SAAQ,cAA4B;IACtD;;OAEG;IACH,aAAa,GAAG,KAAK,CAAC;IACtB;;OAEG;IACH,WAAW,GAAG,KAAK,CAAC;IACpB;;OAEG;IACH,MAAM,CAAU;IAChB;;;;OAIG;IACH,SAAS,GAAkB,SAAS,CAAC;IACrC;;OAEG;IACH,MAAM,GAAc,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAEzC,OAAO,CAAW;IAElB,aAAa,CAAuB;IACpC,8BAA8B,CAAqB;IACnD,+BAA+B,CAAqB;IACpD,qCAAqC,CAAqB;IAClE;;OAEG;IACH,UAAU,GAAG,KAAK,IAAmB,EAAE;QACrC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,IAAI,CAAC,8BAA8B,EAAE,CAAC;YACtC,IAAI,CAAC,+BAA+B,EAAE,CAAC;YACvC,IAAI,CAAC,qCAAqC,EAAE,CAAC;YAC7C,IAAI,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE,CAA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AEM,sBAAsB,GAAG,GAAG,EAAE;QACpC,IAAI,IAAI,CAAC,MAAM,EAAE,cAAc,EAAE,aAAa,IAAI,IAAI,EAAE,CAAC;YACvD,OAAO;QACT,CAAC;QACD,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;YAC1B,OAAO;QACT,CAAC;QAED,IAAI,CAAC,aAAa,GAAG,IAAI,mBAAmB,CAC1C,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,aAAa,CACzC,CAAC;QACF,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC,CAAC;CACH","sourcesContent":["import { EventSubscription } from 'expo-modules-core';\nimport { Platform } from 'react-native';\nimport PlayerModule from './modules/PlayerModule';\nimport NativeInstance from './nativeInstance';\nimport { Source, SourceConfig } from './source';\nimport { AudioTrack } from './audioTrack';\nimport { SubtitleTrack } from './subtitleTrack';\nimport { OfflineContentManager, OfflineSourceOptions } from './offline';\nimport { Thumbnail } from './thumbnail';\nimport { AnalyticsApi } from './analytics/player';\nimport { PlayerConfig } from './playerConfig';\nimport { AdBreak, AdItem, ImaSettings } from './advertising';\nimport { BufferApi } from './bufferApi';\nimport { VideoQuality } from './media';\nimport { Network } from './network';\nimport { DecoderConfigBridge } from './decoder';\n\n/**\n * Loads, controls and renders audio and video content represented through {@link Source}s. A player\n * instance can be created via the {@link usePlayer} hook and will idle until one or more {@link Source}s are\n * loaded. Once {@link Player.load} or {@link Player.loadSource} is called, the player becomes active and initiates necessary downloads to\n * start playback of the loaded source(s).\n *\n * Can be attached to {@link PlayerView} component in order to use Bitmovin's Player Web UI.\n * @see PlayerView\n */\nexport class Player extends NativeInstance<PlayerConfig> {\n /**\n * Whether the native `Player` object has been created.\n */\n isInitialized = false;\n /**\n * Whether the native `Player` object has been disposed.\n */\n isDestroyed = false;\n /**\n * Currently active source, or `null` if none is active.\n */\n source?: Source;\n /**\n * The `AnalyticsApi` for interactions regarding the `Player`'s analytics.\n *\n * `undefined` if the player was created without analytics support.\n */\n analytics?: AnalyticsApi = undefined;\n /**\n * The {@link BufferApi} for interactions regarding the buffer.\n */\n buffer: BufferApi = new BufferApi(this.nativeId);\n\n private network?: Network;\n\n private decoderConfig?: DecoderConfigBridge;\n private onShouldLoadAdItemSubscription?: EventSubscription;\n private onShouldPlayAdBreakSubscription?: EventSubscription;\n private onImaBeforeInitializationSubscription?: EventSubscription;\n /**\n * Allocates the native `Player` instance and its resources natively.\n */\n initialize = async (): Promise<void> => {\n if (!this.isInitialized) {\n this.ensureShouldLoadAdItemListener();\n this.ensureShouldPlayAdBreakListener();\n this.ensureImaBeforeInitializationListener();\n if (this.config?.networkConfig) {\n this.network = new Network(this.config.networkConfig);\n await this.network.initialize();\n }\n await this.maybeInitDecoderConfig();\n const analyticsConfig = this.config?.analyticsConfig;\n if (analyticsConfig) {\n await PlayerModule.initializeWithAnalyticsConfig(\n this.nativeId,\n analyticsConfig,\n this.config,\n this.network?.nativeId,\n this.decoderConfig?.nativeId\n );\n this.analytics = new AnalyticsApi(this.nativeId);\n } else {\n await PlayerModule.initializeWithConfig(\n this.nativeId,\n this.config,\n this.network?.nativeId,\n this.decoderConfig?.nativeId\n );\n }\n\n this.isInitialized = true;\n }\n return Promise.resolve();\n };\n\n /**\n * Destroys the native `Player` and releases all of its allocated resources.\n */\n destroy = () => {\n if (!this.isDestroyed) {\n void PlayerModule.destroy(this.nativeId);\n void this.source?.destroy();\n void this.network?.destroy();\n void this.decoderConfig?.destroy();\n this.onShouldLoadAdItemSubscription?.remove();\n this.onShouldPlayAdBreakSubscription?.remove();\n this.onImaBeforeInitializationSubscription?.remove();\n this.onShouldLoadAdItemSubscription = undefined;\n this.onShouldPlayAdBreakSubscription = undefined;\n this.onImaBeforeInitializationSubscription = undefined;\n this.isDestroyed = true;\n }\n };\n\n private ensureShouldLoadAdItemListener = () => {\n const callback = this.config?.advertisingConfig?.shouldLoadAdItem;\n if (!callback) {\n return;\n }\n if (this.onShouldLoadAdItemSubscription) {\n return;\n }\n this.onShouldLoadAdItemSubscription = PlayerModule.addListener(\n 'onShouldLoadAdItem',\n ({ nativeId, id, adItem }) => {\n if (nativeId !== this.nativeId) {\n return;\n }\n const cloned: AdItem = {\n ...adItem,\n sources: adItem.sources.map((source) => ({ ...source })),\n };\n let shouldLoad = true;\n try {\n const shouldLoadResult = callback(cloned);\n shouldLoad =\n typeof shouldLoadResult === 'boolean' ? shouldLoadResult : true;\n } catch {\n shouldLoad = true;\n }\n void PlayerModule.setShouldLoadAdItem(id, shouldLoad);\n }\n );\n };\n\n /**\n * Loads a new {@link Source} from `sourceConfig` into the player.\n */\n load = (sourceConfig: SourceConfig) => {\n this.loadSource(new Source(sourceConfig));\n };\n\n /**\n * Loads the downloaded content from {@link OfflineContentManager} into the player.\n */\n loadOfflineContent = (\n offlineContentManager: OfflineContentManager,\n options?: OfflineSourceOptions\n ) => {\n void PlayerModule.loadOfflineContent(\n this.nativeId,\n offlineContentManager.nativeId,\n options\n );\n };\n\n /**\n * Loads the given {@link Source} into the player.\n */\n loadSource = (source: Source) => {\n this.source = source;\n void source\n .initialize()\n .then(() => PlayerModule.loadSource(this.nativeId, source.nativeId));\n };\n\n /**\n * Unloads all {@link Source}s from the player.\n */\n unload = () => {\n void PlayerModule.unload(this.nativeId);\n };\n\n /**\n * Starts or resumes playback after being paused. Has no effect if the player is already playing.\n */\n play = () => {\n void PlayerModule.play(this.nativeId);\n };\n\n /**\n * Pauses the video if it is playing. Has no effect if the player is already paused.\n */\n pause = () => {\n void PlayerModule.pause(this.nativeId);\n };\n\n /**\n * Seeks to the given playback time specified by the parameter `time` in seconds. Must not be\n * greater than the total duration of the video. Has no effect when watching a live stream since\n * seeking is not possible.\n *\n * @param time - The time to seek to in seconds.\n */\n seek = (time: number) => {\n void PlayerModule.seek(this.nativeId, time);\n };\n\n /**\n * Shifts the time to the given `offset` in seconds from the live edge. The resulting offset has to be within the\n * timeShift window as specified by `maxTimeShift` (which is a negative value) and 0. When the provided `offset` is\n * positive, it will be interpreted as a UNIX timestamp in seconds and converted to fit into the timeShift window.\n * When the provided `offset` is negative, but lower than `maxTimeShift`, then it will be clamped to `maxTimeShift`.\n * Has no effect for VoD.\n *\n * Has no effect if no sources are loaded.\n *\n * @param offset - Target offset from the live edge in seconds.\n */\n timeShift = (offset: number) => {\n void PlayerModule.timeShift(this.nativeId, offset);\n };\n\n /**\n * Mutes the player if an audio track is available. Has no effect if the player is already muted.\n */\n mute = () => {\n void PlayerModule.mute(this.nativeId);\n };\n\n /**\n * Unmutes the player if it is muted. Has no effect if the player is already unmuted.\n */\n unmute = () => {\n void PlayerModule.unmute(this.nativeId);\n };\n\n /**\n * Sets the player's volume between 0 (silent) and 100 (max volume).\n *\n * @param volume - The volume level to set.\n */\n setVolume = (volume: number) => {\n void PlayerModule.setVolume(this.nativeId, volume);\n };\n\n private ensureShouldPlayAdBreakListener = () => {\n if (Platform.OS !== 'android') {\n return;\n }\n const callback = this.config?.advertisingConfig?.shouldPlayAdBreak;\n if (!callback) {\n return;\n }\n if (this.onShouldPlayAdBreakSubscription) {\n return;\n }\n this.onShouldPlayAdBreakSubscription = PlayerModule.addListener(\n 'onShouldPlayAdBreak',\n ({ nativeId, id, adBreak }) => {\n if (nativeId !== this.nativeId) {\n return;\n }\n const cloned: AdBreak = {\n ...adBreak,\n ads: adBreak.ads.map((ad) => ({\n ...ad,\n data: ad.data ? { ...ad.data } : undefined,\n })),\n };\n let shouldPlay = true;\n try {\n const shouldPlayResult = callback(cloned);\n shouldPlay =\n typeof shouldPlayResult === 'boolean' ? shouldPlayResult : true;\n } catch {\n shouldPlay = true;\n }\n void PlayerModule.setShouldPlayAdBreak(id, shouldPlay);\n }\n );\n };\n\n private ensureImaBeforeInitializationListener = () => {\n const callback = this.config?.advertisingConfig?.ima?.beforeInitialization;\n if (!callback) {\n return;\n }\n if (this.onImaBeforeInitializationSubscription) {\n return;\n }\n this.onImaBeforeInitializationSubscription = PlayerModule.addListener(\n 'onImaBeforeInitialization',\n ({ nativeId, id, settings }) => {\n if (nativeId !== this.nativeId) {\n return;\n }\n const cloned: ImaSettings = { ...settings };\n let prepared = cloned;\n try {\n const result = callback(cloned);\n prepared =\n result && typeof result === 'object'\n ? { ...cloned, ...result }\n : cloned;\n } catch {\n prepared = cloned;\n }\n void PlayerModule.setPreparedImaSettings(id, prepared);\n }\n );\n };\n\n /**\n * @returns The player's current volume level.\n */\n getVolume = async (): Promise<number> => {\n return (await PlayerModule.getVolume(this.nativeId)) ?? 0;\n };\n\n /**\n * @returns The current playback time in seconds.\n *\n * For VoD streams the returned time ranges between 0 and the duration of the asset.\n *\n * For live streams it can be specified if an absolute UNIX timestamp or a value\n * relative to the playback start should be returned.\n *\n * @param mode - The time mode to specify: an absolute UNIX timestamp ('absolute') or relative time ('relative').\n */\n getCurrentTime = async (\n mode: 'relative' | 'absolute' = 'absolute'\n ): Promise<number> => {\n return (await PlayerModule.currentTime(this.nativeId, mode)) ?? 0;\n };\n\n /**\n * @returns The total duration in seconds of the current video or INFINITY if it’s a live stream.\n */\n getDuration = async (): Promise<number> => {\n return (await PlayerModule.duration(this.nativeId)) ?? 0;\n };\n\n /**\n * @returns `true` if the player is muted.\n */\n isMuted = async (): Promise<boolean> => {\n return (await PlayerModule.isMuted(this.nativeId)) ?? false;\n };\n\n /**\n * @returns `true` if the player is currently playing, i.e. has started and is not paused.\n */\n isPlaying = async (): Promise<boolean> => {\n return (await PlayerModule.isPlaying(this.nativeId)) ?? false;\n };\n\n /**\n * @returns `true` if the player has started playback but it's currently paused.\n */\n isPaused = async (): Promise<boolean> => {\n return (await PlayerModule.isPaused(this.nativeId)) ?? false;\n };\n\n /**\n * @returns `true` if the displayed video is a live stream.\n */\n isLive = async (): Promise<boolean> => {\n return (await PlayerModule.isLive(this.nativeId)) ?? false;\n };\n\n /**\n * @platform iOS\n * @returns `true` when media is played externally using AirPlay.\n */\n isAirPlayActive = async (): Promise<boolean> => {\n if (Platform.OS === 'android') {\n console.warn(\n `[Player ${this.nativeId}] Method isAirPlayActive is not available for Android. Only iOS devices.`\n );\n return false;\n }\n return (await PlayerModule.isAirPlayActive(this.nativeId)) ?? false;\n };\n\n /**\n * @platform iOS\n * @returns `true` when AirPlay is available.\n */\n isAirPlayAvailable = async (): Promise<boolean> => {\n if (Platform.OS === 'android') {\n console.warn(\n `[Player ${this.nativeId}] Method isAirPlayAvailable is not available for Android. Only iOS devices.`\n );\n return false;\n }\n return (await PlayerModule.isAirPlayAvailable(this.nativeId)) ?? false;\n };\n\n /**\n * @returns The currently selected audio track or `null`.\n */\n getAudioTrack = async (): Promise<AudioTrack | null> => {\n return PlayerModule.getAudioTrack(this.nativeId);\n };\n\n /**\n * @returns An array containing {@link AudioTrack} objects for all available audio tracks.\n */\n getAvailableAudioTracks = async (): Promise<AudioTrack[]> => {\n return PlayerModule.getAvailableAudioTracks(this.nativeId);\n };\n\n /**\n * Sets the audio track to the ID specified by trackIdentifier. A list can be retrieved by calling getAvailableAudioTracks.\n *\n * @param trackIdentifier - The {@link AudioTrack.identifier} to be set.\n */\n setAudioTrack = async (trackIdentifier: string): Promise<void> => {\n return PlayerModule.setAudioTrack(this.nativeId, trackIdentifier);\n };\n\n /**\n * @returns The currently selected {@link SubtitleTrack} or `null`.\n */\n getSubtitleTrack = async (): Promise<SubtitleTrack | null> => {\n return PlayerModule.getSubtitleTrack(this.nativeId);\n };\n\n /**\n * @returns An array containing SubtitleTrack objects for all available subtitle tracks.\n */\n getAvailableSubtitles = async (): Promise<SubtitleTrack[]> => {\n return PlayerModule.getAvailableSubtitles(this.nativeId);\n };\n\n /**\n * Sets the subtitle track to the ID specified by trackIdentifier. A list can be retrieved by calling getAvailableSubtitles.\n * Pass `undefined` to disable subtitles.\n *\n * @param trackIdentifier - The {@link SubtitleTrack.identifier} to be set.\n */\n setSubtitleTrack = async (\n trackIdentifier: string | undefined\n ): Promise<void> => {\n return PlayerModule.setSubtitleTrack(\n this.nativeId,\n trackIdentifier ?? null\n );\n };\n\n /**\n * Dynamically schedules the {@link AdItem} for playback.\n * Has no effect if there is no active playback session.\n *\n * @param adItem - Ad to be scheduled for playback.\n *\n * @platform iOS, Android\n */\n scheduleAd = (adItem: AdItem) => {\n void PlayerModule.scheduleAd(this.nativeId, adItem);\n };\n\n /**\n * Skips the current ad.\n * Has no effect if the current ad is not skippable or if no ad is being played back.\n *\n * @platform iOS, Android\n */\n skipAd = () => {\n void PlayerModule.skipAd(this.nativeId);\n };\n\n /**\n * @returns `true` while an ad is being played back or when main content playback has been paused for ad playback.\n * @platform iOS, Android\n */\n isAd = async (): Promise<boolean> => {\n return (await PlayerModule.isAd(this.nativeId)) ?? false;\n };\n\n /**\n * The current time shift of the live stream in seconds. This value is always 0 if the active {@link Source} is not a\n * live stream or no sources are loaded.\n */\n getTimeShift = async (): Promise<number> => {\n return (await PlayerModule.getTimeShift(this.nativeId)) ?? 0;\n };\n\n /**\n * The limit in seconds for time shifting. This value is either negative or 0 and it is always 0 if the active\n * {@link Source} is not a live stream or no sources are loaded.\n */\n getMaxTimeShift = async (): Promise<number> => {\n return (await PlayerModule.getMaxTimeShift(this.nativeId)) ?? 0;\n };\n\n /**\n * Sets the upper bitrate boundary for video qualities. All qualities with a bitrate\n * that is higher than this threshold will not be eligible for automatic quality selection.\n *\n * Can be set to `null` for no limitation.\n */\n setMaxSelectableBitrate = (bitrate: number | null) => {\n void PlayerModule.setMaxSelectableBitrate(this.nativeId, bitrate || -1);\n };\n\n /**\n * @returns a {@link Thumbnail} for the specified playback time for the currently active source if available.\n * Supported thumbnail formats are:\n * - `WebVtt` configured via {@link SourceConfig.thumbnailTrack}, on all supported platforms\n * - HLS `Image Media Playlist` in the multivariant playlist, Android-only\n * - DASH `Image Adaptation Set` as specified in DASH-IF IOP, Android-only\n * If a `WebVtt` thumbnail track is provided, any potential in-manifest thumbnails are ignored on Android.\n *\n * @param time - The time in seconds for which to retrieve the thumbnail.\n */\n getThumbnail = async (time: number): Promise<Thumbnail | null> => {\n return PlayerModule.getThumbnail(this.nativeId, time);\n };\n\n /**\n * Whether casting to a cast-compatible remote device is available. {@link CastAvailableEvent} signals when\n * casting becomes available.\n *\n * @platform iOS, Android\n */\n isCastAvailable = async (): Promise<boolean> => {\n return (await PlayerModule.isCastAvailable(this.nativeId)) ?? false;\n };\n\n /**\n * Whether video is currently being casted to a remote device and not played locally.\n *\n * @platform iOS, Android\n */\n isCasting = async (): Promise<boolean> => {\n return (await PlayerModule.isCasting(this.nativeId)) ?? false;\n };\n\n /**\n * Initiates casting the current video to a cast-compatible remote device. The user has to choose to which device it\n * should be sent.\n *\n * @platform iOS, Android\n */\n castVideo = () => {\n void PlayerModule.castVideo(this.nativeId);\n };\n\n /**\n * Stops casting the current video. Has no effect if {@link Player.isCasting} is `false`.\n *\n * @platform iOS, Android\n */\n castStop = () => {\n void PlayerModule.castStop(this.nativeId);\n };\n\n /**\n * Returns the currently selected video quality.\n * @returns The currently selected video quality.\n */\n getVideoQuality = async (): Promise<VideoQuality> => {\n return PlayerModule.getVideoQuality(this.nativeId);\n };\n\n /**\n * Returns an array containing all available video qualities the player can adapt between.\n * @returns An array containing all available video qualities the player can adapt between.\n */\n getAvailableVideoQualities = async (): Promise<VideoQuality[]> => {\n return PlayerModule.getAvailableVideoQualities(this.nativeId);\n };\n\n /**\n * Sets the video quality.\n * @platform Android\n *\n * @param qualityId value obtained from {@link VideoQuality}'s `id` property, which can be obtained via `Player.getAvailableVideoQualities()` to select a specific quality. To use automatic quality selection, 'auto' can be passed here.\n */\n setVideoQuality = (qualityId: string) => {\n if (Platform.OS !== 'android') {\n console.warn(\n `[Player ${this.nativeId}] Method setVideoQuality is not available for iOS and tvOS devices. Only Android devices.`\n );\n return;\n }\n void PlayerModule.setVideoQuality(this.nativeId, qualityId);\n };\n\n /**\n * Sets the playback speed of the player. Fast forward, slow motion and reverse playback are supported.\n * @remarks\n * Platform: iOS, tvOS\n *\n * - Slow motion is indicated by values between `0` and `1`.\n * - Fast forward by values greater than `1`.\n * - Slow reverse is used by values between `0` and `-1`, and fast reverse is used by values less than `-1`. iOS and tvOS only.\n * - Negative values are ignored during Casting and on Android.\n * - During reverse playback the playback will continue until the beginning of the active source is\n * reached. When reaching the beginning of the source, playback will be paused and the playback\n * speed will be reset to its default value of `1`. No {@link PlaybackFinishedEvent} will be\n * emitted in this case.\n *\n * @param playbackSpeed - The playback speed to set.\n */\n setPlaybackSpeed = (playbackSpeed: number) => {\n void PlayerModule.setPlaybackSpeed(this.nativeId, playbackSpeed);\n };\n\n /**\n * @see {@link setPlaybackSpeed} for details on which values playback speed can assume.\n * @returns The player's current playback speed.\n */\n getPlaybackSpeed = async (): Promise<number> => {\n return (await PlayerModule.getPlaybackSpeed(this.nativeId)) ?? 0;\n };\n\n /**\n * Checks the possibility to play the media at specified playback speed.\n * @param playbackSpeed - The playback speed to check.\n * @returns `true` if it's possible to play the media at the specified playback speed, otherwise `false`. On Android it always returns `undefined`.\n * @platform iOS, tvOS\n */\n canPlayAtPlaybackSpeed = async (\n playbackSpeed: number\n ): Promise<boolean | undefined> => {\n if (Platform.OS === 'android') {\n console.warn(\n `[Player ${this.nativeId}] Method canPlayAtPlaybackSpeed is not available for Android. Only iOS and tvOS devices.`\n );\n return undefined;\n }\n return (\n (await PlayerModule.canPlayAtPlaybackSpeed(\n this.nativeId,\n playbackSpeed\n )) ?? false\n );\n };\n\n private maybeInitDecoderConfig = () => {\n if (this.config?.playbackConfig?.decoderConfig == null) {\n return;\n }\n if (Platform.OS === 'ios') {\n return;\n }\n\n this.decoderConfig = new DecoderConfigBridge(\n this.config.playbackConfig.decoderConfig\n );\n this.decoderConfig.initialize();\n };\n}\n"]}
1
+ {"version":3,"file":"player.js","sourceRoot":"","sources":["../src/player.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAgB,MAAM,UAAU,CA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AI,CAAC,MAAM,EAAE,cAAc,EAAE,aAAa,IAAI,IAAI,EAAE,CAAC;YACvD,OAAO;QACT,CAAC;QACD,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;YAC1B,OAAO;QACT,CAAC;QAED,IAAI,CAAC,aAAa,GAAG,IAAI,mBAAmB,CAC1C,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,aAAa,CACzC,CAAC;QACF,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC,CAAC;CACH","sourcesContent":["import { EventSubscription } from 'expo-modules-core';\nimport { Platform } from 'react-native';\nimport PlayerModule from './modules/PlayerModule';\nimport NativeInstance from './nativeInstance';\nimport { Source, SourceConfig } from './source';\nimport { AudioTrack } from './audioTrack';\nimport { SubtitleTrack } from './subtitleTrack';\nimport { OfflineContentManager, OfflineSourceOptions } from './offline';\nimport { Thumbnail } from './thumbnail';\nimport { AnalyticsApi } from './analytics/player';\nimport { PlayerConfig } from './playerConfig';\nimport { AdBreak, AdItem, ImaSettings } from './advertising';\nimport { BufferApi } from './bufferApi';\nimport { VideoQuality } from './media';\nimport { Network } from './network';\nimport { DecoderConfigBridge } from './decoder';\n\n/**\n * Loads, controls and renders audio and video content represented through {@link Source}s. A player\n * instance can be created via the {@link usePlayer} hook and will idle until one or more {@link Source}s are\n * loaded. Once {@link Player.load} or {@link Player.loadSource} is called, the player becomes active and initiates necessary downloads to\n * start playback of the loaded source(s).\n *\n * Can be attached to {@link PlayerView} component in order to use Bitmovin's Player Web UI.\n * @see PlayerView\n */\nexport class Player extends NativeInstance<PlayerConfig> {\n /**\n * Whether the native `Player` object has been created.\n */\n isInitialized = false;\n /**\n * Whether the native `Player` object has been disposed.\n */\n isDestroyed = false;\n /**\n * Currently active source, or `null` if none is active.\n */\n source?: Source;\n /**\n * The `AnalyticsApi` for interactions regarding the `Player`'s analytics.\n *\n * `undefined` if the player was created without analytics support.\n */\n analytics?: AnalyticsApi = undefined;\n /**\n * The {@link BufferApi} for interactions regarding the buffer.\n */\n buffer: BufferApi = new BufferApi(this.nativeId);\n\n private network?: Network;\n\n private decoderConfig?: DecoderConfigBridge;\n private onShouldLoadAdItemSubscription?: EventSubscription;\n private onShouldPlayAdBreakSubscription?: EventSubscription;\n private onImaBeforeInitializationSubscription?: EventSubscription;\n /**\n * Allocates the native `Player` instance and its resources natively.\n */\n initialize = async (): Promise<void> => {\n if (!this.isInitialized) {\n this.ensureShouldLoadAdItemListener();\n this.ensureShouldPlayAdBreakListener();\n this.ensureImaBeforeInitializationListener();\n if (this.config?.networkConfig) {\n this.network = new Network(this.config.networkConfig);\n await this.network.initialize();\n }\n await this.maybeInitDecoderConfig();\n const analyticsConfig = this.config?.analyticsConfig;\n if (analyticsConfig) {\n await PlayerModule.initializeWithAnalyticsConfig(\n this.nativeId,\n analyticsConfig,\n this.config,\n this.network?.nativeId,\n this.decoderConfig?.nativeId\n );\n this.analytics = new AnalyticsApi(this.nativeId);\n } else {\n await PlayerModule.initializeWithConfig(\n this.nativeId,\n this.config,\n this.network?.nativeId,\n this.decoderConfig?.nativeId\n );\n }\n\n this.isInitialized = true;\n }\n return Promise.resolve();\n };\n\n /**\n * Destroys the native `Player` and releases all of its allocated resources.\n */\n destroy = () => {\n if (!this.isDestroyed) {\n void PlayerModule.destroy(this.nativeId);\n void this.source?.destroy();\n void this.network?.destroy();\n void this.decoderConfig?.destroy();\n this.onShouldLoadAdItemSubscription?.remove();\n this.onShouldPlayAdBreakSubscription?.remove();\n this.onImaBeforeInitializationSubscription?.remove();\n this.onShouldLoadAdItemSubscription = undefined;\n this.onShouldPlayAdBreakSubscription = undefined;\n this.onImaBeforeInitializationSubscription = undefined;\n this.isDestroyed = true;\n }\n };\n\n private ensureShouldLoadAdItemListener = () => {\n const callback = this.config?.advertisingConfig?.shouldLoadAdItem;\n if (!callback) {\n return;\n }\n if (this.onShouldLoadAdItemSubscription) {\n return;\n }\n this.onShouldLoadAdItemSubscription = PlayerModule.addListener(\n 'onShouldLoadAdItem',\n ({ nativeId, id, adItem }) => {\n if (nativeId !== this.nativeId) {\n return;\n }\n const cloned: AdItem = {\n ...adItem,\n sources: adItem.sources.map((source) => ({ ...source })),\n };\n let shouldLoad = true;\n try {\n const shouldLoadResult = callback(cloned);\n shouldLoad =\n typeof shouldLoadResult === 'boolean' ? shouldLoadResult : true;\n } catch {\n shouldLoad = true;\n }\n void PlayerModule.setShouldLoadAdItem(id, shouldLoad);\n }\n );\n };\n\n /**\n * Loads a new {@link Source} from `sourceConfig` into the player.\n */\n load = (sourceConfig: SourceConfig) => {\n this.loadSource(new Source(sourceConfig));\n };\n\n /**\n * Loads the downloaded content from {@link OfflineContentManager} into the player.\n */\n loadOfflineContent = (\n offlineContentManager: OfflineContentManager,\n options?: OfflineSourceOptions\n ) => {\n void PlayerModule.loadOfflineContent(\n this.nativeId,\n offlineContentManager.nativeId,\n options\n );\n };\n\n /**\n * Loads the given {@link Source} into the player.\n */\n loadSource = (source: Source) => {\n this.source = source;\n void source\n .initialize()\n .then(() => PlayerModule.loadSource(this.nativeId, source.nativeId));\n };\n\n /**\n * Unloads all {@link Source}s from the player.\n */\n unload = () => {\n void PlayerModule.unload(this.nativeId);\n };\n\n /**\n * Starts or resumes playback after being paused. Has no effect if the player is already playing.\n */\n play = () => {\n void PlayerModule.play(this.nativeId);\n };\n\n /**\n * Pauses the video if it is playing. Has no effect if the player is already paused.\n */\n pause = () => {\n void PlayerModule.pause(this.nativeId);\n };\n\n /**\n * Seeks to the given playback time specified by the parameter `time` in seconds. Must not be\n * greater than the total duration of the video. Has no effect when watching a live stream since\n * seeking is not possible.\n *\n * @param time - The time to seek to in seconds.\n */\n seek = (time: number) => {\n void PlayerModule.seek(this.nativeId, time);\n };\n\n /**\n * Shifts the time to the given `offset` in seconds from the live edge. The resulting offset has to be within the\n * timeShift window as specified by `maxTimeShift` (which is a negative value) and 0. When the provided `offset` is\n * positive, it will be interpreted as a UNIX timestamp in seconds and converted to fit into the timeShift window.\n * When the provided `offset` is negative, but lower than `maxTimeShift`, then it will be clamped to `maxTimeShift`.\n * Has no effect for VoD.\n *\n * Has no effect if no sources are loaded.\n *\n * @param offset - Target offset from the live edge in seconds.\n */\n timeShift = (offset: number) => {\n void PlayerModule.timeShift(this.nativeId, offset);\n };\n\n /**\n * Mutes the player if an audio track is available. Has no effect if the player is already muted.\n */\n mute = () => {\n void PlayerModule.mute(this.nativeId);\n };\n\n /**\n * Unmutes the player if it is muted. Has no effect if the player is already unmuted.\n */\n unmute = () => {\n void PlayerModule.unmute(this.nativeId);\n };\n\n /**\n * Sets the player's volume between 0 (silent) and 100 (max volume).\n *\n * @param volume - The volume level to set.\n */\n setVolume = (volume: number) => {\n void PlayerModule.setVolume(this.nativeId, volume);\n };\n\n private ensureShouldPlayAdBreakListener = () => {\n if (Platform.OS !== 'android') {\n return;\n }\n const callback = this.config?.advertisingConfig?.shouldPlayAdBreak;\n if (!callback) {\n return;\n }\n if (this.onShouldPlayAdBreakSubscription) {\n return;\n }\n this.onShouldPlayAdBreakSubscription = PlayerModule.addListener(\n 'onShouldPlayAdBreak',\n ({ nativeId, id, adBreak }) => {\n if (nativeId !== this.nativeId) {\n return;\n }\n const cloned: AdBreak = {\n ...adBreak,\n ads: adBreak.ads.map((ad) => ({\n ...ad,\n data: ad.data ? { ...ad.data } : undefined,\n })),\n };\n let shouldPlay = true;\n try {\n const shouldPlayResult = callback(cloned);\n shouldPlay =\n typeof shouldPlayResult === 'boolean' ? shouldPlayResult : true;\n } catch {\n shouldPlay = true;\n }\n void PlayerModule.setShouldPlayAdBreak(id, shouldPlay);\n }\n );\n };\n\n private ensureImaBeforeInitializationListener = () => {\n const callback = this.config?.advertisingConfig?.ima?.beforeInitialization;\n if (!callback) {\n return;\n }\n if (this.onImaBeforeInitializationSubscription) {\n return;\n }\n this.onImaBeforeInitializationSubscription = PlayerModule.addListener(\n 'onImaBeforeInitialization',\n ({ nativeId, id, settings }) => {\n if (nativeId !== this.nativeId) {\n return;\n }\n const cloned: ImaSettings = { ...settings };\n let prepared = cloned;\n try {\n const result = callback(cloned);\n prepared =\n result && typeof result === 'object'\n ? { ...cloned, ...result }\n : cloned;\n } catch {\n prepared = cloned;\n }\n void PlayerModule.setPreparedImaSettings(id, prepared);\n }\n );\n };\n\n /**\n * @returns The player's current volume level.\n */\n getVolume = async (): Promise<number> => {\n return (await PlayerModule.getVolume(this.nativeId)) ?? 0;\n };\n\n /**\n * @returns The current playback time in seconds.\n *\n * For VoD streams the returned time ranges between 0 and the duration of the asset.\n *\n * For live streams it can be specified if an absolute UNIX timestamp or a value\n * relative to the playback start should be returned.\n *\n * @param mode - The time mode to specify: an absolute UNIX timestamp ('absolute') or relative time ('relative').\n */\n getCurrentTime = async (\n mode: 'relative' | 'absolute' = 'absolute'\n ): Promise<number> => {\n return (await PlayerModule.currentTime(this.nativeId, mode)) ?? 0;\n };\n\n /**\n * @returns The total duration in seconds of the current video or INFINITY if it’s a live stream.\n */\n getDuration = async (): Promise<number> => {\n return (await PlayerModule.duration(this.nativeId)) ?? 0;\n };\n\n /**\n * @returns `true` if the player is muted.\n */\n isMuted = async (): Promise<boolean> => {\n return (await PlayerModule.isMuted(this.nativeId)) ?? false;\n };\n\n /**\n * @returns `true` if the player is currently playing, i.e. has started and is not paused.\n */\n isPlaying = async (): Promise<boolean> => {\n return (await PlayerModule.isPlaying(this.nativeId)) ?? false;\n };\n\n /**\n * @returns `true` if the player has started playback but it's currently paused.\n */\n isPaused = async (): Promise<boolean> => {\n return (await PlayerModule.isPaused(this.nativeId)) ?? false;\n };\n\n /**\n * @returns `true` if the displayed video is a live stream.\n */\n isLive = async (): Promise<boolean> => {\n return (await PlayerModule.isLive(this.nativeId)) ?? false;\n };\n\n /**\n * @platform iOS\n * @returns `true` when media is played externally using AirPlay.\n */\n isAirPlayActive = async (): Promise<boolean> => {\n if (Platform.OS === 'android') {\n console.warn(\n `[Player ${this.nativeId}] Method isAirPlayActive is not available for Android. Only iOS devices.`\n );\n return false;\n }\n return (await PlayerModule.isAirPlayActive(this.nativeId)) ?? false;\n };\n\n /**\n * @platform iOS\n * @returns `true` when AirPlay is available.\n */\n isAirPlayAvailable = async (): Promise<boolean> => {\n if (Platform.OS === 'android') {\n console.warn(\n `[Player ${this.nativeId}] Method isAirPlayAvailable is not available for Android. Only iOS devices.`\n );\n return false;\n }\n return (await PlayerModule.isAirPlayAvailable(this.nativeId)) ?? false;\n };\n\n /**\n * Displays the system AirPlay route selection menu, allowing the user to pick\n * an AirPlay target for the current playback.\n *\n * @platform iOS\n */\n showAirPlayTargetPicker = () => {\n if (Platform.OS !== 'ios' || Platform.isTV) {\n console.warn(\n `[Player ${this.nativeId}] Method showAirPlayTargetPicker is only available on iOS (not Android/tvOS).`\n );\n return;\n }\n void PlayerModule.showAirPlayTargetPicker(this.nativeId);\n };\n\n /**\n * @returns The currently selected audio track or `null`.\n */\n getAudioTrack = async (): Promise<AudioTrack | null> => {\n return PlayerModule.getAudioTrack(this.nativeId);\n };\n\n /**\n * @returns An array containing {@link AudioTrack} objects for all available audio tracks.\n */\n getAvailableAudioTracks = async (): Promise<AudioTrack[]> => {\n return PlayerModule.getAvailableAudioTracks(this.nativeId);\n };\n\n /**\n * Sets the audio track to the ID specified by trackIdentifier. A list can be retrieved by calling getAvailableAudioTracks.\n *\n * @param trackIdentifier - The {@link AudioTrack.identifier} to be set.\n */\n setAudioTrack = async (trackIdentifier: string): Promise<void> => {\n return PlayerModule.setAudioTrack(this.nativeId, trackIdentifier);\n };\n\n /**\n * @returns The currently selected {@link SubtitleTrack} or `null`.\n */\n getSubtitleTrack = async (): Promise<SubtitleTrack | null> => {\n return PlayerModule.getSubtitleTrack(this.nativeId);\n };\n\n /**\n * @returns An array containing SubtitleTrack objects for all available subtitle tracks.\n */\n getAvailableSubtitles = async (): Promise<SubtitleTrack[]> => {\n return PlayerModule.getAvailableSubtitles(this.nativeId);\n };\n\n /**\n * Sets the subtitle track to the ID specified by trackIdentifier. A list can be retrieved by calling getAvailableSubtitles.\n * Pass `undefined` to disable subtitles.\n *\n * @param trackIdentifier - The {@link SubtitleTrack.identifier} to be set.\n */\n setSubtitleTrack = async (\n trackIdentifier: string | undefined\n ): Promise<void> => {\n return PlayerModule.setSubtitleTrack(\n this.nativeId,\n trackIdentifier ?? null\n );\n };\n\n /**\n * Dynamically schedules the {@link AdItem} for playback.\n * Has no effect if there is no active playback session.\n *\n * @param adItem - Ad to be scheduled for playback.\n *\n * @platform iOS, Android\n */\n scheduleAd = (adItem: AdItem) => {\n void PlayerModule.scheduleAd(this.nativeId, adItem);\n };\n\n /**\n * Skips the current ad.\n * Has no effect if the current ad is not skippable or if no ad is being played back.\n *\n * @platform iOS, Android\n */\n skipAd = () => {\n void PlayerModule.skipAd(this.nativeId);\n };\n\n /**\n * @returns `true` while an ad is being played back or when main content playback has been paused for ad playback.\n * @platform iOS, Android\n */\n isAd = async (): Promise<boolean> => {\n return (await PlayerModule.isAd(this.nativeId)) ?? false;\n };\n\n /**\n * The current time shift of the live stream in seconds. This value is always 0 if the active {@link Source} is not a\n * live stream or no sources are loaded.\n */\n getTimeShift = async (): Promise<number> => {\n return (await PlayerModule.getTimeShift(this.nativeId)) ?? 0;\n };\n\n /**\n * The limit in seconds for time shifting. This value is either negative or 0 and it is always 0 if the active\n * {@link Source} is not a live stream or no sources are loaded.\n */\n getMaxTimeShift = async (): Promise<number> => {\n return (await PlayerModule.getMaxTimeShift(this.nativeId)) ?? 0;\n };\n\n /**\n * Sets the upper bitrate boundary for video qualities. All qualities with a bitrate\n * that is higher than this threshold will not be eligible for automatic quality selection.\n *\n * Can be set to `null` for no limitation.\n */\n setMaxSelectableBitrate = (bitrate: number | null) => {\n void PlayerModule.setMaxSelectableBitrate(this.nativeId, bitrate || -1);\n };\n\n /**\n * @returns a {@link Thumbnail} for the specified playback time for the currently active source if available.\n * Supported thumbnail formats are:\n * - `WebVtt` configured via {@link SourceConfig.thumbnailTrack}, on all supported platforms\n * - HLS `Image Media Playlist` in the multivariant playlist, Android-only\n * - DASH `Image Adaptation Set` as specified in DASH-IF IOP, Android-only\n * If a `WebVtt` thumbnail track is provided, any potential in-manifest thumbnails are ignored on Android.\n *\n * @param time - The time in seconds for which to retrieve the thumbnail.\n */\n getThumbnail = async (time: number): Promise<Thumbnail | null> => {\n return PlayerModule.getThumbnail(this.nativeId, time);\n };\n\n /**\n * Whether casting to a cast-compatible remote device is available. {@link CastAvailableEvent} signals when\n * casting becomes available.\n *\n * @platform iOS, Android\n */\n isCastAvailable = async (): Promise<boolean> => {\n return (await PlayerModule.isCastAvailable(this.nativeId)) ?? false;\n };\n\n /**\n * Whether video is currently being casted to a remote device and not played locally.\n *\n * @platform iOS, Android\n */\n isCasting = async (): Promise<boolean> => {\n return (await PlayerModule.isCasting(this.nativeId)) ?? false;\n };\n\n /**\n * Initiates casting the current video to a cast-compatible remote device. The user has to choose to which device it\n * should be sent.\n *\n * @platform iOS, Android\n */\n castVideo = () => {\n void PlayerModule.castVideo(this.nativeId);\n };\n\n /**\n * Stops casting the current video. Has no effect if {@link Player.isCasting} is `false`.\n *\n * @platform iOS, Android\n */\n castStop = () => {\n void PlayerModule.castStop(this.nativeId);\n };\n\n /**\n * Returns the currently selected video quality.\n * @returns The currently selected video quality.\n */\n getVideoQuality = async (): Promise<VideoQuality> => {\n return PlayerModule.getVideoQuality(this.nativeId);\n };\n\n /**\n * Returns an array containing all available video qualities the player can adapt between.\n * @returns An array containing all available video qualities the player can adapt between.\n */\n getAvailableVideoQualities = async (): Promise<VideoQuality[]> => {\n return PlayerModule.getAvailableVideoQualities(this.nativeId);\n };\n\n /**\n * Sets the video quality.\n * @platform Android\n *\n * @param qualityId value obtained from {@link VideoQuality}'s `id` property, which can be obtained via `Player.getAvailableVideoQualities()` to select a specific quality. To use automatic quality selection, 'auto' can be passed here.\n */\n setVideoQuality = (qualityId: string) => {\n if (Platform.OS !== 'android') {\n console.warn(\n `[Player ${this.nativeId}] Method setVideoQuality is not available for iOS and tvOS devices. Only Android devices.`\n );\n return;\n }\n void PlayerModule.setVideoQuality(this.nativeId, qualityId);\n };\n\n /**\n * Sets the playback speed of the player. Fast forward, slow motion and reverse playback are supported.\n * @remarks\n * Platform: iOS, tvOS\n *\n * - Slow motion is indicated by values between `0` and `1`.\n * - Fast forward by values greater than `1`.\n * - Slow reverse is used by values between `0` and `-1`, and fast reverse is used by values less than `-1`. iOS and tvOS only.\n * - Negative values are ignored during Casting and on Android.\n * - During reverse playback the playback will continue until the beginning of the active source is\n * reached. When reaching the beginning of the source, playback will be paused and the playback\n * speed will be reset to its default value of `1`. No {@link PlaybackFinishedEvent} will be\n * emitted in this case.\n *\n * @param playbackSpeed - The playback speed to set.\n */\n setPlaybackSpeed = (playbackSpeed: number) => {\n void PlayerModule.setPlaybackSpeed(this.nativeId, playbackSpeed);\n };\n\n /**\n * @see {@link setPlaybackSpeed} for details on which values playback speed can assume.\n * @returns The player's current playback speed.\n */\n getPlaybackSpeed = async (): Promise<number> => {\n return (await PlayerModule.getPlaybackSpeed(this.nativeId)) ?? 0;\n };\n\n /**\n * Checks the possibility to play the media at specified playback speed.\n * @param playbackSpeed - The playback speed to check.\n * @returns `true` if it's possible to play the media at the specified playback speed, otherwise `false`. On Android it always returns `undefined`.\n * @platform iOS, tvOS\n */\n canPlayAtPlaybackSpeed = async (\n playbackSpeed: number\n ): Promise<boolean | undefined> => {\n if (Platform.OS === 'android') {\n console.warn(\n `[Player ${this.nativeId}] Method canPlayAtPlaybackSpeed is not available for Android. Only iOS and tvOS devices.`\n );\n return undefined;\n }\n return (\n (await PlayerModule.canPlayAtPlaybackSpeed(\n this.nativeId,\n playbackSpeed\n )) ?? false\n );\n };\n\n private maybeInitDecoderConfig = () => {\n if (this.config?.playbackConfig?.decoderConfig == null) {\n return;\n }\n if (Platform.OS === 'ios') {\n return;\n }\n\n this.decoderConfig = new DecoderConfigBridge(\n this.config.playbackConfig.decoderConfig\n );\n this.decoderConfig.initialize();\n };\n}\n"]}
@@ -173,19 +173,6 @@ export interface TweaksConfig {
173
173
  * @platform Android
174
174
  */
175
175
  enableDrmLicenseRenewRetry?: boolean;
176
- /**
177
- * Determines whether `AVKit` should update Now Playing information automatically when using System UI.
178
- *
179
- * - If set to `false`, the automatic updates of Now Playing Info sent by `AVKit` are disabled.
180
- * This prevents interference with manual updates you may want to perform.
181
- * - If set to `true`, the default behaviour is maintained, allowing `AVKit` to handle Now Playing updates.
182
- *
183
- * Default is `true`.
184
- *
185
- * @deprecated To enable the Now Playing information use {@link MediaControlConfig.isEnabled}
186
- * @platform iOS
187
- */
188
- updatesNowPlayingInfoCenter?: boolean;
189
176
  /**
190
177
  * When switching between video formats (eg: adapting between video qualities)
191
178
  * the codec might be recreated due to several reasons.
@@ -1 +1 @@
1
- {"version":3,"file":"tweaksConfig.d.ts","sourceRoot":"","sources":["../src/tweaksConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,oBAAY,0BAA0B;IACpC;;OAEG;IACH,iBAAiB,sBAAsB;IACvC;;OAEG;IACH,oBAAoB,yBAAyB;IAC7C;;OAEG;IACH,qBAAqB,0BAA0B;CAChD;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;;;;;;;OAWG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;;;;;;;;OAWG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;;;;;;;;;OAYG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;OAOG;IACH,sBAAsB,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IAClD;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IAC/C;;;;;OAKG;IACH,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC;;;;OAIG;IACH,mCAAmC,CAAC,EAAE;QACpC;;;;WAIG;QACH,WAAW,CAAC,EAA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;;;OAKG;IACH,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC;;;;OAIG;IACH,mCAAmC,CAAC,EAAE;QACpC;;;;WAIG;QACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB;;;;WAIG;QACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;KACvB,CAAC;IACF;;;;;;;;;;OAUG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC;;;;;OAKG;IACH,oCAAoC,CAAC,EAAE,MAAM,CAAC;IAC9C;;;;;;OAMG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC;;;;;;;OAOG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC;;;;;;OAMG;IACH,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7C;;;;;;OAMG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC;;;;;;;;;;;;OAYG;IACH,2BAA2B,CAAC,EAAE,0BAA0B,EAAE,CAAC;CAC5D"}
@@ -1 +1 @@
1
- {"version":3,"file":"tweaksConfig.js","sourceRoot":"","sources":["../src/tweaksConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,0BAaX;AAbD,WAAY,0BAA0B;IACpC;;OAEG;IACH,qEAAuC,CAAA;IACvC;;OAEG;IACH,2EAA6C,CAAA;IAC7C;;OAEG;IACH,6EAA+C,CAAA;AACjD,CAAC,EAbW,0BAA0B,KAA1B,0BAA0B,QAarC","sourcesContent":["/**\n * When switching the video quality, the video decoder's configuration might change\n * as the player can't always know if the codec supports such configuration change, it destroys and recreates it.\n * This behaviour can cause brief black screens when switching between video qualities as codec recreation can be slow.\n *\n * If a codec is know to support a given configuration change without issues,\n * the configuration can be added to the `TweaksConfig.forceReuseVideoCodecReasons`\n * to always reuse the video codec and avoid the black screen.\n */\nexport enum ForceReuseVideoCodecReason {\n /**\n * The new video quality color information is not compatible.\n */\n ColorInfoMismatch = 'ColorInfoMismatch',\n /**\n * The new video quality exceed the decoder's configured maximum sample size.\n */\n MaxInputSizeExceeded = 'MaxInputSizeExceeded',\n /**\n * The new video quality exceed the decoder's configured maximum resolution.\n */\n MaxResolutionExceeded = 'MaxResolutionExceeded',\n}\n\n/**\n * This configuration is used as an incubator for experimental features. Tweaks are not officially\n * supported and are not guaranteed to be stable, i.e. their naming, functionality and API can\n * change at any time within the tweaks or when being promoted to an official feature and moved\n * into its final configuration namespace.\n */\nexport interface TweaksConfig {\n /**\n * The frequency in seconds `onTimeChanged` is called with `TimeChangedEvent`s.\n *\n * Default value in iOS is `1.0`.\n * Default value in Android is `0.2`.\n *\n * @platform iOS, Android\n */\n timeChangedInterval?: number;\n /**\n * If enabled, HLS playlists will be parsed and additional features and events are enabled. This includes:\n *\n * - {@link MetadataEvent}s carrying segment-specific metadata for custom HLS tags, like `#EXT-X-SCTE35`\n * - {@link MetadataParsedEvent}s carrying segment-specific metadata for custom HLS tags, like `#EXT-X-SCTE35`\n * - DrmDataParsedEvents when a `#EXT-X-KEY` is found\n * - {@link Player.getAvailableVideoQualities} includes additional information\n * - Automatic retries when HLS playlist requests failed with non-2xx HTTP status code\n *\n * @defaultValue `false`\n * @platform iOS\n */\n isNativeHlsParsingEnabled?: boolean;\n /**\n * If enabled, playlists will be downloaded by the Bitmovin Player SDK instead of AVFoundation.\n * This enables additional features and events, like:\n *\n * - DownloadFinishedEvents for playlist downloads.\n * - SourceWarningEvents when no `#EXT-X-PLAYLIST-TYPE` is found If set to false, enabling\n * nativeHlsParsingEnabled won’t have any effect.\n *\n * Default is true.\n *\n * @platform iOS\n */\n isCustomHlsLoadingEnabled?: boolean;\n /**\n * The threshold which will be applied when seeking to the end in seconds. This value will be used\n * to calculate the maximum seekable time when calling `player.seek(time:)` or `player.playlist.seek(source:time:)`,\n * so the maximum value will be duration - seekToEndThreshold.\n *\n * This is useful if the duration of the segments does not match the duration specified in the\n * manifest. In this case, if we try to seek to the end, AVPlayer could get stuck and might stall\n * forever Therefore increasing this value could help.\n *\n * Default is 0.5.\n *\n * @platform iOS\n */\n seekToEndThreshold?: number;\n /**\n * Specifies the player behaviour when `Player.play` is called. Default is 'relaxed'.\n *\n * - 'relaxed': Starts playback when enough media data is buffered and continuous playback without stalling can be ensured. If insufficient media data is buffered for playback to start, the player will act as if the buffer became empty during playback.\n * - 'aggressive': When the buffer is not empty, this setting will cause the player to start playback of available media immediately. If insufficient media data is buffered for playback to start, the player will act as if the buffer became empty during playback.\n *\n * @platform iOS\n */\n playbackStartBehaviour?: 'relaxed' | 'aggressive';\n /**\n * Specifies the player behaviour when stalling should be exited. Default is 'relaxed'.\n *\n * - 'relaxed': The player will wait until the buffer is filled that it can, most likely, ensure continuous playback without another stalling right after playback continued.\n * - 'aggressive': The player will try to unstall as soon as some media data became available and will start playback of this media immediately.\n *\n * @platform iOS\n */\n unstallingBehaviour?: 'relaxed' | 'aggressive';\n /**\n * Constantly aggregated and weighted bandwidth samples are summed up to this weight limit to calculate an bandwidth estimation. Remaining samples (i.e. that would lead to exceeding the limit) are dropped from memory as they are not relevant anymore.\n * Default is 2000.\n *\n * @platform Android\n */\n bandwidthEstimateWeightLimit?: number;\n /**\n * Some devices have an incorrect implementation of MediaCodec.setOutputSurface. This leads to failure when the surface changes. To prevent failure, the codec will be released and re-instantiated in those scenarios.\n *\n * @platform Android\n */\n devicesThatRequireSurfaceWorkaround?: {\n /**\n * A device name as reported by Build.DEVICE.\n *\n * @see Build.DEVICE: https://developer.android.com/reference/kotlin/android/os/Build.html#DEVICE--\n */\n deviceNames?: string[];\n /**\n * A model name as reported by Build.MODEL.\n *\n * @see Build.MODEL: https://developer.android.com/reference/kotlin/android/os/Build.html#MODEL--\n */\n modelNames?: string[];\n };\n /**\n * Specifies if the language property on DASH Representations, HLS Renditions and SmoothStreaming QualityLevels is normalized.\n * If enabled, language properties are normalized to IETF BCP 47 language tags. Default is true.\n *\n * Examples:\n * - \"ENG\" is normalized to \"en\"\n * - \"en_us\" is normalized to \"en-us\"\n * - \"en-US-x-lvariant-POSIX\" is normalized to \"en-us-posix\"\n *\n * @platform Android\n */\n languagePropertyNormalization?: boolean;\n /**\n * The interval in which dynamic DASH windows are updated locally. I.e. The rate by which the\n * playback window is moved forward on the timeline.\n *\n * @platform Android\n */\n localDynamicDashWindowUpdateInterval?: number;\n /**\n * Specifies whether a DRM session should be used for clear tracks of type video and audio. Using\n * DRM sessions for clear content avoids the recreation of decoders when transitioning between clear\n * and encrypted sections of content. Default is false.\n *\n * @platform Android\n */\n useDrmSessionForClearPeriods?: boolean;\n /**\n * Specifies whether a DRM session should be used for clear tracks of type video and audio in a clear\n * source that follows after a DRM protected source. In addition, a DRM session will be used for clear\n * periods in a DRM protected source. Using DRM sessions for clear content avoids the recreation of\n * decoders when transitioning between clear and encrypted sections of content. Default is false.\n *\n * @platform Android\n */\n useDrmSessionForClearSources?: boolean;\n /**\n * Specifies if the player should always fall back to an extractor matching the file type, if no\n * matching extractor was found. If the fallback is applied, this will ignore potential incompatibilities\n * with streams and thus can result in unstable or failing playback.\n *\n * @platform Android\n */\n useFiletypeExtractorFallbackForHls?: boolean;\n /**\n * If enabled, the player will retry renewing a DRM license in case the first renewal attempt fails.\n * This can help maintain playback for long-running sessions where the license might expire.\n *\n * @defaultValue `false`\n * @platform Android\n */\n enableDrmLicenseRenewRetry?: boolean;\n /**\n * Determines whether `AVKit` should update Now Playing information automatically when using System UI.\n *\n * - If set to `false`, the automatic updates of Now Playing Info sent by `AVKit` are disabled.\n * This prevents interference with manual updates you may want to perform.\n * - If set to `true`, the default behaviour is maintained, allowing `AVKit` to handle Now Playing updates.\n *\n * Default is `true`.\n *\n * @deprecated To enable the Now Playing information use {@link MediaControlConfig.isEnabled}\n * @platform iOS\n */\n updatesNowPlayingInfoCenter?: boolean;\n\n /**\n * When switching between video formats (eg: adapting between video qualities)\n * the codec might be recreated due to several reasons.\n * This behaviour can cause brief black screens when switching between video qualities as codec recreation can be\n * slow.\n *\n * If a device is know to support video format changes and keep the current decoder without issues,\n * this set can be filled with multiple `ForceReuseVideoCodecReason` and avoid the black screen.\n *\n * Default is `null` i.e not set\n *\n * @platform Android\n */\n forceReuseVideoCodecReasons?: ForceReuseVideoCodecReason[];\n}\n"]}
1
+ {"version":3,"file":"tweaksConfig.js","sourceRoot":"","sources":["../src/tweaksConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,0BAaX;AAbD,WAAY,0BAA0B;IACpC;;OAEG;IACH,qEAAuC,CAAA;IACvC;;OAEG;IACH,2EAA6C,CAAA;IAC7C;;OAEG;IACH,6EAA+C,CAAA;AACjD,CAAC,EAbW,0BAA0B,KAA1B,0BAA0B,QAarC","sourcesContent":["/**\n * When switching the video quality, the video decoder's configuration might change\n * as the player can't always know if the codec supports such configuration change, it destroys and recreates it.\n * This behaviour can cause brief black screens when switching between video qualities as codec recreation can be slow.\n *\n * If a codec is know to support a given configuration change without issues,\n * the configuration can be added to the `TweaksConfig.forceReuseVideoCodecReasons`\n * to always reuse the video codec and avoid the black screen.\n */\nexport enum ForceReuseVideoCodecReason {\n /**\n * The new video quality color information is not compatible.\n */\n ColorInfoMismatch = 'ColorInfoMismatch',\n /**\n * The new video quality exceed the decoder's configured maximum sample size.\n */\n MaxInputSizeExceeded = 'MaxInputSizeExceeded',\n /**\n * The new video quality exceed the decoder's configured maximum resolution.\n */\n MaxResolutionExceeded = 'MaxResolutionExceeded',\n}\n\n/**\n * This configuration is used as an incubator for experimental features. Tweaks are not officially\n * supported and are not guaranteed to be stable, i.e. their naming, functionality and API can\n * change at any time within the tweaks or when being promoted to an official feature and moved\n * into its final configuration namespace.\n */\nexport interface TweaksConfig {\n /**\n * The frequency in seconds `onTimeChanged` is called with `TimeChangedEvent`s.\n *\n * Default value in iOS is `1.0`.\n * Default value in Android is `0.2`.\n *\n * @platform iOS, Android\n */\n timeChangedInterval?: number;\n /**\n * If enabled, HLS playlists will be parsed and additional features and events are enabled. This includes:\n *\n * - {@link MetadataEvent}s carrying segment-specific metadata for custom HLS tags, like `#EXT-X-SCTE35`\n * - {@link MetadataParsedEvent}s carrying segment-specific metadata for custom HLS tags, like `#EXT-X-SCTE35`\n * - DrmDataParsedEvents when a `#EXT-X-KEY` is found\n * - {@link Player.getAvailableVideoQualities} includes additional information\n * - Automatic retries when HLS playlist requests failed with non-2xx HTTP status code\n *\n * @defaultValue `false`\n * @platform iOS\n */\n isNativeHlsParsingEnabled?: boolean;\n /**\n * If enabled, playlists will be downloaded by the Bitmovin Player SDK instead of AVFoundation.\n * This enables additional features and events, like:\n *\n * - DownloadFinishedEvents for playlist downloads.\n * - SourceWarningEvents when no `#EXT-X-PLAYLIST-TYPE` is found If set to false, enabling\n * nativeHlsParsingEnabled won’t have any effect.\n *\n * Default is true.\n *\n * @platform iOS\n */\n isCustomHlsLoadingEnabled?: boolean;\n /**\n * The threshold which will be applied when seeking to the end in seconds. This value will be used\n * to calculate the maximum seekable time when calling `player.seek(time:)` or `player.playlist.seek(source:time:)`,\n * so the maximum value will be duration - seekToEndThreshold.\n *\n * This is useful if the duration of the segments does not match the duration specified in the\n * manifest. In this case, if we try to seek to the end, AVPlayer could get stuck and might stall\n * forever Therefore increasing this value could help.\n *\n * Default is 0.5.\n *\n * @platform iOS\n */\n seekToEndThreshold?: number;\n /**\n * Specifies the player behaviour when `Player.play` is called. Default is 'relaxed'.\n *\n * - 'relaxed': Starts playback when enough media data is buffered and continuous playback without stalling can be ensured. If insufficient media data is buffered for playback to start, the player will act as if the buffer became empty during playback.\n * - 'aggressive': When the buffer is not empty, this setting will cause the player to start playback of available media immediately. If insufficient media data is buffered for playback to start, the player will act as if the buffer became empty during playback.\n *\n * @platform iOS\n */\n playbackStartBehaviour?: 'relaxed' | 'aggressive';\n /**\n * Specifies the player behaviour when stalling should be exited. Default is 'relaxed'.\n *\n * - 'relaxed': The player will wait until the buffer is filled that it can, most likely, ensure continuous playback without another stalling right after playback continued.\n * - 'aggressive': The player will try to unstall as soon as some media data became available and will start playback of this media immediately.\n *\n * @platform iOS\n */\n unstallingBehaviour?: 'relaxed' | 'aggressive';\n /**\n * Constantly aggregated and weighted bandwidth samples are summed up to this weight limit to calculate an bandwidth estimation. Remaining samples (i.e. that would lead to exceeding the limit) are dropped from memory as they are not relevant anymore.\n * Default is 2000.\n *\n * @platform Android\n */\n bandwidthEstimateWeightLimit?: number;\n /**\n * Some devices have an incorrect implementation of MediaCodec.setOutputSurface. This leads to failure when the surface changes. To prevent failure, the codec will be released and re-instantiated in those scenarios.\n *\n * @platform Android\n */\n devicesThatRequireSurfaceWorkaround?: {\n /**\n * A device name as reported by Build.DEVICE.\n *\n * @see Build.DEVICE: https://developer.android.com/reference/kotlin/android/os/Build.html#DEVICE--\n */\n deviceNames?: string[];\n /**\n * A model name as reported by Build.MODEL.\n *\n * @see Build.MODEL: https://developer.android.com/reference/kotlin/android/os/Build.html#MODEL--\n */\n modelNames?: string[];\n };\n /**\n * Specifies if the language property on DASH Representations, HLS Renditions and SmoothStreaming QualityLevels is normalized.\n * If enabled, language properties are normalized to IETF BCP 47 language tags. Default is true.\n *\n * Examples:\n * - \"ENG\" is normalized to \"en\"\n * - \"en_us\" is normalized to \"en-us\"\n * - \"en-US-x-lvariant-POSIX\" is normalized to \"en-us-posix\"\n *\n * @platform Android\n */\n languagePropertyNormalization?: boolean;\n /**\n * The interval in which dynamic DASH windows are updated locally. I.e. The rate by which the\n * playback window is moved forward on the timeline.\n *\n * @platform Android\n */\n localDynamicDashWindowUpdateInterval?: number;\n /**\n * Specifies whether a DRM session should be used for clear tracks of type video and audio. Using\n * DRM sessions for clear content avoids the recreation of decoders when transitioning between clear\n * and encrypted sections of content. Default is false.\n *\n * @platform Android\n */\n useDrmSessionForClearPeriods?: boolean;\n /**\n * Specifies whether a DRM session should be used for clear tracks of type video and audio in a clear\n * source that follows after a DRM protected source. In addition, a DRM session will be used for clear\n * periods in a DRM protected source. Using DRM sessions for clear content avoids the recreation of\n * decoders when transitioning between clear and encrypted sections of content. Default is false.\n *\n * @platform Android\n */\n useDrmSessionForClearSources?: boolean;\n /**\n * Specifies if the player should always fall back to an extractor matching the file type, if no\n * matching extractor was found. If the fallback is applied, this will ignore potential incompatibilities\n * with streams and thus can result in unstable or failing playback.\n *\n * @platform Android\n */\n useFiletypeExtractorFallbackForHls?: boolean;\n /**\n * If enabled, the player will retry renewing a DRM license in case the first renewal attempt fails.\n * This can help maintain playback for long-running sessions where the license might expire.\n *\n * @defaultValue `false`\n * @platform Android\n */\n enableDrmLicenseRenewRetry?: boolean;\n\n /**\n * When switching between video formats (eg: adapting between video qualities)\n * the codec might be recreated due to several reasons.\n * This behaviour can cause brief black screens when switching between video qualities as codec recreation can be\n * slow.\n *\n * If a device is know to support video format changes and keep the current decoder without issues,\n * this set can be filled with multiple `ForceReuseVideoCodecReason` and avoid the black screen.\n *\n * Default is `null` i.e not set\n *\n * @platform Android\n */\n forceReuseVideoCodecReasons?: ForceReuseVideoCodecReason[];\n}\n"]}
@@ -162,6 +162,11 @@ public class PlayerModule: Module {
162
162
  nil
163
163
  #endif
164
164
  }.runOnQueue(.main)
165
+ AsyncFunction("showAirPlayTargetPicker") { (nativeId: NativeId) in
166
+ #if os(iOS)
167
+ PlayerRegistry.getPlayer(nativeId: nativeId)?.showAirPlayTargetPicker()
168
+ #endif
169
+ }.runOnQueue(.main)
165
170
  AsyncFunction("isCastAvailable") { (nativeId: NativeId) -> Bool? in
166
171
  PlayerRegistry.getPlayer(nativeId: nativeId)?.isCastAvailable
167
172
  }.runOnQueue(.main)
@@ -146,11 +146,6 @@ extension RCTConvert {
146
146
  break
147
147
  }
148
148
  }
149
- #if !os(tvOS)
150
- if let updatesNowPlayingInfoCenter = json["updatesNowPlayingInfoCenter"] as? Bool {
151
- tweaksConfig.updatesNowPlayingInfoCenter = updatesNowPlayingInfoCenter
152
- }
153
- #endif
154
149
  return tweaksConfig
155
150
  }
156
151
 
@@ -28,7 +28,7 @@ Pod::Spec.new do |s|
28
28
  s.static_framework = true
29
29
 
30
30
  s.dependency 'ExpoModulesCore'
31
- s.dependency "BitmovinPlayer", "3.114.1"
31
+ s.dependency "BitmovinPlayer", "3.115.0"
32
32
  s.ios.dependency "GoogleAds-IMA-iOS-SDK", "3.26.1"
33
33
  s.tvos.dependency "GoogleAds-IMA-tvOS-SDK", "4.15.1"
34
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitmovin-player-react-native",
3
- "version": "1.20.1",
3
+ "version": "1.21.0",
4
4
  "description": "Official React Native bindings for Bitmovin's mobile Player SDKs.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -23,6 +23,7 @@
23
23
  "setup-hooks": "./scripts/setup-hooks.sh",
24
24
  "lint:ios": "swiftlint ios --strict --quiet",
25
25
  "lint:android": "cd android && ./gradlew -b ktlint.gradle ktlintCheck --quiet --console=plain",
26
+ "test:plugin": "yarn build:plugin && node scripts/test-with-app-gradle-dependencies.js",
26
27
  "prepare": "expo-module prepare",
27
28
  "prepublishOnly": "expo-module prepublishOnly",
28
29
  "module": "expo-module",
@@ -1,24 +1,87 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const config_plugins_1 = require("expo/config-plugins");
4
+ const DEFAULT_SPACING = ' ';
4
5
  const defaultProps = {
5
- spacing: ' ',
6
+ spacing: DEFAULT_SPACING,
6
7
  dependencies: [],
7
8
  };
9
+ const CORE_LIBRARY_DESUGARING_DEPENDENCY = "coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'";
10
+ const CORE_LIBRARY_DESUGARING_ARTIFACT = 'com.android.tools:desugar_jdk_libs';
11
+ const hasCoreLibraryDesugaringEnabled = (contents) => /^\s*(?:set)?CoreLibraryDesugaringEnabled\b.*?\btrue\b/m.test(contents);
12
+ const escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
13
+ const hasGradleDependencyDeclaration = (contents, dependency, configuration, allowVersionSuffix = false) => {
14
+ const dependencyPattern = escapeRegExp(dependency);
15
+ const configurationPattern = configuration
16
+ ? escapeRegExp(configuration)
17
+ : '[A-Za-z_][\\w.-]*';
18
+ const versionSuffixPattern = allowVersionSuffix ? `(?::[^'"]*)?` : '';
19
+ const declarationPattern = new RegExp(`^${configurationPattern}\\s*(?:\\(\\s*)?['"]${dependencyPattern}${versionSuffixPattern}['"]`);
20
+ let nestedBlockDepth = 0;
21
+ return contents.split('\n').some((line) => {
22
+ const trimmedLine = line.trim();
23
+ if (trimmedLine.startsWith('//')) {
24
+ return false;
25
+ }
26
+ if (/^dependencies\s*\{$/.test(trimmedLine)) {
27
+ return false;
28
+ }
29
+ const isTopLevelDependency = nestedBlockDepth === 0 && declarationPattern.test(trimmedLine);
30
+ const openBlockCount = (trimmedLine.match(/\{/g) || []).length;
31
+ const closeBlockCount = (trimmedLine.match(/\}/g) || []).length;
32
+ nestedBlockDepth += openBlockCount - closeBlockCount;
33
+ return isTopLevelDependency;
34
+ });
35
+ };
36
+ // Matches any pinned version of the desugaring artifact so an existing
37
+ // declaration is never duplicated, even when it pins a different version.
38
+ const hasCoreLibraryDesugaringDependency = (contents) => hasGradleDependencyDeclaration(contents, CORE_LIBRARY_DESUGARING_ARTIFACT, 'coreLibraryDesugaring', true);
39
+ const replaceDisabledCoreLibraryDesugaringSettings = (contents) => contents
40
+ .replace(/^(\s*)setCoreLibraryDesugaringEnabled\s*\(\s*false\s*\)/gm, '$1setCoreLibraryDesugaringEnabled(true)')
41
+ .replace(/^(\s*)coreLibraryDesugaringEnabled(\s*=\s*)false\b/gm, '$1coreLibraryDesugaringEnabled$2true')
42
+ .replace(/^(\s*)coreLibraryDesugaringEnabled(\s+)false\b/gm, '$1coreLibraryDesugaringEnabled$2true');
43
+ const ensureCoreLibraryDesugaringCompileOptions = (contents, spacing, androidBlockStart, androidPosition) => {
44
+ const androidBlock = contents.slice(androidBlockStart, androidPosition);
45
+ const updatedAndroidBlock = replaceDisabledCoreLibraryDesugaringSettings(androidBlock);
46
+ const updatedContents = [
47
+ contents.slice(0, androidBlockStart),
48
+ updatedAndroidBlock,
49
+ contents.slice(androidPosition),
50
+ ].join('');
51
+ const updatedAndroidPosition = androidPosition + updatedAndroidBlock.length - androidBlock.length;
52
+ if (hasCoreLibraryDesugaringEnabled(updatedAndroidBlock)) {
53
+ return updatedContents;
54
+ }
55
+ const compileOptionsRelativeStart = updatedAndroidBlock.search(/^[^\S\r\n]*compileOptions\s*\{$/m);
56
+ if (compileOptionsRelativeStart === -1) {
57
+ const compileOptions = [
58
+ `${spacing}compileOptions {`,
59
+ `${spacing}${spacing}setCoreLibraryDesugaringEnabled(true)`,
60
+ `${spacing}}`,
61
+ '',
62
+ ].join('\n');
63
+ return [
64
+ updatedContents.slice(0, updatedAndroidPosition),
65
+ compileOptions,
66
+ updatedContents.slice(updatedAndroidPosition),
67
+ ].join('');
68
+ }
69
+ const compileOptionsStart = androidBlockStart + compileOptionsRelativeStart;
70
+ const compileOptionsLineEnd = updatedContents.indexOf('\n', compileOptionsStart) + 1;
71
+ return [
72
+ updatedContents.slice(0, compileOptionsLineEnd),
73
+ `${spacing}${spacing}setCoreLibraryDesugaringEnabled(true)\n`,
74
+ updatedContents.slice(compileOptionsLineEnd),
75
+ ].join('');
76
+ };
8
77
  const withAppGradleDependencies = (config, props) => {
9
78
  const combinedProps = { ...defaultProps, ...(props || {}) };
79
+ const spacing = combinedProps.spacing || DEFAULT_SPACING;
10
80
  config = (0, config_plugins_1.withAppBuildGradle)(config, (config) => {
11
81
  if (config.modResults.language !== 'groovy') {
12
82
  config_plugins_1.WarningAggregator.addWarningAndroid('withAppGradleDependencies', `Cannot automatically configure app/build.gradle if it's not groovy`);
13
83
  return config;
14
84
  }
15
- const deduplicatedDependencies = Array.from(new Set(combinedProps.dependencies));
16
- const filteredDependencies = deduplicatedDependencies.filter((dep) => {
17
- return config.modResults.contents.indexOf(dep) === -1;
18
- });
19
- if (filteredDependencies.length === 0) {
20
- return config;
21
- }
22
85
  const androidBlockStart = config.modResults.contents.search(/^android \{$/m);
23
86
  if (androidBlockStart === -1) {
24
87
  config_plugins_1.WarningAggregator.addWarningAndroid('withAppGradleDependencies', `Cannot configure app/build.gradle as no android block start was found`);
@@ -30,19 +93,6 @@ const withAppGradleDependencies = (config, props) => {
30
93
  config_plugins_1.WarningAggregator.addWarningAndroid('withAppGradleDependencies', `Cannot configure app/build.gradle as no android block end was found`);
31
94
  return config;
32
95
  }
33
- const androidPosition = androidBlockStart + androidBlockEnd;
34
- const compileOptions = [];
35
- compileOptions.push(`${combinedProps.spacing}compileOptions {`);
36
- compileOptions.push('\n');
37
- compileOptions.push(`${combinedProps.spacing}setCoreLibraryDesugaringEnabled(true)`);
38
- compileOptions.push('\n');
39
- compileOptions.push(`${combinedProps.spacing}}`);
40
- compileOptions.push('\n');
41
- config.modResults.contents = [
42
- config.modResults.contents.slice(0, androidPosition),
43
- ...compileOptions,
44
- config.modResults.contents.slice(androidPosition),
45
- ].join('');
46
96
  const dependenciesBlockStart = config.modResults.contents.search(/^dependencies \{$/m);
47
97
  if (dependenciesBlockStart === -1) {
48
98
  config_plugins_1.WarningAggregator.addWarningAndroid('withAppGradleDependencies', `Cannot configure app/build.gradle as no dependency block start was found`);
@@ -54,18 +104,27 @@ const withAppGradleDependencies = (config, props) => {
54
104
  config_plugins_1.WarningAggregator.addWarningAndroid('withAppGradleDependencies', `Cannot configure app/build.gradle as no dependency block end was found`);
55
105
  return config;
56
106
  }
57
- const position = dependenciesBlockStart + dependenciesBlockEnd;
58
- let insertedDependencies = [];
59
- insertedDependencies.push('\n');
60
- insertedDependencies.push(`${combinedProps.spacing}coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'`);
61
- insertedDependencies.push('\n');
62
- filteredDependencies.forEach((dependency) => {
63
- insertedDependencies.push(`${combinedProps.spacing}implementation '${dependency}'\n`);
64
- });
65
- insertedDependencies.push('\n');
107
+ const androidPosition = androidBlockStart + androidBlockEnd;
108
+ config.modResults.contents = ensureCoreLibraryDesugaringCompileOptions(config.modResults.contents, spacing, androidBlockStart, androidPosition);
109
+ const updatedDependenciesBlockStart = config.modResults.contents.search(/^dependencies \{$/m);
110
+ const updatedFromDependencies = config.modResults.contents.substring(updatedDependenciesBlockStart);
111
+ const updatedDependenciesBlockEnd = updatedFromDependencies.search(/^\}$/m);
112
+ const position = updatedDependenciesBlockStart + updatedDependenciesBlockEnd;
113
+ const dependenciesBlock = config.modResults.contents.slice(updatedDependenciesBlockStart, position);
114
+ const dependencyDeclarations = [
115
+ ...(!hasCoreLibraryDesugaringDependency(dependenciesBlock)
116
+ ? [`${spacing}${CORE_LIBRARY_DESUGARING_DEPENDENCY}`]
117
+ : []),
118
+ ...Array.from(new Set(combinedProps.dependencies))
119
+ .filter((dependency) => !hasGradleDependencyDeclaration(dependenciesBlock, dependency))
120
+ .map((dependency) => `${spacing}implementation '${dependency}'`),
121
+ ];
122
+ if (dependencyDeclarations.length === 0) {
123
+ return config;
124
+ }
66
125
  config.modResults.contents = [
67
126
  config.modResults.contents.slice(0, position),
68
- ...insertedDependencies,
127
+ `\n${dependencyDeclarations.join('\n')}\n`,
69
128
  config.modResults.contents.slice(position),
70
129
  ].join('');
71
130
  return config;