@jwplayer/jwplayer-react-native 1.1.0 → 1.1.1

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
@@ -6,7 +6,7 @@
6
6
 
7
7
  <br />
8
8
 
9
- [Prerequisites](#prerequisites) | [Installation](#installation) | [Usage](#usage) | [Advanced Topics](#advanced-topics) | [Contributing](#contributing) | [Issues](#issues)
9
+ [Prerequisites](#prerequisites) | [Installation](#installation) | [Usage](#usage) | [Advanced Topics](#advanced-topics) | [Contributions](#contributions) | [Issues](#issues)
10
10
 
11
11
  <br />
12
12
 
@@ -431,18 +431,42 @@ You can use the styling elements as defined in the [Legacy Readme](/docs/legacy_
431
431
 
432
432
  <br /><br />
433
433
 
434
- ## Contributing
434
+ ## Contributions
435
+
436
+ We welcome thoughtful contributions. To avoid duplicate work, review the following before opening a pull request (PR):
437
+ - Ensure your contribution applies directly to an open issue.
438
+ - When appropriate, develop solutions that can be applied to multiple use cases and implementations.
439
+ - Submit small, well-scoped pull requests.
440
+
441
+ Follow these steps to contribute:
442
+ 1. Review an [issue](https://github.com/jwplayer/jwplayer-react-native/issues).
443
+ 2. Create a [pull request](https://github.com/jwplayer/jwplayer-react-native/blob/master/.github/PULL_REQUEST_TEMPLATE.md) to propose a solution.
435
444
 
436
- - All contributions should correlate to an open issue. We hope to avoid doubling the work between contributors.
437
- - Changes shouldn't be a one-off solution for your use case.
438
- - Keep work small as required. Large PRs aren't fun for anyone and will take longer to review.
439
445
 
440
446
  <br /><br />
441
447
 
442
448
  ## Issues
443
449
 
444
- - Follow the format for Bugs/Features/Questions.
445
- - If submitting a bug, always attempt to recreate the issue in our Example app
446
- - Provide as much relevant information as possible
447
- - For the quickest support, reach out to JW support via this [link](https://support.jwplayer.com/hc/en-us/requests/new) after creating an issue on this repo. Providing the `Issue` number and additional, potentially proprietary/sensitive information.
450
+ To ensure issues are efficiently addressed, we outline our expectations, define what we support, and explain how to submit issues below.
451
+
452
+ ### Expectations
453
+
454
+ If you’re filing an issue, follow the **Try → Wait → Fork** model:
455
+ - **Try first**. Investigate the bug. If you find the cause, [submit a fix](#contributions). We focus on issues backed by effort.
456
+ - **Wait patiently**. We prioritize our core Native SDK development over this React-Native repository. Responses here may be delayed.
457
+ - **Fork when needed**. For one-off use cases, fork the repo. We only support changes with broad value.
458
+
459
+ ### What We Support
460
+
461
+ We focus on work that delivers the greatest long-term value to the broader community. The following categories are listed in order of priority:
462
+ 1. **Breakages** and **critical bugs** caused by updates to the Native SDKs.
463
+ 2. **Critical bugs** in the wrapper that can be reproduced in the Example app.
464
+ 3. **Structural issues** that impact long-term maintainability.
465
+ 4. **New features** that align with official SDK capabilities and benefit the broader community. _Note: These are prioritized **lower than bugs** and will be addressed only **as time allows**._
466
+
467
+ ### Issue Submissions
468
+
469
+ Follow these steps to submit an issue:
470
+ 1. Submit a [bug report](https://github.com/jwplayer/jwplayer-react-native/blob/master/.github/ISSUE_TEMPLATE/bug_report.md), [feature request](https://github.com/jwplayer/jwplayer-react-native/blob/master/.github/ISSUE_TEMPLATE/feature_request.md), [implementation request](https://github.com/jwplayer/jwplayer-react-native/blob/master/.github/ISSUE_TEMPLATE/implement.md), or [question](https://github.com/jwplayer/jwplayer-react-native/blob/master/.github/ISSUE_TEMPLATE/question.md) in this project. _Note: All information requested in the submission template must be provided. If any item is not applicable, enter "N/A"._
471
+ 2. (Optional) Submit a [JWP support request](https://support.jwplayer.com/hc/en-us/requests/new) when you need to share sensitive information.
448
472
 
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
12
12
  s.platform = :ios, "14.0"
13
13
  s.source = { :git => "https://github.com/jwplayer/jwplayer-react-native.git", :tag => "v#{s.version}" }
14
14
  s.source_files = "ios/RNJWPlayer/*.{h,m,swift}"
15
- s.dependency 'JWPlayerKit', '4.21.2'
15
+ s.dependency 'JWPlayerKit', '4.22.0'
16
16
  s.dependency 'React-Core'
17
17
  s.static_framework = true
18
18
  s.info_plist = {
@@ -28,7 +28,7 @@ Pod::Spec.new do |s|
28
28
 
29
29
  if defined?($RNJWPlayerUseGoogleCast)
30
30
  Pod::UI.puts "RNJWPlayer: enable Google Cast"
31
- s.dependency 'google-cast-sdk', '4.8.1'
31
+ s.dependency 'google-cast-sdk', '4.8.3'
32
32
  s.pod_target_xcconfig = {
33
33
  'OTHER_SWIFT_FLAGS' => '$(inherited) -D USE_GOOGLE_CAST'
34
34
  }
@@ -1,2 +1,2 @@
1
- #Mon Mar 03 15:18:01 PST 2025
1
+ #Mon Mar 17 09:55:55 PDT 2025
2
2
  gradle.version=8.9
@@ -73,9 +73,9 @@ allprojects {
73
73
  }
74
74
  }
75
75
 
76
- def jwPlayerVersion = "4.18.4"
76
+ def jwPlayerVersion = "4.20.0"
77
77
  def exoplayerVersion = "2.18.7" // Deprecated. Use Media3 when targeting JW SDK > 4.16.0
78
- def media3ExoVersion = "1.1.1"
78
+ def media3ExoVersion = "1.4.1"
79
79
 
80
80
  dependencies {
81
81
  implementation 'com.facebook.react:react-native:+'
@@ -89,7 +89,7 @@ dependencies {
89
89
 
90
90
  // Ad dependencies
91
91
  if (useIMA) {
92
- implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.33.0'
92
+ implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.36.0'
93
93
  implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
94
94
  }
95
95
 
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="90" height="20" role="img" aria-label="version: 1.1.0"><title>version: 1.1.0</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="90" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="51" height="20" fill="#555"/><rect x="51" width="39" height="20" fill="#007ec6"/><rect width="90" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="265" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="410">version</text><text x="265" y="140" transform="scale(.1)" fill="#fff" textLength="410">version</text><text aria-hidden="true" x="695" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="290">1.1.0</text><text x="695" y="140" transform="scale(.1)" fill="#fff" textLength="290">1.1.0</text></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="90" height="20" role="img" aria-label="version: 1.1.1"><title>version: 1.1.1</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="90" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="51" height="20" fill="#555"/><rect x="51" width="39" height="20" fill="#007ec6"/><rect width="90" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="265" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="410">version</text><text x="265" y="140" transform="scale(.1)" fill="#fff" textLength="410">version</text><text aria-hidden="true" x="695" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="290">1.1.1</text><text x="695" y="140" transform="scale(.1)" fill="#fff" textLength="290">1.1.1</text></g></svg>
package/index.d.ts CHANGED
@@ -591,7 +591,16 @@ declare module "@jwplayer/jwplayer-react-native" {
591
591
  setControls(show: boolean): void;
592
592
  setLockScreenControls(show: boolean): void;
593
593
  seekTo(time: number): void;
594
- loadPlaylist(playlistItems: PlaylistItem[] | JwPlaylistItem[] | string): void;
594
+ /**
595
+ * Side load playlist items into an already setup player
596
+ * @param playlistItems `PlaylistItem` or `JwPlaylistItem`
597
+ */
598
+ loadPlaylist(playlistItems: PlaylistItem[] | JwPlaylistItem[]): void;
599
+ /**
600
+ * Side load playlist via URL into an already setup player
601
+ * @param playlistUrl URL for playlist to load (format for response: json)
602
+ */
603
+ loadPlaylistWithUrl(playlistUrl: string): void;
595
604
  setFullscreen(fullScreen: boolean): void;
596
605
  position(): Promise<number>;
597
606
  setUpCastController(): void;
package/index.js CHANGED
@@ -535,6 +535,11 @@ export default class JWPlayer extends Component {
535
535
  RNJWPlayerManager.loadPlaylist(this.getRNJWPlayerBridgeHandle(), playlistItems);
536
536
  }
537
537
 
538
+ loadPlaylistWithUrl(playlistUrl) {
539
+ if (RNJWPlayerManager)
540
+ RNJWPlayerManager.loadPlaylistWithUrl(this.getRNJWPlayerBridgeHandle(), playlistUrl);
541
+ }
542
+
538
543
  setFullscreen(fullscreen) {
539
544
  if (RNJWPlayerManager)
540
545
  RNJWPlayerManager.setFullscreen(
@@ -16,7 +16,12 @@ import JWPlayerKit
16
16
  import GoogleCast
17
17
  #endif
18
18
 
19
- class RNJWPlayerView : UIView, JWPlayerDelegate, JWPlayerStateDelegate, JWAdDelegate, JWAVDelegate, JWPlayerViewDelegate, JWPlayerViewControllerDelegate, JWDRMContentKeyDataSource, JWTimeEventListener, AVPictureInPictureControllerDelegate {
19
+ class RNJWPlayerView: UIView, JWPlayerDelegate, JWPlayerStateDelegate,
20
+ JWAdDelegate, JWAVDelegate, JWPlayerViewDelegate,
21
+ JWPlayerViewControllerFullScreenDelegate, JWPlayerViewControllerUIDelegate,
22
+ JWPlayerViewControllerRelatedDelegate, JWDRMContentKeyDataSource,
23
+ JWTimeEventListener, AVPictureInPictureControllerDelegate
24
+ {
20
25
 
21
26
  // MARK: - RNJWPlayer allocation
22
27
 
@@ -1280,10 +1285,6 @@ class RNJWPlayerView : UIView, JWPlayerDelegate, JWPlayerStateDelegate, JWAdDele
1280
1285
  func jwplayerContentDidComplete(_ player:JWPlayer) {
1281
1286
  self.onComplete?([:])
1282
1287
  }
1283
-
1284
- func jwplayerContentIsBuffering(_ player: any JWPlayerKit.JWPlayer) {
1285
-
1286
- }
1287
1288
 
1288
1289
  func jwplayer(_ player:JWPlayer, didLoadPlaylistItem item:JWPlayerItem, at index:UInt) {
1289
1290
  // var sourceDict: [String: Any] = [:]
@@ -16,12 +16,16 @@ import JWPlayerKit
16
16
  import GoogleCast
17
17
  #endif
18
18
 
19
- class RNJWPlayerViewController : JWPlayerViewController, JWPlayerViewControllerDelegate, JWDRMContentKeyDataSource {
19
+ class RNJWPlayerViewController : JWPlayerViewController, JWPlayerViewControllerFullScreenDelegate,
20
+ JWPlayerViewControllerUIDelegate, JWPlayerViewControllerRelatedDelegate,
21
+ JWDRMContentKeyDataSource {
20
22
 
21
23
  var parentView:RNJWPlayerView!
22
24
 
23
25
  func setDelegates() {
24
- self.delegate = self
26
+ self.fullScreenDelegate = self
27
+ self.uiDelegate = self
28
+ self.relatedDelegate = self
25
29
  // self.playerView.delegate = self
26
30
  // self.player.delegate = self
27
31
  // self.player.playbackStateDelegate = self
@@ -31,7 +35,9 @@ class RNJWPlayerViewController : JWPlayerViewController, JWPlayerViewControllerD
31
35
  }
32
36
 
33
37
  func removeDelegates() {
34
- self.delegate = nil
38
+ self.fullScreenDelegate = nil
39
+ self.uiDelegate = nil
40
+ self.relatedDelegate = nil
35
41
  // self.playerView.delegate = nil
36
42
  // self.player.delegate = nil
37
43
  // self.player.playbackStateDelegate = nil
@@ -138,10 +144,12 @@ class RNJWPlayerViewController : JWPlayerViewController, JWPlayerViewControllerD
138
144
  parentView?.onScreenTapped?(["x": position.x, "y": position.y])
139
145
  }
140
146
 
147
+ // MARK: JWPlayerViewControllerUIDelegate
141
148
  func playerViewController(_ controller:JWPlayerViewController, controlBarVisibilityChanged isVisible:Bool, frame:CGRect) {
142
149
  parentView?.onControlBarVisible?(["visible": isVisible])
143
150
  }
144
151
 
152
+ // MARK: - JWPlayerViewControllerFullScreenDelegate
145
153
  func playerViewControllerWillGoFullScreen(_ controller:JWPlayerViewController) -> JWFullScreenViewController? {
146
154
  parentView?.onFullScreenRequested?([:])
147
155
  return nil
@@ -159,6 +167,8 @@ class RNJWPlayerViewController : JWPlayerViewController, JWPlayerViewControllerD
159
167
  parentView?.onFullScreenExit?([:])
160
168
  }
161
169
 
170
+ // MARK: JWPlayerViewControllerRelatedDelegate
171
+
162
172
  func playerViewController(_ controller:JWPlayerViewController, relatedMenuClosedWithMethod method:JWRelatedInteraction) {
163
173
 
164
174
  }
@@ -136,7 +136,7 @@ RCT_EXTERN_METHOD(reset)
136
136
 
137
137
  RCT_EXTERN_METHOD(loadPlaylist: (nonnull NSNumber *)reactTag: (nonnull NSArray *)playlist)
138
138
 
139
- RCT_EXTERN_METHOD(loadPlaylist: (nonnull NSNumber *)reactTag: (nonnull NSString *)playlist)
139
+ RCT_EXTERN_METHOD(loadPlaylistWithUrl: (nonnull NSNumber *)reactTag: (nonnull NSString *)playlist)
140
140
 
141
141
  RCT_EXTERN_METHOD(setFullscreen: (nonnull NSNumber *)reactTag: (BOOL)fullscreen)
142
142
 
@@ -548,7 +548,18 @@ class RNJWPlayerViewManager: RCTViewManager {
548
548
  } else if let playerViewController = view.playerViewController {
549
549
  playerViewController.player.loadPlaylist(items: playlistArray)
550
550
  }
551
- } else if let playlistString = playlist as? String, let url = URL(string: playlistString) {
551
+ }
552
+ }
553
+ }
554
+
555
+ @objc func loadPlaylistWithUrl(_ reactTag: NSNumber, _ playlistString: String) {
556
+ DispatchQueue.main.async {
557
+ guard let view = self.getPlayerView(reactTag: reactTag) else {
558
+ print("Invalid view returned from registry, expecting RNJWPlayerView")
559
+ return
560
+ }
561
+
562
+ if let url = URL(string: playlistString) {
552
563
  if let playerView = view.playerView {
553
564
  playerView.player.loadPlaylist(url: url)
554
565
  } else if let playerViewController = view.playerViewController {
@@ -198,7 +198,7 @@
198
198
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
199
199
  GCC_WARN_UNUSED_FUNCTION = YES;
200
200
  GCC_WARN_UNUSED_VARIABLE = YES;
201
- IPHONEOS_DEPLOYMENT_TARGET = 7.0;
201
+ IPHONEOS_DEPLOYMENT_TARGET = 14.0;
202
202
  MTL_ENABLE_DEBUG_INFO = YES;
203
203
  ONLY_ACTIVE_ARCH = YES;
204
204
  SDKROOT = iphoneos;
@@ -232,7 +232,7 @@
232
232
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
233
233
  GCC_WARN_UNUSED_FUNCTION = YES;
234
234
  GCC_WARN_UNUSED_VARIABLE = YES;
235
- IPHONEOS_DEPLOYMENT_TARGET = 7.0;
235
+ IPHONEOS_DEPLOYMENT_TARGET = 14.0;
236
236
  MTL_ENABLE_DEBUG_INFO = NO;
237
237
  SDKROOT = iphoneos;
238
238
  VALIDATE_PRODUCT = YES;
@@ -254,6 +254,7 @@
254
254
  "$(SRCROOT)/../../react-native/React/**",
255
255
  "$(SRCROOT)/../../react-native/React",
256
256
  );
257
+ IPHONEOS_DEPLOYMENT_TARGET = 14.0;
257
258
  LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
258
259
  LIBRARY_SEARCH_PATHS = "";
259
260
  OTHER_LDFLAGS = (
@@ -283,6 +284,7 @@
283
284
  "$(SRCROOT)/../../react-native/React/**",
284
285
  "$(SRCROOT)/../../react-native/React",
285
286
  );
287
+ IPHONEOS_DEPLOYMENT_TARGET = 14.0;
286
288
  LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
287
289
  LIBRARY_SEARCH_PATHS = "";
288
290
  OTHER_LDFLAGS = (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jwplayer/jwplayer-react-native",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "React-native Android/iOS plugin for JWPlayer SDK (https://www.jwplayer.com/)",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",