Skip to content

Commit

Permalink
Merge branch 'release/0.2.42'
Browse files Browse the repository at this point in the history
  • Loading branch information
chaimPaneth committed Dec 26, 2023
2 parents 8c8ee3a + 24b4d58 commit d0cc235
Show file tree
Hide file tree
Showing 26 changed files with 3,697 additions and 3,741 deletions.
5 changes: 4 additions & 1 deletion Example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.0'
platform :ios, '14.0'
install! 'cocoapods', :deterministic_uuids => false

$RNJWPlayerUseGoogleIMA = true
$RNJWPlayerUseGoogleCast = true

target 'RNJWPlayer' do
config = use_native_modules!

Expand Down
69 changes: 37 additions & 32 deletions Example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,19 @@ PODS:
- FlipperKit/FlipperKitNetworkPlugin
- fmt (6.2.1)
- glog (0.3.5)
- google-cast-sdk (4.7.0):
- google-cast-sdk/Core (= 4.7.0)
- google-cast-sdk (4.5.3):
- google-cast-sdk/Core (= 4.5.3)
- GTMSessionFetcher/Core (~> 1.1)
- Protobuf (~> 3.13)
- google-cast-sdk/Core (4.7.0):
- google-cast-sdk/Core (4.5.3):
- GTMSessionFetcher/Core (~> 1.1)
- Protobuf (~> 3.13)
- JWPlayerKit (4.13.0)
- GoogleAds-IMA-iOS-SDK (3.19.2)
- GTMSessionFetcher/Core (1.7.2)
- JWPlayerKit (4.17.0)
- libevent (2.1.12)
- OpenSSL-Universal (1.1.1100)
- Protobuf (3.21.12)
- Protobuf (3.25.1)
- RCT-Folly (2021.06.28.00-v2):
- boost
- DoubleConversion
Expand Down Expand Up @@ -289,14 +293,10 @@ PODS:
- React-jsinspector (0.68.1)
- React-logger (0.68.1):
- glog
- react-native-orientation-locker (1.4.0):
- react-native-orientation-locker (1.5.0):
- React-Core
- react-native-safe-area-context (4.7.2):
- React-Core
- react-native-safe-area-context (4.2.5):
- RCT-Folly
- RCTRequired
- RCTTypeSafety
- React
- ReactCommon/turbomodule/core
- React-perflogger (0.68.1)
- React-RCTActionSheet (0.68.1):
- React-Core/RCTActionSheetHeaders (= 0.68.1)
Expand Down Expand Up @@ -368,18 +368,19 @@ PODS:
- React-Core
- RNFS (2.16.6):
- React
- RNGestureHandler (2.4.2):
- RNGestureHandler (2.12.1):
- React-Core
- RNJWPlayer (0.2.36):
- google-cast-sdk (~> 4.7.0)
- JWPlayerKit (~> 4.13.0)
- React
- RNScreens (3.13.1):
- RNJWPlayer (0.2.42):
- google-cast-sdk (~> 4.5.3)
- GoogleAds-IMA-iOS-SDK (~> 3.19.1)
- JWPlayerKit (~> 4.17.0)
- React-Core
- RNScreens (3.25.0):
- React-Core
- React-RCTImage
- RNVectorIcons (8.1.0):
- RNVectorIcons (10.0.0):
- React-Core
- SocketRocket (0.6.0)
- SocketRocket (0.6.1)
- Yoga (1.14.0)
- YogaKit (1.18.1):
- Yoga (~> 1.14)
Expand Down Expand Up @@ -464,6 +465,8 @@ SPEC REPOS:
- FlipperKit
- fmt
- google-cast-sdk
- GoogleAds-IMA-iOS-SDK
- GTMSessionFetcher
- JWPlayerKit
- libevent
- OpenSSL-Universal
Expand Down Expand Up @@ -570,11 +573,13 @@ SPEC CHECKSUMS:
FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 476ee3e89abb49e07f822b48323c51c57124b572
google-cast-sdk: 6731e9a206ce43e0f4433d15598ad8a19f0371d5
JWPlayerKit: cfc3559afa6aed5314e046bce83f35973c2520db
google-cast-sdk: f94c5df87564f71d4342400b8487665e9bed27c6
GoogleAds-IMA-iOS-SDK: 0e817c05ab26f1b9285c80f4a75e1350a916d50b
GTMSessionFetcher: 5595ec75acf5be50814f81e9189490412bad82ba
JWPlayerKit: b0fd3f2abf99f40f8cf8292d550864be4b5df3f9
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
Protobuf: 120350fc38646e2dedc26f49ecba778184ea1de2
Protobuf: d94761c33f1239c0a43a0817ca1a5f7f7c900241
RCT-Folly: 4d8508a426467c48885f1151029bc15fa5d7b3b8
RCTRequired: 00581111c53531e39e3c6346ef0d2c0cf52a5a37
RCTTypeSafety: 07e03ee7800e7dd65cba8e52ad0c2edb06c96604
Expand All @@ -588,8 +593,8 @@ SPEC CHECKSUMS:
React-jsiexecutor: 4a4bae5671b064a2248a690cf75957669489d08c
React-jsinspector: 218a2503198ff28a085f8e16622a8d8f507c8019
React-logger: f79dd3cc0f9b44f5611c6c7862badd891a862cf8
react-native-orientation-locker: 2da91e5391971dace445495821c899c111dcad7a
react-native-safe-area-context: ebf8c413eb8b5f7c392a036a315eb7b46b96845f
react-native-orientation-locker: 851f6510d8046ea2f14aa169b1e01fcd309a94ba
react-native-safe-area-context: 7aa8e6d9d0f3100a820efb1a98af68aa747f9284
React-perflogger: 30ab8d6db10e175626069e742eead3ebe8f24fd5
React-RCTActionSheet: 4b45da334a175b24dabe75f856b98fed3dfd6201
React-RCTAnimation: d6237386cb04500889877845b3e9e9291146bc2e
Expand All @@ -605,14 +610,14 @@ SPEC CHECKSUMS:
RNBootSplash: 2830c475d5793d6cf12312d1e8f5f1decb0dd3e8
RNDeviceInfo: 1e3f62b9ec32f7754fac60bd06b8f8a27124e7f0
RNFS: 2bd9eb49dc82fa9676382f0585b992c424cd59df
RNGestureHandler: 61628a2c859172551aa2100d3e73d1e57878392f
RNJWPlayer: cd1846f78dc1e996fe7e93462ac140e46ca417c6
RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
RNGestureHandler: c0d04458598fcb26052494ae23dda8f8f5162b13
RNJWPlayer: 78ba87f0d9c4f4b39c8bbc03fe04d73587acd7e8
RNScreens: 85d3880b52d34db7b8eeebe2f1a0e807c05e69fa
RNVectorIcons: 8b5bb0fa61d54cd2020af4f24a51841ce365c7e9
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: 17cd9a50243093b547c1e539c749928dd68152da
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 72302fbb90a843c0cefdfb43fe4bd7e42dee995b
PODFILE CHECKSUM: 0aa82ae79746645e542b17a02524e6691f65694a

