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>
|
2019-12-09 21:40:49 -07:00
|
|
|
@import GoogleInteractiveMediaAds;
|
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>)
|
2019-12-09 21:40:49 -07:00
|
|
|
@interface RCTVideo : UIView <RCTVideoPlayerViewControllerDelegate, DVAssetLoaderDelegatesDelegate, IMAAdsLoaderDelegate, IMAAdsManagerDelegate>
|
2019-03-11 20:55:36 -06:00
|
|
|
#elif TARGET_OS_TV
|
|
|
|
@interface RCTVideo : UIView <RCTVideoPlayerViewControllerDelegate>
|
2018-07-18 18:06:09 -06:00
|
|
|
#else
|
2019-12-09 21:40:49 -07:00
|
|
|
@interface RCTVideo : UIView <RCTVideoPlayerViewControllerDelegate, AVPictureInPictureControllerDelegate, IMAAdsLoaderDelegate, IMAAdsManagerDelegate>
|
2018-07-18 18:06:09 -06:00
|
|
|
#endif
|
2015-03-30 23:07:55 -06:00
|
|
|
|
2019-06-19 01:22:10 -06: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;
|
2019-12-09 21:40:49 -07:00
|
|
|
/// Playhead used by the SDK to track content video progress and insert mid-rolls.
|
|
|
|
@property(nonatomic, strong) IMAAVPlayerContentPlayhead *contentPlayhead;
|
|
|
|
/// Entry point for the SDK. Used to make ad requests.
|
|
|
|
@property(nonatomic, strong) IMAAdsLoader *adsLoader;
|
|
|
|
/// Main point of interaction with the SDK. Created by the SDK as the result of an ad request.
|
|
|
|
@property(nonatomic, strong) IMAAdsManager *adsManager;
|
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
|