bitmovin-player-react-native 0.25.0 → 0.26.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.
- package/RNBitmovinPlayer.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/bitmovin/player/reactnative/PlayerModule.kt +14 -0
- package/lib/index.d.mts +73 -53
- package/lib/index.d.ts +73 -53
- package/lib/index.js +47 -19
- package/lib/index.mjs +47 -19
- package/package.json +1 -1
- package/src/events.ts +28 -28
- package/src/player.ts +43 -18
- package/src/source.ts +11 -7
package/RNBitmovinPlayer.podspec
CHANGED
|
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
|
|
|
19
19
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
20
20
|
|
|
21
21
|
s.dependency "React-Core"
|
|
22
|
-
s.dependency "BitmovinPlayer", "3.
|
|
22
|
+
s.dependency "BitmovinPlayer", "3.65.0"
|
|
23
23
|
s.ios.dependency "GoogleAds-IMA-iOS-SDK", "3.19.1"
|
|
24
24
|
s.tvos.dependency "GoogleAds-IMA-tvOS-SDK", "4.9.2"
|
|
25
25
|
end
|
package/android/build.gradle
CHANGED
|
@@ -105,5 +105,5 @@ dependencies {
|
|
|
105
105
|
// Bitmovin
|
|
106
106
|
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.31.0'
|
|
107
107
|
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
|
|
108
|
-
implementation 'com.bitmovin.player:player:3.
|
|
108
|
+
implementation 'com.bitmovin.player:player:3.73.0+jason'
|
|
109
109
|
}
|
|
@@ -550,6 +550,20 @@ class PlayerModule(context: ReactApplicationContext) : BitmovinBaseModule(contex
|
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
552
|
|
|
553
|
+
/**
|
|
554
|
+
* Set [nativeId]'s player video quality.
|
|
555
|
+
* NOTE: ONLY available on Android. No effect on iOS and tvOS devices.
|
|
556
|
+
* @param nativeId Target player Id.
|
|
557
|
+
* @param qualityId The videoQualityId identifier. A list of currently available VideoQualitys can be retrieved via availableVideoQualities. To use automatic quality selection, Quality.AUTO_ID can be passed as qualityId.
|
|
558
|
+
* @param promise JS promise object.
|
|
559
|
+
*/
|
|
560
|
+
@ReactMethod
|
|
561
|
+
fun setVideoQuality(nativeId: NativeId, qualityId: String, promise: Promise) {
|
|
562
|
+
promise.unit.resolveOnUiThreadWithPlayer(nativeId) {
|
|
563
|
+
source?.setVideoQuality(qualityId)
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
553
567
|
/**
|
|
554
568
|
* Resolve [nativeId]'s current playback speed.
|
|
555
569
|
*/
|
package/lib/index.d.mts
CHANGED
|
@@ -923,7 +923,7 @@ declare enum SourceType {
|
|
|
923
923
|
PROGRESSIVE = "progressive"
|
|
924
924
|
}
|
|
925
925
|
/**
|
|
926
|
-
* The different loading states a
|
|
926
|
+
* The different loading states a {@link Source} instance can be in.
|
|
927
927
|
*/
|
|
928
928
|
declare enum LoadingState {
|
|
929
929
|
/**
|
|
@@ -1021,7 +1021,7 @@ interface SourceConfig extends NativeInstanceConfig {
|
|
|
1021
1021
|
*/
|
|
1022
1022
|
options?: SourceOptions;
|
|
1023
1023
|
/**
|
|
1024
|
-
* The `SourceMetadata` for the
|
|
1024
|
+
* The `SourceMetadata` for the {@link Source} to setup custom analytics tracking
|
|
1025
1025
|
*/
|
|
1026
1026
|
analyticsSourceMetadata?: SourceMetadata;
|
|
1027
1027
|
}
|
|
@@ -1055,19 +1055,19 @@ declare class Source extends NativeInstance<SourceConfig> {
|
|
|
1055
1055
|
*/
|
|
1056
1056
|
remoteControl: SourceRemoteControlConfig | null;
|
|
1057
1057
|
/**
|
|
1058
|
-
* Whether the native
|
|
1058
|
+
* Whether the native {@link Source} object has been created.
|
|
1059
1059
|
*/
|
|
1060
1060
|
isInitialized: boolean;
|
|
1061
1061
|
/**
|
|
1062
|
-
* Whether the native
|
|
1062
|
+
* Whether the native {@link Source} object has been disposed.
|
|
1063
1063
|
*/
|
|
1064
1064
|
isDestroyed: boolean;
|
|
1065
1065
|
/**
|
|
1066
|
-
* Allocates the native
|
|
1066
|
+
* Allocates the native {@link Source} instance and its resources natively.
|
|
1067
1067
|
*/
|
|
1068
1068
|
initialize: () => void;
|
|
1069
1069
|
/**
|
|
1070
|
-
* Destroys the native
|
|
1070
|
+
* Destroys the native {@link Source} and releases all of its allocated resources.
|
|
1071
1071
|
*/
|
|
1072
1072
|
destroy: () => void;
|
|
1073
1073
|
/**
|
|
@@ -1091,6 +1091,8 @@ declare class Source extends NativeInstance<SourceConfig> {
|
|
|
1091
1091
|
/**
|
|
1092
1092
|
* Set metadata for the currently loaded source.
|
|
1093
1093
|
* Setting the metadata to `null` clears the metadata object in native source.
|
|
1094
|
+
*
|
|
1095
|
+
* @param metadata metadata to be set.
|
|
1094
1096
|
*/
|
|
1095
1097
|
setMetadata: (metadata: Record<string, any> | null) => void;
|
|
1096
1098
|
/**
|
|
@@ -1100,10 +1102,12 @@ declare class Source extends NativeInstance<SourceConfig> {
|
|
|
1100
1102
|
/**
|
|
1101
1103
|
* @returns a `Thumbnail` for the specified playback time if available.
|
|
1102
1104
|
* Supported thumbnail formats are:
|
|
1103
|
-
* - `WebVtt` configured via
|
|
1105
|
+
* - `WebVtt` configured via {@link SourceConfig.thumbnailTrack}, on all supported platforms
|
|
1104
1106
|
* - HLS `Image Media Playlist` in the multivariant playlist, Android-only
|
|
1105
1107
|
* - DASH `Image Adaptation Set` as specified in DASH-IF IOP, Android-only
|
|
1106
1108
|
* If a `WebVtt` thumbnail track is provided, any potential in-manifest thumbnails are ignored on Android.
|
|
1109
|
+
*
|
|
1110
|
+
* @param time - The time in seconds for which to retrieve the thumbnail.
|
|
1107
1111
|
*/
|
|
1108
1112
|
getThumbnail: (time: number) => Promise<Thumbnail | null>;
|
|
1109
1113
|
}
|
|
@@ -1284,7 +1288,7 @@ interface ErrorEvent extends Event {
|
|
|
1284
1288
|
*/
|
|
1285
1289
|
message: string;
|
|
1286
1290
|
/**
|
|
1287
|
-
* Underlying data emitted with the
|
|
1291
|
+
* Underlying data emitted with the error or warning.
|
|
1288
1292
|
*/
|
|
1289
1293
|
data?: Record<string, any>;
|
|
1290
1294
|
}
|
|
@@ -1358,9 +1362,9 @@ interface PlayingEvent extends Event {
|
|
|
1358
1362
|
interface PlaybackFinishedEvent extends Event {
|
|
1359
1363
|
}
|
|
1360
1364
|
/**
|
|
1361
|
-
* Source object representation the way it appears on
|
|
1365
|
+
* Source object representation the way it appears on event's payloads such as `SeekEvent`, for example.
|
|
1362
1366
|
*
|
|
1363
|
-
* This interface only type hints what should be the shape of a
|
|
1367
|
+
* This interface only type hints what should be the shape of a {@link Source} object inside an event's
|
|
1364
1368
|
* payload during runtime so it has no direct relation with the `Source` class present in `src/source.ts`.
|
|
1365
1369
|
*
|
|
1366
1370
|
* Do not mistake it for a `NativeInstance` type.
|
|
@@ -1383,7 +1387,7 @@ interface EventSource {
|
|
|
1383
1387
|
*/
|
|
1384
1388
|
metadata?: Record<string, any>;
|
|
1385
1389
|
/**
|
|
1386
|
-
* The current
|
|
1390
|
+
* The current {@link LoadingState} of the source.
|
|
1387
1391
|
*/
|
|
1388
1392
|
loadingState: LoadingState;
|
|
1389
1393
|
}
|
|
@@ -1392,11 +1396,11 @@ interface EventSource {
|
|
|
1392
1396
|
*/
|
|
1393
1397
|
interface SeekPosition {
|
|
1394
1398
|
/**
|
|
1395
|
-
* The relevant
|
|
1399
|
+
* The relevant {@link Source}.
|
|
1396
1400
|
*/
|
|
1397
1401
|
source: EventSource;
|
|
1398
1402
|
/**
|
|
1399
|
-
* The position within the
|
|
1403
|
+
* The position within the {@link Source} in seconds.
|
|
1400
1404
|
*/
|
|
1401
1405
|
time: number;
|
|
1402
1406
|
}
|
|
@@ -1475,7 +1479,7 @@ interface SourceLoadEvent extends Event {
|
|
|
1475
1479
|
/**
|
|
1476
1480
|
* Emitted when a new source is loaded.
|
|
1477
1481
|
* This does not mean that the source is immediately ready for playback.
|
|
1478
|
-
*
|
|
1482
|
+
* {@link ReadyEvent} indicates the player is ready for immediate playback.
|
|
1479
1483
|
*/
|
|
1480
1484
|
interface SourceLoadedEvent extends Event {
|
|
1481
1485
|
/**
|
|
@@ -1636,7 +1640,7 @@ interface PictureInPictureAvailabilityChangedEvent extends Event {
|
|
|
1636
1640
|
*/
|
|
1637
1641
|
interface AdBreakStartedEvent extends Event {
|
|
1638
1642
|
/**
|
|
1639
|
-
* The
|
|
1643
|
+
* The {@link AdBreak} that has started.
|
|
1640
1644
|
*/
|
|
1641
1645
|
adBreak?: AdBreak;
|
|
1642
1646
|
}
|
|
@@ -1645,7 +1649,7 @@ interface AdBreakStartedEvent extends Event {
|
|
|
1645
1649
|
*/
|
|
1646
1650
|
interface AdBreakFinishedEvent extends Event {
|
|
1647
1651
|
/**
|
|
1648
|
-
* The
|
|
1652
|
+
* The {@link AdBreak} that has finished.
|
|
1649
1653
|
*/
|
|
1650
1654
|
adBreak?: AdBreak;
|
|
1651
1655
|
}
|
|
@@ -1654,7 +1658,7 @@ interface AdBreakFinishedEvent extends Event {
|
|
|
1654
1658
|
*/
|
|
1655
1659
|
interface AdStartedEvent extends Event {
|
|
1656
1660
|
/**
|
|
1657
|
-
* The
|
|
1661
|
+
* The {@link Ad} this event is related to.
|
|
1658
1662
|
*/
|
|
1659
1663
|
ad?: Ad;
|
|
1660
1664
|
/**
|
|
@@ -1662,7 +1666,7 @@ interface AdStartedEvent extends Event {
|
|
|
1662
1666
|
*/
|
|
1663
1667
|
clickThroughUrl?: string;
|
|
1664
1668
|
/**
|
|
1665
|
-
* The
|
|
1669
|
+
* The {@link AdSourceType} of the started ad.
|
|
1666
1670
|
*/
|
|
1667
1671
|
clientType?: AdSourceType;
|
|
1668
1672
|
/**
|
|
@@ -1674,7 +1678,7 @@ interface AdStartedEvent extends Event {
|
|
|
1674
1678
|
*/
|
|
1675
1679
|
indexInQueue: number;
|
|
1676
1680
|
/**
|
|
1677
|
-
* The position of the corresponding
|
|
1681
|
+
* The position of the corresponding ad.
|
|
1678
1682
|
*/
|
|
1679
1683
|
position?: string;
|
|
1680
1684
|
/**
|
|
@@ -1682,7 +1686,7 @@ interface AdStartedEvent extends Event {
|
|
|
1682
1686
|
*/
|
|
1683
1687
|
skipOffset: number;
|
|
1684
1688
|
/**
|
|
1685
|
-
* The content time at which the
|
|
1689
|
+
* The main content time at which the ad is played.
|
|
1686
1690
|
*/
|
|
1687
1691
|
timeOffset: number;
|
|
1688
1692
|
}
|
|
@@ -1691,7 +1695,7 @@ interface AdStartedEvent extends Event {
|
|
|
1691
1695
|
*/
|
|
1692
1696
|
interface AdFinishedEvent extends Event {
|
|
1693
1697
|
/**
|
|
1694
|
-
* The
|
|
1698
|
+
* The {@link Ad} that finished playback.
|
|
1695
1699
|
*/
|
|
1696
1700
|
ad?: Ad;
|
|
1697
1701
|
}
|
|
@@ -1700,11 +1704,11 @@ interface AdFinishedEvent extends Event {
|
|
|
1700
1704
|
*/
|
|
1701
1705
|
interface AdErrorEvent extends ErrorEvent {
|
|
1702
1706
|
/**
|
|
1703
|
-
* The
|
|
1707
|
+
* The {@link AdConfig} for which the ad error occurred.
|
|
1704
1708
|
*/
|
|
1705
1709
|
adConfig?: AdConfig;
|
|
1706
1710
|
/**
|
|
1707
|
-
* The
|
|
1711
|
+
* The {@link AdItem} for which the ad error occurred.
|
|
1708
1712
|
*/
|
|
1709
1713
|
adItem?: AdItem;
|
|
1710
1714
|
}
|
|
@@ -1722,7 +1726,7 @@ interface AdClickedEvent extends Event {
|
|
|
1722
1726
|
*/
|
|
1723
1727
|
interface AdSkippedEvent extends Event {
|
|
1724
1728
|
/**
|
|
1725
|
-
* The
|
|
1729
|
+
* The ad that was skipped.
|
|
1726
1730
|
*/
|
|
1727
1731
|
ad?: Ad;
|
|
1728
1732
|
}
|
|
@@ -1731,7 +1735,7 @@ interface AdSkippedEvent extends Event {
|
|
|
1731
1735
|
*/
|
|
1732
1736
|
interface AdQuartileEvent extends Event {
|
|
1733
1737
|
/**
|
|
1734
|
-
* The
|
|
1738
|
+
* The {@link AdQuartile} boundary that playback has progressed over.
|
|
1735
1739
|
*/
|
|
1736
1740
|
quartile: AdQuartile;
|
|
1737
1741
|
}
|
|
@@ -1749,11 +1753,11 @@ interface AdScheduledEvent extends Event {
|
|
|
1749
1753
|
*/
|
|
1750
1754
|
interface AdManifestLoadEvent extends Event {
|
|
1751
1755
|
/**
|
|
1752
|
-
* The
|
|
1756
|
+
* The {@link AdBreak} this event is related to.
|
|
1753
1757
|
*/
|
|
1754
1758
|
adBreak?: AdBreak;
|
|
1755
1759
|
/**
|
|
1756
|
-
* The
|
|
1760
|
+
* The {@link AdConfig} of the loaded ad manifest.
|
|
1757
1761
|
*/
|
|
1758
1762
|
adConfig?: AdConfig;
|
|
1759
1763
|
}
|
|
@@ -1762,11 +1766,11 @@ interface AdManifestLoadEvent extends Event {
|
|
|
1762
1766
|
*/
|
|
1763
1767
|
interface AdManifestLoadedEvent extends Event {
|
|
1764
1768
|
/**
|
|
1765
|
-
* The
|
|
1769
|
+
* The {@link AdBreak} this event is related to.
|
|
1766
1770
|
*/
|
|
1767
1771
|
adBreak?: AdBreak;
|
|
1768
1772
|
/**
|
|
1769
|
-
* The
|
|
1773
|
+
* The {@link AdConfig} of the loaded ad manifest.
|
|
1770
1774
|
*/
|
|
1771
1775
|
adConfig?: AdConfig;
|
|
1772
1776
|
/**
|
|
@@ -1808,21 +1812,21 @@ interface CastAvailableEvent extends Event {
|
|
|
1808
1812
|
/**
|
|
1809
1813
|
* Emitted when the playback on a cast-compatible device was paused.
|
|
1810
1814
|
*
|
|
1811
|
-
* On Android
|
|
1815
|
+
* On Android {@link PausedEvent} is also emitted while casting.
|
|
1812
1816
|
*/
|
|
1813
1817
|
interface CastPausedEvent extends Event {
|
|
1814
1818
|
}
|
|
1815
1819
|
/**
|
|
1816
1820
|
* Emitted when the playback on a cast-compatible device has finished.
|
|
1817
1821
|
*
|
|
1818
|
-
* On Android
|
|
1822
|
+
* On Android {@link PlaybackFinishedEvent} is also emitted while casting.
|
|
1819
1823
|
*/
|
|
1820
1824
|
interface CastPlaybackFinishedEvent extends Event {
|
|
1821
1825
|
}
|
|
1822
1826
|
/**
|
|
1823
1827
|
* Emitted when playback on a cast-compatible device has started.
|
|
1824
1828
|
*
|
|
1825
|
-
* On Android
|
|
1829
|
+
* On Android {@link PlayingEvent} is also emitted while casting.
|
|
1826
1830
|
*/
|
|
1827
1831
|
interface CastPlayingEvent extends Event {
|
|
1828
1832
|
}
|
|
@@ -1851,7 +1855,7 @@ interface CastStoppedEvent extends Event {
|
|
|
1851
1855
|
interface CastTimeUpdatedEvent extends Event {
|
|
1852
1856
|
}
|
|
1853
1857
|
/**
|
|
1854
|
-
* Contains information for the
|
|
1858
|
+
* Contains information for the {@link CastWaitingForDeviceEvent}.
|
|
1855
1859
|
*/
|
|
1856
1860
|
interface CastPayload {
|
|
1857
1861
|
/**
|
|
@@ -1863,7 +1867,7 @@ interface CastPayload {
|
|
|
1863
1867
|
*/
|
|
1864
1868
|
deviceName: string | null;
|
|
1865
1869
|
/**
|
|
1866
|
-
* The type of the payload (always "cast").
|
|
1870
|
+
* The type of the payload (always `"cast"`).
|
|
1867
1871
|
*/
|
|
1868
1872
|
type: string;
|
|
1869
1873
|
}
|
|
@@ -1873,7 +1877,7 @@ interface CastPayload {
|
|
|
1873
1877
|
*/
|
|
1874
1878
|
interface CastWaitingForDeviceEvent extends Event {
|
|
1875
1879
|
/**
|
|
1876
|
-
* The
|
|
1880
|
+
* The {@link CastPayload} object for the event
|
|
1877
1881
|
*/
|
|
1878
1882
|
castPayload: CastPayload;
|
|
1879
1883
|
}
|
|
@@ -3254,12 +3258,12 @@ declare class BufferApi {
|
|
|
3254
3258
|
}
|
|
3255
3259
|
|
|
3256
3260
|
/**
|
|
3257
|
-
* Loads, controls and renders audio and video content represented through
|
|
3258
|
-
* instance can be created via the
|
|
3259
|
-
* loaded. Once
|
|
3261
|
+
* Loads, controls and renders audio and video content represented through {@link Source}s. A player
|
|
3262
|
+
* instance can be created via the {@link usePlayer} hook and will idle until one or more {@link Source}s are
|
|
3263
|
+
* loaded. Once {@link Player.load} or {@link Player.loadSource} is called, the player becomes active and initiates necessary downloads to
|
|
3260
3264
|
* start playback of the loaded source(s).
|
|
3261
3265
|
*
|
|
3262
|
-
* Can be attached to
|
|
3266
|
+
* Can be attached to {@link PlayerView} component in order to use Bitmovin's Player Web UI.
|
|
3263
3267
|
* @see PlayerView
|
|
3264
3268
|
*/
|
|
3265
3269
|
declare class Player extends NativeInstance<PlayerConfig> {
|
|
@@ -3295,19 +3299,19 @@ declare class Player extends NativeInstance<PlayerConfig> {
|
|
|
3295
3299
|
*/
|
|
3296
3300
|
destroy: () => void;
|
|
3297
3301
|
/**
|
|
3298
|
-
* Loads a new
|
|
3302
|
+
* Loads a new {@link Source} from `sourceConfig` into the player.
|
|
3299
3303
|
*/
|
|
3300
3304
|
load: (sourceConfig: SourceConfig) => void;
|
|
3301
3305
|
/**
|
|
3302
|
-
* Loads the downloaded content from
|
|
3306
|
+
* Loads the downloaded content from {@link OfflineContentManager} into the player.
|
|
3303
3307
|
*/
|
|
3304
3308
|
loadOfflineContent: (offlineContentManager: OfflineContentManager, options?: OfflineSourceOptions) => void;
|
|
3305
3309
|
/**
|
|
3306
|
-
* Loads the given
|
|
3310
|
+
* Loads the given {@link Source} into the player.
|
|
3307
3311
|
*/
|
|
3308
3312
|
loadSource: (source: Source) => void;
|
|
3309
3313
|
/**
|
|
3310
|
-
* Unloads all
|
|
3314
|
+
* Unloads all {@link Source}s from the player.
|
|
3311
3315
|
*/
|
|
3312
3316
|
unload: () => void;
|
|
3313
3317
|
/**
|
|
@@ -3334,6 +3338,8 @@ declare class Player extends NativeInstance<PlayerConfig> {
|
|
|
3334
3338
|
* Has no effect for VoD.
|
|
3335
3339
|
*
|
|
3336
3340
|
* Has no effect if no sources are loaded.
|
|
3341
|
+
*
|
|
3342
|
+
* @param offset - Target offset from the live edge in seconds.
|
|
3337
3343
|
*/
|
|
3338
3344
|
timeShift: (offset: number) => void;
|
|
3339
3345
|
/**
|
|
@@ -3400,15 +3406,17 @@ declare class Player extends NativeInstance<PlayerConfig> {
|
|
|
3400
3406
|
*/
|
|
3401
3407
|
getAudioTrack: () => Promise<AudioTrack | null>;
|
|
3402
3408
|
/**
|
|
3403
|
-
* @returns An array containing AudioTrack objects for all available audio tracks.
|
|
3409
|
+
* @returns An array containing {@link AudioTrack} objects for all available audio tracks.
|
|
3404
3410
|
*/
|
|
3405
3411
|
getAvailableAudioTracks: () => Promise<AudioTrack[]>;
|
|
3406
3412
|
/**
|
|
3407
3413
|
* Sets the audio track to the ID specified by trackIdentifier. A list can be retrieved by calling getAvailableAudioTracks.
|
|
3414
|
+
*
|
|
3415
|
+
* @param trackIdentifier - The {@link AudioTrack.identifier} to be set.
|
|
3408
3416
|
*/
|
|
3409
3417
|
setAudioTrack: (trackIdentifier: string) => Promise<void>;
|
|
3410
3418
|
/**
|
|
3411
|
-
* @returns The currently selected
|
|
3419
|
+
* @returns The currently selected {@link SubtitleTrack} or `null`.
|
|
3412
3420
|
*/
|
|
3413
3421
|
getSubtitleTrack: () => Promise<SubtitleTrack | null>;
|
|
3414
3422
|
/**
|
|
@@ -3417,10 +3425,12 @@ declare class Player extends NativeInstance<PlayerConfig> {
|
|
|
3417
3425
|
getAvailableSubtitles: () => Promise<SubtitleTrack[]>;
|
|
3418
3426
|
/**
|
|
3419
3427
|
* Sets the subtitle track to the ID specified by trackIdentifier. A list can be retrieved by calling getAvailableSubtitles.
|
|
3428
|
+
*
|
|
3429
|
+
* @param trackIdentifier - The {@link SubtitleTrack.identifier} to be set.
|
|
3420
3430
|
*/
|
|
3421
3431
|
setSubtitleTrack: (trackIdentifier?: string) => Promise<void>;
|
|
3422
3432
|
/**
|
|
3423
|
-
* Dynamically schedules the
|
|
3433
|
+
* Dynamically schedules the {@link AdItem} for playback.
|
|
3424
3434
|
* Has no effect if there is no active playback session.
|
|
3425
3435
|
*
|
|
3426
3436
|
* @param adItem - Ad to be scheduled for playback.
|
|
@@ -3441,13 +3451,13 @@ declare class Player extends NativeInstance<PlayerConfig> {
|
|
|
3441
3451
|
*/
|
|
3442
3452
|
isAd: () => Promise<boolean>;
|
|
3443
3453
|
/**
|
|
3444
|
-
* The current time shift of the live stream in seconds. This value is always 0 if the active
|
|
3454
|
+
* The current time shift of the live stream in seconds. This value is always 0 if the active {@link Source} is not a
|
|
3445
3455
|
* live stream or no sources are loaded.
|
|
3446
3456
|
*/
|
|
3447
3457
|
getTimeShift: () => Promise<number>;
|
|
3448
3458
|
/**
|
|
3449
3459
|
* The limit in seconds for time shifting. This value is either negative or 0 and it is always 0 if the active
|
|
3450
|
-
*
|
|
3460
|
+
* {@link Source} is not a live stream or no sources are loaded.
|
|
3451
3461
|
*/
|
|
3452
3462
|
getMaxTimeShift: () => Promise<number>;
|
|
3453
3463
|
/**
|
|
@@ -3458,16 +3468,18 @@ declare class Player extends NativeInstance<PlayerConfig> {
|
|
|
3458
3468
|
*/
|
|
3459
3469
|
setMaxSelectableBitrate: (bitrate: number | null) => void;
|
|
3460
3470
|
/**
|
|
3461
|
-
* @returns a
|
|
3471
|
+
* @returns a {@link Thumbnail} for the specified playback time for the currently active source if available.
|
|
3462
3472
|
* Supported thumbnail formats are:
|
|
3463
|
-
* - `WebVtt` configured via
|
|
3473
|
+
* - `WebVtt` configured via {@link SourceConfig.thumbnailTrack}, on all supported platforms
|
|
3464
3474
|
* - HLS `Image Media Playlist` in the multivariant playlist, Android-only
|
|
3465
3475
|
* - DASH `Image Adaptation Set` as specified in DASH-IF IOP, Android-only
|
|
3466
3476
|
* If a `WebVtt` thumbnail track is provided, any potential in-manifest thumbnails are ignored on Android.
|
|
3477
|
+
*
|
|
3478
|
+
* @param time - The time in seconds for which to retrieve the thumbnail.
|
|
3467
3479
|
*/
|
|
3468
3480
|
getThumbnail: (time: number) => Promise<Thumbnail | null>;
|
|
3469
3481
|
/**
|
|
3470
|
-
* Whether casting to a cast-compatible remote device is available.
|
|
3482
|
+
* Whether casting to a cast-compatible remote device is available. {@link CastAvailableEvent} signals when
|
|
3471
3483
|
* casting becomes available.
|
|
3472
3484
|
*
|
|
3473
3485
|
* @platform iOS, Android
|
|
@@ -3487,7 +3499,7 @@ declare class Player extends NativeInstance<PlayerConfig> {
|
|
|
3487
3499
|
*/
|
|
3488
3500
|
castVideo: () => void;
|
|
3489
3501
|
/**
|
|
3490
|
-
* Stops casting the current video. Has no effect if
|
|
3502
|
+
* Stops casting the current video. Has no effect if {@link Player.isCasting} is `false`.
|
|
3491
3503
|
*
|
|
3492
3504
|
* @platform iOS, Android
|
|
3493
3505
|
*/
|
|
@@ -3502,6 +3514,14 @@ declare class Player extends NativeInstance<PlayerConfig> {
|
|
|
3502
3514
|
* @returns An array containing all available video qualities the player can adapt between.
|
|
3503
3515
|
*/
|
|
3504
3516
|
getAvailableVideoQualities: () => Promise<VideoQuality[]>;
|
|
3517
|
+
/**
|
|
3518
|
+
* Sets the video quality.
|
|
3519
|
+
* @remarks Only available on Android.
|
|
3520
|
+
* @platform Android
|
|
3521
|
+
*
|
|
3522
|
+
* @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.
|
|
3523
|
+
*/
|
|
3524
|
+
setVideoQuality: (qualityId: String) => void;
|
|
3505
3525
|
/**
|
|
3506
3526
|
* Sets the playback speed of the player. Fast forward, slow motion and reverse playback are supported.
|
|
3507
3527
|
* @note
|
|
@@ -3526,7 +3546,7 @@ declare class Player extends NativeInstance<PlayerConfig> {
|
|
|
3526
3546
|
getPlaybackSpeed: () => Promise<number>;
|
|
3527
3547
|
/**
|
|
3528
3548
|
* Checks the possibility to play the media at specified playback speed.
|
|
3529
|
-
* @param playbackSpeed The playback speed to check.
|
|
3549
|
+
* @param playbackSpeed - The playback speed to check.
|
|
3530
3550
|
* @returns `true` if it's possible to play the media at the specified playback speed, otherwise `false`. On Android it always returns `undefined`.
|
|
3531
3551
|
* @platform iOS, tvOS
|
|
3532
3552
|
*/
|