TextureGroup / Texture

Smooth asynchronous user interfaces for iOS apps.
https://texturegroup.org/
Other
8.03k stars 1.3k forks source link

ASVideo - Expose preventsDisplaySleepDuringVideoPlayback #1806

Open SleepiestAdam opened 4 years ago

SleepiestAdam commented 4 years ago

Just a recommendation to expose preventsDisplaySleepDuringVideoPlayback (https://developer.apple.com/documentation/avfoundation/avplayer/2990522-preventsdisplaysleepduringvideop?language=objc) as part of ASVideo, as it's something many folks use with video backgrounds etc, and currently when an ASVideo is in the scene the iOS screen won't ever auto-lock.

Currently I'm having to be a bit hacky and set it in one of the ASVideoNodeDelegate methods via the AVPlayer directly, whereas just setting it on the ASVideo itself would be far cleaner.

jparise commented 4 years ago

@AssyriaGameStudio want to work up a patch that adds it?

SleepiestAdam commented 4 years ago

Would love to - however Objective C is beyond me / I can't get my head around the syntax, very much a swift-centric guy lol.