mirror of
https://github.com/godotengine/godot
synced 2024-09-05 13:18:38 +00:00
Merge pull request #42648 from naithar/fix/native_video_view
[iOS] Native video fixes
This commit is contained in:
commit
4159baff6c
|
@ -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]
|
||||
|
|
|
@ -218,8 +218,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