# Conflicts: # android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java # examples/basic/package.json # examples/basic/yarn.lock # ios/Video/RCTVideo.h # ios/Video/RCTVideo.m # ios/Video/RCTVideoManager.m # react-native-video.podspec
		
			
				
	
	
		
			75 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			Objective-C
		
	
	
	
	
	
			
		
		
	
	
			75 lines
		
	
	
		
			3.8 KiB
		
	
	
	
		
			Objective-C
		
	
	
	
	
	
#import <AVFoundation/AVFoundation.h>
 | 
						|
#import "AVKit/AVKit.h"
 | 
						|
#import "UIView+FindUIViewController.h"
 | 
						|
#import "RCTVideoPlayerViewController.h"
 | 
						|
#import "RCTVideoPlayerViewControllerDelegate.h"
 | 
						|
#import <React/RCTComponent.h>
 | 
						|
#import <React/RCTBridgeModule.h>
 | 
						|
@import GoogleInteractiveMediaAds;
 | 
						|
 | 
						|
#if __has_include(<react-native-video/RCTVideoCache.h>)
 | 
						|
#import <react-native-video/RCTVideoCache.h>
 | 
						|
#import <DVAssetLoaderDelegate/DVURLAsset.h>
 | 
						|
#import <DVAssetLoaderDelegate/DVAssetLoaderDelegate.h>
 | 
						|
#endif
 | 
						|
 | 
						|
@class RCTEventDispatcher;
 | 
						|
#if __has_include(<react-native-video/RCTVideoCache.h>)
 | 
						|
@interface RCTVideo : UIView <RCTVideoPlayerViewControllerDelegate, DVAssetLoaderDelegatesDelegate, AVAssetResourceLoaderDelegate, IMAAdsLoaderDelegate, IMAAdsManagerDelegate>
 | 
						|
#elif TARGET_OS_TV
 | 
						|
@interface RCTVideo : UIView <RCTVideoPlayerViewControllerDelegate, AVAssetResourceLoaderDelegate>
 | 
						|
#else
 | 
						|
@interface RCTVideo : UIView <RCTVideoPlayerViewControllerDelegate, AVPictureInPictureControllerDelegate, AVAssetResourceLoaderDelegate, IMAAdsLoaderDelegate, IMAAdsManagerDelegate>
 | 
						|
#endif
 | 
						|
 | 
						|
@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;
 | 
						|
@property (nonatomic, copy) RCTDirectEventBlock onGetLicense;
 | 
						|
 | 
						|
typedef NS_ENUM(NSInteger, RCTVideoError) {
 | 
						|
    RCTVideoErrorFromJSPart,
 | 
						|
    RCTVideoErrorLicenseRequestNotOk,
 | 
						|
    RCTVideoErrorNoDataFromLicenseRequest,
 | 
						|
    RCTVideoErrorNoSPC,
 | 
						|
    RCTVideoErrorNoDataRequest,
 | 
						|
    RCTVideoErrorNoCertificateData,
 | 
						|
    RCTVideoErrorNoCertificateURL,
 | 
						|
    RCTVideoErrorNoFairplayDRM,
 | 
						|
    RCTVideoErrorNoDRMData
 | 
						|
};
 | 
						|
/// 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;
 | 
						|
 | 
						|
- (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher NS_DESIGNATED_INITIALIZER;
 | 
						|
 | 
						|
- (AVPlayerViewController*)createPlayerViewController:(AVPlayer*)player withPlayerItem:(AVPlayerItem*)playerItem;
 | 
						|
 | 
						|
- (void)save:(NSDictionary *)options resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject;
 | 
						|
- (void)setLicenseResult:(NSString * )license;
 | 
						|
- (BOOL)setLicenseResultError:(NSString * )error;
 | 
						|
 | 
						|
@end
 |