COCOAPODS: 1.11.3
COCOAPODS: 1.14.3
4 changes: 2 additions & 2 deletions Example/ios/RNJWPlayer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@
"\"$(PODS_TARGET_SRCROOT)/include/\"",
);
INFOPLIST_FILE = RNJWPlayer/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -620,7 +620,7 @@
"\"$(PODS_TARGET_SRCROOT)/include/\"",
);
INFOPLIST_FILE = RNJWPlayer/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
2 changes: 1 addition & 1 deletion Example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"react-native-fs": "2.16.6",
"react-native-gesture-handler": "2.12.1",
"rn-iphone-helper": "2.0.0",
"react-native-jw-media-player": "0.2.39",
"react-native-jw-media-player": "0.2.42",
"react-native-orientation-locker": "1.5.0",
"react-native-safe-area-context": "4.7.2",
"react-native-screens": "3.25.0",
Expand Down
24 changes: 14 additions & 10 deletions RNJWPlayer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ Pod::Spec.new do |s|
s.homepage = package['homepage']
s.platform = :ios, "14.0"
s.source = { :git => "https://github.com/chaimPaneth/react-native-jw-media-player.git", :tag => "v#{s.version}" }
s.source_files = "ios/RNJWPlayer/*.{h,m}"
s.source_files = "ios/RNJWPlayer/*.{h,m,swift}"
s.dependency 'JWPlayerKit', '~> 4.17.0'
s.dependency 'React'
s.dependency 'React-Core'
s.static_framework = true
s.info_plist = {
'NSBluetoothAlwaysUsageDescription' => 'We will use your Bluetooth for media casting.',
'NSBluetoothPeripheralUsageDescription' => 'We will use your Bluetooth for media casting.',
'NSLocalNetworkUsageDescription' => 'We will use the local network to discover Cast-enabled devices on your WiFi network.',
'Privacy - Local Network Usage Description' => 'We will use the local network to discover Cast-enabled devices on your WiFi network.',
'NSMicrophoneUsageDescription' => 'We will use your Microphone for media casting.'
}
s.xcconfig = {
'OTHER_LDFLAGS': '-ObjC',
}

