Skip to content

Commit

Permalink
Do not create iOS video player if the OS version is < 15 (#90)
Browse files Browse the repository at this point in the history
* Do not create iOS video player if the OS version is < 15

The VideoPlayerIos implementation relies on methods that are only available for iOS 15+.

For example: https://developer.apple.com/documentation/avfoundation/avfragmentedasset/3746534-loadtrackswithmediatype?language=objc

* Fix missing parentesis
  • Loading branch information
lucas-viva authored Apr 7, 2024
1 parent 6b09bc1 commit 7b78a18
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gdx-video/src/com/badlogic/gdx/video/VideoPlayerCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ private static void initialize () {
Gdx.app.log("Gdx-Video", "VideoPlayer can't be used on android < API level 12");
}
} else if (type == ApplicationType.iOS) {
className = "com.badlogic.gdx.video.VideoPlayerIos";
if (Gdx.app.getVersion() >= 15) {
className = "com.badlogic.gdx.video.VideoPlayerIos";
} else {
Gdx.app.log("Gdx-Video", "VideoPlayer can't be used on iOS < 15");
}
} else if (type == ApplicationType.Desktop) {
className = "com.badlogic.gdx.video.VideoPlayerDesktop";
} else if (type == ApplicationType.WebGL) {
Expand Down

0 comments on commit 7b78a18

Please sign in to comment.