iOS: fix native video
Fixed view not being displayed.
Fixed view orientation change.
(cherry picked from commit 6b2483c331
)
This commit is contained in:
parent
b2b5d9a7a3
commit
067d015d38
@ -72,6 +72,12 @@
|
||||
[self observeVideoAudio];
|
||||
}
|
||||
|
||||
- (void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
|
||||
self.avPlayerLayer.frame = self.bounds;
|
||||
}
|
||||
|
||||
- (void)observeVideoAudio {
|
||||
printf("******** adding observer for sound routing changes\n");
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
|
@ -209,8 +209,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 New Issue
Block a user