iOS: fix native video
Fixed view not being displayed. Fixed view orientation change.
This commit is contained in:
parent
8be6db951d
commit
6b2483c331
2 changed files with 10 additions and 1 deletions
|
@ -71,6 +71,12 @@
|
|||
[self observeVideoAudio];
|
||||
}
|
||||
|
||||
- (void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
|
||||
self.avPlayerLayer.frame = self.bounds;
|
||||
}
|
||||
|
||||
- (void)observeVideoAudio {
|
||||
printf("******** adding observer for sound routing changes\n");
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
|
|
|
@ -208,8 +208,11 @@
|
|||
} else {
|
||||
// Create autoresizing view for video playback.
|
||||
GodotNativeVideoView *videoView = [[GodotNativeVideoView alloc] initWithFrame:self.view.bounds];
|
||||
videoView.autoresizingMask = UIViewAutoresizingFlexibleWidth & UIViewAutoresizingFlexibleHeight;
|
||||
videoView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
[self.view addSubview:videoView];
|
||||
|
||||
self.videoView = videoView;
|
||||
|
||||
return [self.videoView playVideoAtPath:filePath volume:videoVolume audio:audioTrack subtitle:subtitleTrack];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue