Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitmovin-player-react-native

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitmovin-player-react-native - npm Package Compare versions

Comparing version 0.25.0 to 0.26.0

66

lib/index.js

@@ -664,11 +664,11 @@ "use strict";

/**
* Whether the native `Source` object has been created.
* Whether the native {@link Source} object has been created.
*/
__publicField(this, "isInitialized", false);
/**
* Whether the native `Source` object has been disposed.
* Whether the native {@link Source} object has been disposed.
*/
__publicField(this, "isDestroyed", false);
/**
* Allocates the native `Source` instance and its resources natively.
* Allocates the native {@link Source} instance and its resources natively.
*/

@@ -702,3 +702,3 @@ __publicField(this, "initialize", () => {

/**
* Destroys the native `Source` and releases all of its allocated resources.
* Destroys the native {@link Source} and releases all of its allocated resources.
*/

@@ -741,2 +741,4 @@ __publicField(this, "destroy", () => {

* Setting the metadata to `null` clears the metadata object in native source.
*
* @param metadata metadata to be set.
*/

@@ -755,6 +757,8 @@ __publicField(this, "setMetadata", (metadata) => {

* Supported thumbnail formats are:
* - `WebVtt` configured via `SourceConfig.thumbnailTrack`, on all supported platforms
* - `WebVtt` configured via {@link SourceConfig.thumbnailTrack}, on all supported platforms
* - HLS `Image Media Playlist` in the multivariant playlist, Android-only
* - DASH `Image Adaptation Set` as specified in DASH-IF IOP, Android-only
* If a `WebVtt` thumbnail track is provided, any potential in-manifest thumbnails are ignored on Android.
*
* @param time - The time in seconds for which to retrieve the thumbnail.
*/

@@ -967,3 +971,3 @@ __publicField(this, "getThumbnail", async (time) => {

/**
* Loads a new `Source` from `sourceConfig` into the player.
* Loads a new {@link Source} from `sourceConfig` into the player.
*/

@@ -974,3 +978,3 @@ __publicField(this, "load", (sourceConfig) => {

/**
* Loads the downloaded content from `OfflineContentManager` into the player.
* Loads the downloaded content from {@link OfflineContentManager} into the player.
*/

@@ -985,3 +989,3 @@ __publicField(this, "loadOfflineContent", (offlineContentManager, options) => {

/**
* Loads the given `Source` into the player.
* Loads the given {@link Source} into the player.
*/

@@ -994,3 +998,3 @@ __publicField(this, "loadSource", (source) => {

/**
* Unloads all `Source`s from the player.
* Unloads all {@link Source}s from the player.
*/

@@ -1030,2 +1034,4 @@ __publicField(this, "unload", () => {

* Has no effect if no sources are loaded.
*
* @param offset - Target offset from the live edge in seconds.
*/

@@ -1137,3 +1143,3 @@ __publicField(this, "timeShift", (offset) => {

/**
* @returns An array containing AudioTrack objects for all available audio tracks.
* @returns An array containing {@link AudioTrack} objects for all available audio tracks.
*/

@@ -1145,2 +1151,4 @@ __publicField(this, "getAvailableAudioTracks", async () => {

* Sets the audio track to the ID specified by trackIdentifier. A list can be retrieved by calling getAvailableAudioTracks.
*
* @param trackIdentifier - The {@link AudioTrack.identifier} to be set.
*/

@@ -1151,3 +1159,3 @@ __publicField(this, "setAudioTrack", async (trackIdentifier) => {

/**
* @returns The currently selected subtitle track or `null`.
* @returns The currently selected {@link SubtitleTrack} or `null`.
*/

@@ -1165,2 +1173,4 @@ __publicField(this, "getSubtitleTrack", async () => {

* Sets the subtitle track to the ID specified by trackIdentifier. A list can be retrieved by calling getAvailableSubtitles.
*
* @param trackIdentifier - The {@link SubtitleTrack.identifier} to be set.
*/

@@ -1171,3 +1181,3 @@ __publicField(this, "setSubtitleTrack", async (trackIdentifier) => {

/**
* Dynamically schedules the `adItem` for playback.
* Dynamically schedules the {@link AdItem} for playback.
* Has no effect if there is no active playback session.

@@ -1199,3 +1209,3 @@ *

/**
* The current time shift of the live stream in seconds. This value is always 0 if the active `source` is not a
* The current time shift of the live stream in seconds. This value is always 0 if the active {@link Source} is not a
* live stream or no sources are loaded.

@@ -1208,3 +1218,3 @@ */

* The limit in seconds for time shifting. This value is either negative or 0 and it is always 0 if the active
* `source` is not a live stream or no sources are loaded.
* {@link Source} is not a live stream or no sources are loaded.
*/

@@ -1224,8 +1234,10 @@ __publicField(this, "getMaxTimeShift", async () => {

/**
* @returns a `Thumbnail` for the specified playback time for the currently active source if available.
* @returns a {@link Thumbnail} for the specified playback time for the currently active source if available.
* Supported thumbnail formats are:
* - `WebVtt` configured via `SourceConfig.thumbnailTrack`, on all supported platforms
* - `WebVtt` configured via {@link SourceConfig.thumbnailTrack}, on all supported platforms
* - HLS `Image Media Playlist` in the multivariant playlist, Android-only
* - DASH `Image Adaptation Set` as specified in DASH-IF IOP, Android-only
* If a `WebVtt` thumbnail track is provided, any potential in-manifest thumbnails are ignored on Android.
*
* @param time - The time in seconds for which to retrieve the thumbnail.
*/

@@ -1236,3 +1248,3 @@ __publicField(this, "getThumbnail", async (time) => {

/**
* Whether casting to a cast-compatible remote device is available. `CastAvailableEvent` signals when
* Whether casting to a cast-compatible remote device is available. {@link CastAvailableEvent} signals when
* casting becomes available.

@@ -1263,3 +1275,3 @@ *

/**
* Stops casting the current video. Has no effect if `isCasting` is false.
* Stops casting the current video. Has no effect if {@link Player.isCasting} is `false`.
*

@@ -1286,2 +1298,18 @@ * @platform iOS, Android

/**
* Sets the video quality.
* @remarks Only available on Android.
* @platform Android
*
* @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.
*/
__publicField(this, "setVideoQuality", (qualityId) => {
if (import_react_native13.Platform.OS !== "android") {
console.warn(
`[Player ${this.nativeId}] Method setVideoQuality is not available for iOS and tvOS devices. Only Android devices.`
);
return;
}
PlayerModule.setVideoQuality(this.nativeId, qualityId);
});
/**
* Sets the playback speed of the player. Fast forward, slow motion and reverse playback are supported.

@@ -1314,3 +1342,3 @@ * @note

* Checks the possibility to play the media at specified playback speed.
* @param playbackSpeed The playback speed to check.
* @param playbackSpeed - The playback speed to check.
* @returns `true` if it's possible to play the media at the specified playback speed, otherwise `false`. On Android it always returns `undefined`.

@@ -1317,0 +1345,0 @@ * @platform iOS, tvOS

{
"name": "bitmovin-player-react-native",
"version": "0.25.0",
"version": "0.26.0",
"description": "Official React Native bindings for Bitmovin's mobile Player SDKs.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -42,3 +42,3 @@ import {

/**
* Underlying data emitted with the Error/Warning.
* Underlying data emitted with the error or warning.
*/

@@ -121,5 +121,5 @@ data?: Record<string, any>;

/**
* Source object representation the way it appears on `Event` payloads such as `SeekEvent`, for example.
* Source object representation the way it appears on event's payloads such as `SeekEvent`, for example.
*
* This interface only type hints what should be the shape of a `Source` object inside an `Event`'s
* This interface only type hints what should be the shape of a {@link Source} object inside an event's
* payload during runtime so it has no direct relation with the `Source` class present in `src/source.ts`.

@@ -147,3 +147,3 @@ *

/**
* The current `LoadingState` of the source.
* The current {@link LoadingState} of the source.
*/

@@ -158,7 +158,7 @@ loadingState: LoadingState;

/**
* The relevant `Source`.
* The relevant {@link Source}.
*/
source: EventSource;
/**
* The position within the `source` in seconds.
* The position within the {@link Source} in seconds.
*/

@@ -247,3 +247,3 @@ time: number;

* This does not mean that the source is immediately ready for playback.
* `ReadyEvent` indicates the player is ready for immediate playback.
* {@link ReadyEvent} indicates the player is ready for immediate playback.
*/

@@ -418,3 +418,3 @@ export interface SourceLoadedEvent extends Event {

/**
* The `AdBreak` that has started.
* The {@link AdBreak} that has started.
*/

@@ -429,3 +429,3 @@ adBreak?: AdBreak;

/**
* The `AdBreak` that has finished.
* The {@link AdBreak} that has finished.
*/

@@ -440,3 +440,3 @@ adBreak?: AdBreak;

/**
* The `Ad` this event is related to.
* The {@link Ad} this event is related to.
*/

@@ -449,3 +449,3 @@ ad?: Ad;

/**
* The `AdSourceType` of the started `Ad`.
* The {@link AdSourceType} of the started ad.
*/

@@ -462,3 +462,3 @@ clientType?: AdSourceType;

/**
* The position of the corresponding `Ad`.
* The position of the corresponding ad.
*/

@@ -471,3 +471,3 @@ position?: string;

/**
* The content time at which the `Ad` is played.
* The main content time at which the ad is played.
*/

@@ -482,3 +482,3 @@ timeOffset: number;

/**
* The `Ad` that finished playback.
* The {@link Ad} that finished playback.
*/

@@ -493,7 +493,7 @@ ad?: Ad;

/**
* The `AdConfig` for which the ad error occurred.
* The {@link AdConfig} for which the ad error occurred.
*/
adConfig?: AdConfig;
/**
* The `AdItem` for which the ad error occurred.
* The {@link AdItem} for which the ad error occurred.
*/

@@ -518,3 +518,3 @@ adItem?: AdItem;

/**
* The `Ad` that was skipped.
* The ad that was skipped.
*/

@@ -529,3 +529,3 @@ ad?: Ad;

/**
* The `AdQuartile` boundary that playback has progressed over.
* The {@link AdQuartile} boundary that playback has progressed over.
*/

@@ -550,7 +550,7 @@ quartile: AdQuartile;

/**
* The `AdBreak` this event is related to.
* The {@link AdBreak} this event is related to.
*/
adBreak?: AdBreak;
/**
* The `AdConfig` of the loaded ad manifest.
* The {@link AdConfig} of the loaded ad manifest.
*/

@@ -565,7 +565,7 @@ adConfig?: AdConfig;

/**
* The `AdBreak` this event is related to.
* The {@link AdBreak} this event is related to.
*/
adBreak?: AdBreak;
/**
* The `AdConfig` of the loaded ad manifest.
* The {@link AdConfig} of the loaded ad manifest.
*/

@@ -615,3 +615,3 @@ adConfig?: AdConfig;

*
* On Android `PausedEvent` is also emitted while casting.
* On Android {@link PausedEvent} is also emitted while casting.
*/

@@ -623,3 +623,3 @@ export interface CastPausedEvent extends Event {}

*
* On Android `PlaybackFinishedEvent` is also emitted while casting.
* On Android {@link PlaybackFinishedEvent} is also emitted while casting.
*/

@@ -631,3 +631,3 @@ export interface CastPlaybackFinishedEvent extends Event {}

*
* On Android `PlayingEvent` is also emitted while casting.
* On Android {@link PlayingEvent} is also emitted while casting.
*/

@@ -662,3 +662,3 @@ export interface CastPlayingEvent extends Event {}

/**
* Contains information for the `CastWaitingForDeviceEvent`.
* Contains information for the {@link CastWaitingForDeviceEvent}.
*/

@@ -675,3 +675,3 @@ export interface CastPayload {

/**
* The type of the payload (always "cast").
* The type of the payload (always `"cast"`).
*/

@@ -687,3 +687,3 @@ type: string;

/**
* The `CastPayload` object for the event
* The {@link CastPayload} object for the event
*/

@@ -690,0 +690,0 @@ castPayload: CastPayload;

@@ -18,8 +18,8 @@ import { NativeModules, Platform } from 'react-native';

/**
* Loads, controls and renders audio and video content represented through `Source`s. A player
* instance can be created via the `usePlayer` hook and will idle until one or more `Source`s are
* loaded. Once `load` is called, the player becomes active and initiates necessary downloads to
* Loads, controls and renders audio and video content represented through {@link Source}s. A player
* instance can be created via the {@link usePlayer} hook and will idle until one or more {@link Source}s are
* loaded. Once {@link Player.load} or {@link Player.loadSource} is called, the player becomes active and initiates necessary downloads to
* start playback of the loaded source(s).
*
* Can be attached to `PlayerView` component in order to use Bitmovin's Player Web UI.
* Can be attached to {@link PlayerView} component in order to use Bitmovin's Player Web UI.
* @see PlayerView

@@ -94,3 +94,3 @@ */

/**
* Loads a new `Source` from `sourceConfig` into the player.
* Loads a new {@link Source} from `sourceConfig` into the player.
*/

@@ -102,3 +102,3 @@ load = (sourceConfig: SourceConfig) => {

/**
* Loads the downloaded content from `OfflineContentManager` into the player.
* Loads the downloaded content from {@link OfflineContentManager} into the player.
*/

@@ -117,3 +117,3 @@ loadOfflineContent = (

/**
* Loads the given `Source` into the player.
* Loads the given {@link Source} into the player.
*/

@@ -127,3 +127,3 @@ loadSource = (source: Source) => {

/**
* Unloads all `Source`s from the player.
* Unloads all {@link Source}s from the player.
*/

@@ -167,2 +167,4 @@ unload = () => {

* Has no effect if no sources are loaded.
*
* @param offset - Target offset from the live edge in seconds.
*/

@@ -290,3 +292,3 @@ timeShift = (offset: number) => {

/**
* @returns An array containing AudioTrack objects for all available audio tracks.
* @returns An array containing {@link AudioTrack} objects for all available audio tracks.
*/

@@ -299,2 +301,4 @@ getAvailableAudioTracks = async (): Promise<AudioTrack[]> => {

* Sets the audio track to the ID specified by trackIdentifier. A list can be retrieved by calling getAvailableAudioTracks.
*
* @param trackIdentifier - The {@link AudioTrack.identifier} to be set.
*/

@@ -306,3 +310,3 @@ setAudioTrack = async (trackIdentifier: string): Promise<void> => {

/**
* @returns The currently selected subtitle track or `null`.
* @returns The currently selected {@link SubtitleTrack} or `null`.
*/

@@ -322,2 +326,4 @@ getSubtitleTrack = async (): Promise<SubtitleTrack | null> => {

* Sets the subtitle track to the ID specified by trackIdentifier. A list can be retrieved by calling getAvailableSubtitles.
*
* @param trackIdentifier - The {@link SubtitleTrack.identifier} to be set.
*/

@@ -329,3 +335,3 @@ setSubtitleTrack = async (trackIdentifier?: string): Promise<void> => {

/**
* Dynamically schedules the `adItem` for playback.
* Dynamically schedules the {@link AdItem} for playback.
* Has no effect if there is no active playback session.

@@ -360,3 +366,3 @@ *

/**
* The current time shift of the live stream in seconds. This value is always 0 if the active `source` is not a
* The current time shift of the live stream in seconds. This value is always 0 if the active {@link Source} is not a
* live stream or no sources are loaded.

@@ -370,3 +376,3 @@ */

* The limit in seconds for time shifting. This value is either negative or 0 and it is always 0 if the active
* `source` is not a live stream or no sources are loaded.
* {@link Source} is not a live stream or no sources are loaded.
*/

@@ -388,8 +394,10 @@ getMaxTimeShift = async (): Promise<number> => {

/**
* @returns a `Thumbnail` for the specified playback time for the currently active source if available.
* @returns a {@link Thumbnail} for the specified playback time for the currently active source if available.
* Supported thumbnail formats are:
* - `WebVtt` configured via `SourceConfig.thumbnailTrack`, on all supported platforms
* - `WebVtt` configured via {@link SourceConfig.thumbnailTrack}, on all supported platforms
* - HLS `Image Media Playlist` in the multivariant playlist, Android-only
* - DASH `Image Adaptation Set` as specified in DASH-IF IOP, Android-only
* If a `WebVtt` thumbnail track is provided, any potential in-manifest thumbnails are ignored on Android.
*
* @param time - The time in seconds for which to retrieve the thumbnail.
*/

@@ -401,3 +409,3 @@ getThumbnail = async (time: number): Promise<Thumbnail | null> => {

/**
* Whether casting to a cast-compatible remote device is available. `CastAvailableEvent` signals when
* Whether casting to a cast-compatible remote device is available. {@link CastAvailableEvent} signals when
* casting becomes available.

@@ -431,3 +439,3 @@ *

/**
* Stops casting the current video. Has no effect if `isCasting` is false.
* Stops casting the current video. Has no effect if {@link Player.isCasting} is `false`.
*

@@ -457,2 +465,19 @@ * @platform iOS, Android

/**
* Sets the video quality.
* @remarks Only available on Android.
* @platform Android
*
* @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.
*/
setVideoQuality = (qualityId: String) => {
if (Platform.OS !== 'android') {
console.warn(
`[Player ${this.nativeId}] Method setVideoQuality is not available for iOS and tvOS devices. Only Android devices.`
);
return;
}
PlayerModule.setVideoQuality(this.nativeId, qualityId);
};
/**
* Sets the playback speed of the player. Fast forward, slow motion and reverse playback are supported.

@@ -487,3 +512,3 @@ * @note

* Checks the possibility to play the media at specified playback speed.
* @param playbackSpeed The playback speed to check.
* @param playbackSpeed - The playback speed to check.
* @returns `true` if it's possible to play the media at the specified playback speed, otherwise `false`. On Android it always returns `undefined`.

@@ -490,0 +515,0 @@ * @platform iOS, tvOS

@@ -33,3 +33,3 @@ import { NativeModules } from 'react-native';

/**
* The different loading states a `Source` instance can be in.
* The different loading states a {@link Source} instance can be in.
*/

@@ -135,3 +135,3 @@ export enum LoadingState {

/**
* The `SourceMetadata` for the `Source` to setup custom analytics tracking
* The `SourceMetadata` for the {@link Source} to setup custom analytics tracking
*/

@@ -172,7 +172,7 @@ analyticsSourceMetadata?: SourceMetadata;

/**
* Whether the native `Source` object has been created.
* Whether the native {@link Source} object has been created.
*/
isInitialized = false;
/**
* Whether the native `Source` object has been disposed.
* Whether the native {@link Source} object has been disposed.
*/

@@ -182,3 +182,3 @@ isDestroyed = false;

/**
* Allocates the native `Source` instance and its resources natively.
* Allocates the native {@link Source} instance and its resources natively.
*/

@@ -213,3 +213,3 @@ initialize = () => {

/**
* Destroys the native `Source` and releases all of its allocated resources.
* Destroys the native {@link Source} and releases all of its allocated resources.
*/

@@ -257,2 +257,4 @@ destroy = () => {

* Setting the metadata to `null` clears the metadata object in native source.
*
* @param metadata metadata to be set.
*/

@@ -273,6 +275,8 @@ setMetadata = (metadata: Record<string, any> | null): void => {

* Supported thumbnail formats are:
* - `WebVtt` configured via `SourceConfig.thumbnailTrack`, on all supported platforms
* - `WebVtt` configured via {@link SourceConfig.thumbnailTrack}, on all supported platforms
* - HLS `Image Media Playlist` in the multivariant playlist, Android-only
* - DASH `Image Adaptation Set` as specified in DASH-IF IOP, Android-only
* If a `WebVtt` thumbnail track is provided, any potential in-manifest thumbnails are ignored on Android.
*
* @param time - The time in seconds for which to retrieve the thumbnail.
*/

@@ -279,0 +283,0 @@ getThumbnail = async (time: number): Promise<Thumbnail | null> => {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc