bitmovin-player-react-native 0.15.0 → 0.17.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/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  This is an open-source project created to enable customers to integrate the Bitmovin mobile Player SDKs into React Native projects. It has been created to provide customers with a starting point, which can be built upon through active collaboration and contributions. We look forward to seeing this library expand and grow.
4
4
 
5
- [![Build](https://github.com/bitmovin/bitmovin-player-react-native/actions/workflows/ci.yml/badge.svg)](https://github.com/bitmovin/bitmovin-player-react-native/actions/workflows/ci.yml)
5
+ [![CI (TypeScript)](https://github.com/bitmovin/bitmovin-player-react-native/actions/workflows/ci-typescript.yml/badge.svg)](https://github.com/bitmovin/bitmovin-player-react-native/actions/workflows/ci-typescript.yml)
6
+ [![CI (Android)](https://github.com/bitmovin/bitmovin-player-react-native/actions/workflows/ci-android.yml/badge.svg)](https://github.com/bitmovin/bitmovin-player-react-native/actions/workflows/ci-android.yml)
7
+ [![CI (iOS & tvOS)](https://github.com/bitmovin/bitmovin-player-react-native/actions/workflows/ci-ios-tvos.yml/badge.svg)](https://github.com/bitmovin/bitmovin-player-react-native/actions/workflows/ci-ios-tvos.yml)
6
8
  ![Platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20tvOS%20%7C%20Android%20%7C%20Android%20TV-lightgrey.svg)
7
9
  [![MIT License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
8
10
  [![Bitmovin Community](https://img.shields.io/discourse/users?label=community&server=https%3A%2F%2Fcommunity.bitmovin.com)](https://community.bitmovin.com/?utm_source=github&utm_medium=bitmovin-player-react-native&utm_campaign=dev-community)
@@ -35,6 +37,10 @@ Our API reference can be found [here](https://cdn.bitmovin.com/player/reactnativ
35
37
 
36
38
  Our [Getting Started Guide](https://developer.bitmovin.com/playback/docs/getting-started-react-native) walks you through setting up and configuring the Bitmovin Player in React Native projects.
37
39
 
40
+ ### Low-Code Wizard
41
+
42
+ Use the [Low-Code Wizard](https://dashboard.bitmovin.com/player/getting-started) in your Dashboard to quickly get started with the Player, with just a few lines of code.
43
+
38
44
  ### Feature Guides
39
45
 
40
46
  Check out our [React Native Guides](https://developer.bitmovin.com/playback/docs/guides-react-native) for more information on how to set up Player features such as Advertising, DRM-protected playback, Subtitles and more.
@@ -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.51.0"
22
+ s.dependency "BitmovinPlayer", "3.55.0"
23
23
  s.ios.dependency "GoogleAds-IMA-iOS-SDK", "3.18.4"
24
24
  s.tvos.dependency "GoogleAds-IMA-tvOS-SDK", "4.8.2"
25
25
  end
@@ -103,5 +103,5 @@ dependencies {
103
103
  // Bitmovin
104
104
  implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.31.0'
105
105
  implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
106
- implementation 'com.bitmovin.player:player:3.54.0+jason'
106
+ implementation 'com.bitmovin.player:player:3.57.1+jason'
107
107
  }
@@ -1,5 +1,5 @@
1
1
  android.useAndroidX=true
2
- BitmovinPlayerReactNative_kotlinVersion=1.8.20
2
+ BitmovinPlayerReactNative_kotlinVersion=1.9.21
3
3
  BitmovinPlayerReactNative_minSdkVersion=21
4
4
  BitmovinPlayerReactNative_targetSdkVersion=33
5
5
  BitmovinPlayerReactNative_compileSdkVersion=33
@@ -530,7 +530,11 @@ fun ReadableMap.toSubtitleTrack(): SubtitleTrack? {
530
530
  /**
531
531
  * Converts any subtitle format name in its mime type representation.
532
532
  */
533
- private fun String.toSubtitleMimeType(): String = "text/$this"
533
+ private fun String.toSubtitleMimeType(): String = when (this) {
534
+ "srt" -> "application/x-subrip"
535
+ "ttml" -> "application/ttml+xml"
536
+ else -> "text/$this"
537
+ }
534
538
 
535
539
  /**
536
540
  * Converts any `SubtitleTrack` into its json representation.
@@ -553,6 +553,8 @@ extension RCTConvert {
553
553
  return .webVtt
554
554
  case "ttml":
555
555
  return .ttml
556
+ case "srt":
557
+ return .srt
556
558
  default:
557
559
  return nil
558
560
  }
@@ -582,6 +584,8 @@ extension RCTConvert {
582
584
  return "vtt"
583
585
  case .ttml:
584
586
  return "ttml"
587
+ case .srt:
588
+ return "srt"
585
589
  }
586
590
  }(),
587
591
  ]
package/lib/index.d.mts CHANGED
@@ -430,14 +430,33 @@ declare const AudioSession: {
430
430
 
431
431
  /**
432
432
  * Supported subtitle/caption file formats.
433
+ * @platform Android, iOS, tvOS
433
434
  */
434
435
  declare enum SubtitleFormat {
436
+ /**
437
+ * Closed Captioning (CEA) subtitle format.
438
+ * @platform Android, iOS, tvOS
439
+ */
435
440
  CEA = "cea",
441
+ /**
442
+ * Timed Text Markup Language (TTML) subtitle format.
443
+ * @platform Android, iOS, tvOS
444
+ */
436
445
  TTML = "ttml",
437
- VTT = "vtt"
446
+ /**
447
+ * Web Video Text Tracks Format (WebVTT) subtitle format.
448
+ * @platform Android, iOS, tvOS
449
+ */
450
+ VTT = "vtt",
451
+ /**
452
+ * SubRip (SRT) subtitle format.
453
+ * @platform Android, iOS, tvOS
454
+ */
455
+ SRT = "srt"
438
456
  }
439
457
  /**
440
458
  * Describes a subtitle track.
459
+ * @platform Android, iOS, tvOS
441
460
  */
442
461
  interface SubtitleTrack {
443
462
  /**
@@ -475,7 +494,6 @@ interface SubtitleTrack {
475
494
  }
476
495
  /**
477
496
  * A subtitle track that can be added to `SourceConfig.subtitleTracks`.
478
- *
479
497
  */
480
498
  interface SideLoadedSubtitleTrack extends SubtitleTrack {
481
499
  url: string;
package/lib/index.d.ts CHANGED
@@ -430,14 +430,33 @@ declare const AudioSession: {
430
430
 
431
431
  /**
432
432
  * Supported subtitle/caption file formats.
433
+ * @platform Android, iOS, tvOS
433
434
  */
434
435
  declare enum SubtitleFormat {
436
+ /**
437
+ * Closed Captioning (CEA) subtitle format.
438
+ * @platform Android, iOS, tvOS
439
+ */
435
440
  CEA = "cea",
441
+ /**
442
+ * Timed Text Markup Language (TTML) subtitle format.
443
+ * @platform Android, iOS, tvOS
444
+ */
436
445
  TTML = "ttml",
437
- VTT = "vtt"
446
+ /**
447
+ * Web Video Text Tracks Format (WebVTT) subtitle format.
448
+ * @platform Android, iOS, tvOS
449
+ */
450
+ VTT = "vtt",
451
+ /**
452
+ * SubRip (SRT) subtitle format.
453
+ * @platform Android, iOS, tvOS
454
+ */
455
+ SRT = "srt"
438
456
  }
439
457
  /**
440
458
  * Describes a subtitle track.
459
+ * @platform Android, iOS, tvOS
441
460
  */
442
461
  interface SubtitleTrack {
443
462
  /**
@@ -475,7 +494,6 @@ interface SubtitleTrack {
475
494
  }
476
495
  /**
477
496
  * A subtitle track that can be added to `SourceConfig.subtitleTracks`.
478
- *
479
497
  */
480
498
  interface SideLoadedSubtitleTrack extends SubtitleTrack {
481
499
  url: string;
package/lib/index.js CHANGED
@@ -1220,6 +1220,7 @@ var SubtitleFormat = /* @__PURE__ */ ((SubtitleFormat2) => {
1220
1220
  SubtitleFormat2["CEA"] = "cea";
1221
1221
  SubtitleFormat2["TTML"] = "ttml";
1222
1222
  SubtitleFormat2["VTT"] = "vtt";
1223
+ SubtitleFormat2["SRT"] = "srt";
1223
1224
  return SubtitleFormat2;
1224
1225
  })(SubtitleFormat || {});
1225
1226
 
package/lib/index.mjs CHANGED
@@ -1168,6 +1168,7 @@ var SubtitleFormat = /* @__PURE__ */ ((SubtitleFormat2) => {
1168
1168
  SubtitleFormat2["CEA"] = "cea";
1169
1169
  SubtitleFormat2["TTML"] = "ttml";
1170
1170
  SubtitleFormat2["VTT"] = "vtt";
1171
+ SubtitleFormat2["SRT"] = "srt";
1171
1172
  return SubtitleFormat2;
1172
1173
  })(SubtitleFormat || {});
1173
1174
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitmovin-player-react-native",
3
- "version": "0.15.0",
3
+ "version": "0.17.0",
4
4
  "description": "Official React Native bindings for Bitmovin's mobile Player SDKs.",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.mjs",
@@ -75,6 +75,7 @@
75
75
  "lint-staged": "13.0.3",
76
76
  "metro-config": "0.72.3",
77
77
  "metro-react-native-babel-preset": "0.72.3",
78
+ "postinstall-postinstall": "^2.1.0",
78
79
  "prettier": "2.7.1",
79
80
  "react": "18.2.0",
80
81
  "react-native": "0.72.6",
@@ -1,14 +1,33 @@
1
1
  /**
2
2
  * Supported subtitle/caption file formats.
3
+ * @platform Android, iOS, tvOS
3
4
  */
4
5
  export enum SubtitleFormat {
6
+ /**
7
+ * Closed Captioning (CEA) subtitle format.
8
+ * @platform Android, iOS, tvOS
9
+ */
5
10
  CEA = 'cea',
11
+ /**
12
+ * Timed Text Markup Language (TTML) subtitle format.
13
+ * @platform Android, iOS, tvOS
14
+ */
6
15
  TTML = 'ttml',
16
+ /**
17
+ * Web Video Text Tracks Format (WebVTT) subtitle format.
18
+ * @platform Android, iOS, tvOS
19
+ */
7
20
  VTT = 'vtt',
21
+ /**
22
+ * SubRip (SRT) subtitle format.
23
+ * @platform Android, iOS, tvOS
24
+ */
25
+ SRT = 'srt',
8
26
  }
9
27
 
10
28
  /**
11
29
  * Describes a subtitle track.
30
+ * @platform Android, iOS, tvOS
12
31
  */
13
32
  export interface SubtitleTrack {
14
33
  /**
@@ -47,7 +66,6 @@ export interface SubtitleTrack {
47
66
 
48
67
  /**
49
68
  * A subtitle track that can be added to `SourceConfig.subtitleTracks`.
50
- *
51
69
  */
52
70
  export interface SideLoadedSubtitleTrack extends SubtitleTrack {
53
71
  url: string;