mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 14:12:51 +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 New Issue
Block a user