if defined?($RNJWPlayerUseGoogleCast)
Pod::UI.puts "RNJWPlayer: enable Google Cast"
s.dependency 'google-cast-sdk', '~> 4.5.3'
Expand All @@ -28,13 +40,5 @@ Pod::Spec.new do |s|
'OTHER_SWIFT_FLAGS' => '$(inherited) -D USE_GOOGLE_IMA'
}
end
s.static_framework = true
s.info_plist = {
'NSBluetoothAlwaysUsageDescription' => 'We will use your Bluetooth for media casting.',
'NSBluetoothPeripheralUsageDescription' => 'We will use your Bluetooth for media casting.',
'NSLocalNetworkUsageDescription' => 'We will use the local network to discover Cast-enabled devices on your WiFi network.',
'Privacy - Local Network Usage Description' => 'We will use the local network to discover Cast-enabled devices on your WiFi network.',
'NSMicrophoneUsageDescription' => 'We will use your Microphone for media casting.'
}

end
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ public void destroyPlayer() {
EventType.FULLSCREEN,
EventType.SEEK,
EventType.SEEKED,
EventType.PLAYBACK_RATE_CHANGED,
EventType.CAPTIONS_LIST,
EventType.CAPTIONS_CHANGED,
EventType.META,
Expand Down Expand Up @@ -390,6 +391,7 @@ public void setupPlayerView(Boolean backgroundAudioEnabled) {
EventType.FULLSCREEN,
EventType.SEEK,
EventType.SEEKED,
EventType.PLAYBACK_RATE_CHANGED,
EventType.CAPTIONS_LIST,
EventType.CAPTIONS_CHANGED,
EventType.META,
Expand Down Expand Up @@ -1336,7 +1338,7 @@ public void onSeeked(SeekedEvent seekedEvent) {
@Override
public void onPlaybackRateChanged(PlaybackRateChangedEvent playbackRateChangedEvent) {
WritableMap event = Arguments.createMap();
event.putString("message", "onRateChange");
event.putString("message", "onRateChanged");
event.putDouble("rate", playbackRateChangedEvent.getPlaybackRate());
getReactContext().getJSModule(RCTEventEmitter.class).receiveEvent(getId(), "topRateChanged", event);
}
Expand Down
88 changes: 64 additions & 24 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,39 +232,79 @@ declare module "react-native-jw-media-player" {
enableLockScreenControls: boolean;
pipEnabled: boolean;
}
type NativeError = (event: { nativeEvent: { code: string, error: string } }) => void;
type NativeWarning = (event: { nativeEvent: { code: string, warning: string } }) => void;
interface BaseEvent<T> {
nativeEvent: T;
}
interface SeekEventProps {
position: number;
offset: number;
}
interface SeekedEventProps {
position: number;
}
interface RateChangedEventProps {
rate: number;
at: number;
}
interface TimeEventProps {
position: number;
duration: number;
}
interface ControlBarVisibleEventProps {
visible: boolean;
}
interface PlaylistEventProps {
playlist: PlaylistItem[]
}
interface PlaylistItemEventProps {
playlistItem: PlaylistItem
}
interface PlayerErrorEventProps {
code: string;
error: string;
}
interface PlayerWarningEventProps {
code: string;
warning: string;
}
interface AdEventProps {
client?: string;
reason?: string;
type: number;
}
type NativeError = (event: BaseEvent<PlayerErrorEventProps>) => void;
type NativeWarning = (event: BaseEvent<PlayerWarningEventProps>) => void;
interface PropsType {
config: Config;
style?: ViewStyle;
controls?: boolean;
onPlayerReady?: (event: any) => void;
onPlaylist?: (playlist: PlaylistItem[]) => void;
onBeforePlay?: (event: any) => void;
onBeforeComplete?: (event: any) => void;
onPlay?: (event: any) => void;
onPause?: (event: any) => void;
onPlayerReady?: () => void;
onPlaylist?: (event: BaseEvent<PlaylistEventProps>) => void;
onBeforePlay?: () => void;
onBeforeComplete?: () => void;
onComplete?: () => void;
onPlay?: () => void;
onPause?: () => void;
onSeek?: (event: BaseEvent<SeekEventProps>) => void;
onSeeked?: (event?: BaseEvent<SeekedEventProps>) => void;
onRateChanged?: (event?: BaseEvent<RateChangedEventProps>) => void;
onSetupPlayerError?: NativeError;
onPlayerError?: NativeError;
onPlayerWarning?: NativeWarning;
onPlayerAdError?: NativeError;
onPlayerAdWarning?: NativeWarning;
onAdEvent?: (event: {client: string?, reason: string?, type: number}) => void;
onAdTime?: (event: {position: number, duration: number}) => void;
onBuffer?: (event: any) => void;
onTime?: (event: any) => void;
onComplete?: (event: any) => void;
onFullScreenRequested?: (event: any) => void;
onFullScreen?: (event: any) => void;
onFullScreenExitRequested?: (event: any) => void;
onFullScreenExit?: (event: any) => void;
onSeek?: (seek: { position: number; offset: number }) => void;
onSeeked?: (seeked?: { position: number }) => void;
onRateChanged?: (changed?: { rate: number, at: number }) => void;
onPlaylistItem?: (playlistItem: PlaylistItem) => void;
onControlBarVisible?: (event: any) => void;
onPlaylistComplete?: (event: any) => void;
onAudioTracks?: (event: any) => void;
onAdEvent?: (event: BaseEvent<AdEventProps>) => void;
onAdTime?: (event: BaseEvent<TimeEventProps>) => void;
onBuffer?: () => void;
onTime?: (event: BaseEvent<TimeEventProps>) => void;
onFullScreenRequested?: () => void;
onFullScreen?: () => void;
onFullScreenExitRequested?: () => void;
onFullScreenExit?: () => void;
onControlBarVisible?: (event: BaseEvent<ControlBarVisibleEventProps>) => void;
onPlaylistComplete?: () => void;
onPlaylistItem?: (event: BaseEvent<PlaylistItemEventProps>) => void;
onAudioTracks?: () => void;
shouldComponentUpdate?: (nextProps: any, nextState: any) => boolean;
}

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const RNJWPlayerManager =
let playerId = 0;
const RCT_RNJWPLAYER_REF = 'RNJWPlayerKey';

const RNJWPlayer = requireNativeComponent('RNJWPlayerView', null);
const RNJWPlayer = requireNativeComponent('RNJWPlayerView');

const JWPlayerStateIOS = {
JWPlayerStateUnknown: 0,
Expand Down
Loading

0 comments on commit d0cc235

Please sign in to comment.