2015-12-22 17:39:04 -06:00
|
|
|
#import <AVFoundation/AVFoundation.h>
|
|
|
|
#import "AVKit/AVKit.h"
|
2016-03-31 21:03:54 +02:00
|
|
|
#import "UIView+FindUIViewController.h"
|
2016-03-31 23:10:25 +02:00
|
|
|
#import "RCTVideoPlayerViewController.h"
|
2016-04-01 10:52:05 +02:00
|
|
|
#import "RCTVideoPlayerViewControllerDelegate.h"
|
2018-10-09 16:01:41 -07:00
|
|
|
#import <React/RCTComponent.h>
|
2018-10-26 08:21:41 -05:00
|
|
|
#import <React/RCTBridgeModule.h>
|
2015-04-06 12:17:32 -07:00
|
|
|
|
2018-07-19 02:06:09 +02:00
|
|
|
#if __has_include(<react-native-video/RCTVideoCache.h>)
|
|
|
|
#import <react-native-video/RCTVideoCache.h>
|
2018-08-08 15:37:18 -07:00
|
|
|
#import <DVAssetLoaderDelegate/DVURLAsset.h>
|
|
|
|
#import <DVAssetLoaderDelegate/DVAssetLoaderDelegate.h>
|
2018-07-19 02:06:09 +02:00
|
|
|
#endif
|
2015-03-30 22:07:55 -07:00
|
|
|
|
2015-04-06 12:17:32 -07:00
|
|
|
@class RCTEventDispatcher;
|
2018-07-19 02:06:09 +02:00
|
|
|
#if __has_include(<react-native-video/RCTVideoCache.h>)
|
2019-03-12 11:21:12 -07:00
|
|
|
@interface RCTVideo : UIView <RCTVideoPlayerViewControllerDelegate, DVAssetLoaderDelegatesDelegate>
|
2019-03-11 19:55:36 -07:00
|
|
|
#elif TARGET_OS_TV
|
|
|
|
@interface RCTVideo : UIView <RCTVideoPlayerViewControllerDelegate>
|
2018-07-19 02:06:09 +02:00
|
|
|
#else
|
2018-10-26 13:33:03 -07:00
|
|
|
@interface RCTVideo : UIView <RCTVideoPlayerViewControllerDelegate, AVPictureInPictureControllerDelegate>
|
2018-07-19 02:06:09 +02:00
|
|
|
#endif
|
2015-03-30 22:07:55 -07:00
|
|
|
|
2019-06-19 09:22:10 +02:00
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onVideoLoadStart;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onVideoLoad;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onVideoBuffer;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onVideoError;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onVideoProgress;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onBandwidthUpdate;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onVideoSeek;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onVideoEnd;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onTimedMetadata;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onVideoAudioBecomingNoisy;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onVideoFullscreenPlayerWillPresent;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onVideoFullscreenPlayerDidPresent;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onVideoFullscreenPlayerWillDismiss;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onVideoFullscreenPlayerDidDismiss;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onReadyForDisplay;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onPlaybackStalled;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onPlaybackResume;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onPlaybackRateChange;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onVideoExternalPlaybackChange;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onPictureInPictureStatusChanged;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onRestoreUserInterfaceForPictureInPictureStop;
|
2016-12-13 00:16:11 +00:00
|
|
|
|
2015-04-06 12:17:32 -07:00
|
|
|
- (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher NS_DESIGNATED_INITIALIZER;
|
|
|
|
|
2015-12-22 17:39:04 -06:00
|
|
|
- (AVPlayerViewController*)createPlayerViewController:(AVPlayer*)player withPlayerItem:(AVPlayerItem*)playerItem;
|
|
|
|
|
2018-10-26 08:21:41 -05:00
|
|
|
- (void)save:(NSDictionary *)options resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject;
|
|
|
|
|
2015-03-30 22:07:55 -07:00
|
|
|
@end
|