Opt-out of AVPlayer automatic sleep disabling
Created attachment 292818 [details] Patch
Comment on attachment 292818 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=292818&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:1053 > + if ([m_avPlayer respondsToSelector:@selector(_setPreventsSleepDuringVideoPlayback:)]) Is this check necessary?
Created attachment 292849 [details] Patch
(In reply to comment #2) > Comment on attachment 292818 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=292818&action=review > > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:1053 > > + if ([m_avPlayer respondsToSelector:@selector(_setPreventsSleepDuringVideoPlayback:)]) > > Is this check necessary? Only a preponderance of caution; since it's SPI, it's not guaranteed to exist in any particular platform.
rdar://problem/28496489
Created attachment 293168 [details] Patch
Comment on attachment 293168 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=293168&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:1054 > + if ([m_avPlayer respondsToSelector:@selector(_setPreventsSleepDuringVideoPlayback:)]) > + [m_avPlayer _setPreventsSleepDuringVideoPlayback:player()->shouldDisableSleep()]; Nit: you can just call setShouldDisableSleep() here instead of duplicating the code.
Created attachment 293263 [details] Patch for landing
Comment on attachment 293263 [details] Patch for landing Clearing flags on attachment: 293263 Committed r208151: <http://trac.webkit.org/changeset/208151>
This landed and didn't backed out: Link - https://github.com/WebKit/WebKit/commit/df60ebbfa340b5663a91c6f04cee23a2772bbbf5 Marking this as "RESOLVED FIXED".