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