@jwplayer/jwplayer-react-native 1.1.0 → 1.1.2
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 +33 -9
- package/RNJWPlayer.podspec +2 -2
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/android/build.gradle +3 -3
- package/badges/version.svg +1 -1
- package/index.d.ts +10 -1
- package/index.js +5 -0
- package/ios/RNJWPlayer/RNJWPlayerView.swift +12 -10
- package/ios/RNJWPlayer/RNJWPlayerViewController.swift +13 -3
- package/ios/RNJWPlayer/RNJWPlayerViewManager.m +1 -1
- package/ios/RNJWPlayer/RNJWPlayerViewManager.swift +12 -1
- package/ios/RNJWPlayer.xcodeproj/project.pbxproj +4 -2
- package/package.json +1 -1
- package/jwplayer-jwplayer-react-native-v1.1.0.tgz +0 -0
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) | [
|
|
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
|
-
##
|
|
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
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
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
|
|
package/RNJWPlayer.podspec
CHANGED
|
@@ -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.
|
|
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.
|
|
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
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#Mon Mar
|
|
1
|
+
#Mon Mar 17 09:55:55 PDT 2025
|
|
2
2
|
gradle.version=8.9
|
package/android/build.gradle
CHANGED
|
@@ -73,9 +73,9 @@ allprojects {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
def jwPlayerVersion = "4.
|
|
76
|
+
def jwPlayerVersion = "4.21.0"
|
|
77
77
|
def exoplayerVersion = "2.18.7" // Deprecated. Use Media3 when targeting JW SDK > 4.16.0
|
|
78
|
-
def media3ExoVersion = "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.
|
|
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
|
|
package/badges/version.svg
CHANGED
|
@@ -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.
|
|
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.2"><title>version: 1.1.2</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.2</text><text x="695" y="140" transform="scale(.1)" fill="#fff" textLength="290">1.1.2</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
|
-
|
|
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
|
|
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
|
|
|
@@ -313,11 +318,13 @@ class RNJWPlayerView : UIView, JWPlayerDelegate, JWPlayerStateDelegate, JWAdDele
|
|
|
313
318
|
self.deinitAudioSession()
|
|
314
319
|
}
|
|
315
320
|
|
|
321
|
+
// Pull out top level iOS DRM values from config if present
|
|
322
|
+
// This is most often used in non-legacy configs using JWP DRM solutions
|
|
323
|
+
processSpcUrl = config["processSpcUrl"] as? String
|
|
324
|
+
fairplayCertUrl = config["certificateUrl"] as? String
|
|
325
|
+
contentUUID = config["contentUUID"] as? String
|
|
326
|
+
|
|
316
327
|
if forceLegacyConfig == true {
|
|
317
|
-
// Pull from top level of config
|
|
318
|
-
processSpcUrl = config["processSpcUrl"] as? String
|
|
319
|
-
fairplayCertUrl = config["certificateUrl"] as? String
|
|
320
|
-
contentUUID = config["contentUUID"] as? String
|
|
321
328
|
|
|
322
329
|
// Dangerous: check playlist for processSpcUrl / fairplayCertUrl in playlist
|
|
323
330
|
// Only checks first playlist item as multi-item DRM playlists are ill advised
|
|
@@ -333,7 +340,6 @@ class RNJWPlayerView : UIView, JWPlayerDelegate, JWPlayerStateDelegate, JWAdDele
|
|
|
333
340
|
}
|
|
334
341
|
}
|
|
335
342
|
} else {
|
|
336
|
-
// TODO -- Ensure JWJSONParser pulls out cert/spc for sources (Expected in JW iOS SDK v4.19.0)
|
|
337
343
|
}
|
|
338
344
|
|
|
339
345
|
do {
|
|
@@ -1280,10 +1286,6 @@ class RNJWPlayerView : UIView, JWPlayerDelegate, JWPlayerStateDelegate, JWAdDele
|
|
|
1280
1286
|
func jwplayerContentDidComplete(_ player:JWPlayer) {
|
|
1281
1287
|
self.onComplete?([:])
|
|
1282
1288
|
}
|
|
1283
|
-
|
|
1284
|
-
func jwplayerContentIsBuffering(_ player: any JWPlayerKit.JWPlayer) {
|
|
1285
|
-
|
|
1286
|
-
}
|
|
1287
1289
|
|
|
1288
1290
|
func jwplayer(_ player:JWPlayer, didLoadPlaylistItem item:JWPlayerItem, at index:UInt) {
|
|
1289
1291
|
// var sourceDict: [String: Any] = [:]
|
|
@@ -16,12 +16,16 @@ import JWPlayerKit
|
|
|
16
16
|
import GoogleCast
|
|
17
17
|
#endif
|
|
18
18
|
|
|
19
|
-
class RNJWPlayerViewController : JWPlayerViewController,
|
|
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.
|
|
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.
|
|
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(
|
|
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
|
-
}
|
|
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 =
|
|
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 =
|
|
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
|
Binary file
|