Skip to content

Commit

Permalink
Merge branch 'release/0.2.15'
Browse files Browse the repository at this point in the history
  • Loading branch information
chaimPaneth committed Apr 28, 2022
2 parents 689172e + b9ce30a commit df420a9
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 18 deletions.
32 changes: 16 additions & 16 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,32 +49,32 @@ allprojects {

dependencies {
implementation 'com.facebook.react:react-native:+'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.google.code.gson:gson:2.8.9'

// JWPlayer SDK
implementation 'com.jwplayer:jwplayer-core:4.4.0'
implementation 'com.jwplayer:jwplayer-common:4.4.0'
implementation 'com.jwplayer:jwplayer-chromecast:4.4.0'
implementation 'com.jwplayer:jwplayer-ima:4.4.0'
implementation 'com.jwplayer:jwplayer-core:4.5.1'
implementation 'com.jwplayer:jwplayer-common:4.5.1'
implementation 'com.jwplayer:jwplayer-chromecast:4.5.1'
implementation 'com.jwplayer:jwplayer-ima:4.5.1'

// Ad dependencies
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.24.0'
implementation 'com.google.android.gms:play-services-ads-identifier:17.0.1'
implementation 'com.google.android.gms:play-services-cast-framework:20.0.0'
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.27.0'
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
implementation 'com.google.android.gms:play-services-cast-framework:21.0.1'

// ExoPlayer dependencies
implementation 'com.google.android.exoplayer:exoplayer-core:2.14.2'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.14.2'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.14.2'
implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.14.2'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.14.2'
implementation 'com.google.android.exoplayer:exoplayer-core:2.16.1'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.16.1'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.16.1'
implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.16.1'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.16.1'

// JW Player Native UI dependencies
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'androidx.viewpager2:viewpager2:1.0.0'
implementation 'com.android.volley:volley:1.2.0'
implementation 'com.android.volley:volley:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.mediarouter:mediarouter:1.1.0'
implementation 'androidx.media:media:1.1.0'
implementation 'androidx.mediarouter:mediarouter:1.3.0'
implementation 'androidx.media:media:1.6.0'
}

Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,10 @@ private void setupPlayer(ReadableMap prop) {
LinearLayout.LayoutParams.MATCH_PARENT));
addView(mPlayerView);

if (prop.hasKey("controls")) { // Hack for controls hiding not working right away
mPlayerView.getPlayer().setControls(prop.getBoolean("controls"));
}

if (prop.hasKey("fullScreenOnLandscape")) {
fullScreenOnLandscape = prop.getBoolean("fullScreenOnLandscape");
mPlayerView.fullScreenOnLandscape = fullScreenOnLandscape;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public void setConfig(RNJWPlayerView view, ReadableMap prop) {
view.setConfig(prop);
}

@ReactProp(name = "controls")
public void setControls(RNJWPlayerView view, Boolean controls) {
view.mPlayerView.getPlayer().setControls(controls);
}

public Map getExportedCustomBubblingEventTypeConstants() {
return MapBuilder.builder()
.put(
Expand Down
2 changes: 1 addition & 1 deletion ios/RNJWPlayer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Pod::Spec.new do |s|
s.platform = :ios, "10.0"
s.source = { :git => "https://github.com/chaimPaneth/react-native-jw-media-player.git", :tag => "v#{s.version}" }
s.source_files = "RNJWPlayer/*.{h,m}"
s.dependency 'JWPlayerKit', '~> 4.5.1'
s.dependency 'JWPlayerKit', '~> 4.5.2'
s.dependency 'google-cast-sdk', '~> 4.7.0'
s.dependency 'React'
# s.static_framework = true
Expand Down
2 changes: 2 additions & 0 deletions ios/RNJWPlayer/RNJWPlayerView.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ - (instancetype)init

- (void)dealloc
{
[self reset];

@try {
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIDeviceOrientationDidChangeNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:AVAudioSessionInterruptionNotification];
Expand Down
5 changes: 5 additions & 0 deletions ios/RNJWPlayer/RNJWPlayerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@

@implementation RNJWPlayerViewController

- (void)dealloc
{
[self.player stop];
}

-(void)setDelegates
{
self.delegate = self;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-jw-media-player",
"version": "0.2.14",
"version": "0.2.15",
"description": "React-native Android/iOS plugin for JWPlayer SDK (https://www.jwplayer.com/)",
"main": "index.js",
"types": "./index.d.ts",
Expand Down

0 comments on commit df420a9

Please sign in to comment.