Use the delegate in controller
This commit is contained in:
parent
c3b5a1b4cf
commit
9fefa996f2
@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
#import <AVKit/AVKit.h>
|
#import <AVKit/AVKit.h>
|
||||||
#import "RCTVideo.h"
|
#import "RCTVideo.h"
|
||||||
|
#import "RCTVideoPlayerViewControllerDelegate.h"
|
||||||
|
|
||||||
@interface RCTVideoPlayerViewController : AVPlayerViewController
|
@interface RCTVideoPlayerViewController : AVPlayerViewController
|
||||||
@property (nonatomic, weak) id<RCTVideo> rctVideoView;
|
@property (nonatomic, weak) id<RCTVideoPlayerViewControllerDelegate *> rctDelegate;
|
||||||
@end
|
@end
|
||||||
|
@ -14,9 +14,15 @@
|
|||||||
|
|
||||||
@implementation RCTVideoPlayerViewController
|
@implementation RCTVideoPlayerViewController
|
||||||
|
|
||||||
- (IBAction)close:(id)sender
|
- (void)viewDidDisappear:(BOOL)animated
|
||||||
{
|
{
|
||||||
[self.rctVideoView setFullscreen:false];
|
[super viewDidDisappear:animated];
|
||||||
|
[_rctDelegate videoPlayerViewControllerDidDismiss:self];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)viewWillDisappear:(BOOL)animated {
|
||||||
|
[_rctDelegate videoPlayerViewControllerWillDismiss:self];
|
||||||
|
[super viewWillDisappear:animated];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
Reference in New Issue
Block a user