WKWebViewConfiguration:
mediaPlaybackRequiresUserAction
has been deprecated since iOS 9
In WKWebViewConfiguration
:
@available(iOS, introduced: 8.0, deprecated: 9.0)
open var mediaPlaybackRequiresUserAction: Bool
And specified by Apple
mediaPlaybackRequiresUserAction
Deprecated property. Instead, use mediaTypesRequiringUserActionForPlayback
WKWebViewConfiguration:
According to Apple's documentation mediaTypesRequiringUserActionForPlayback
is only for iOS 10+.
In WKWebViewConfiguration
:
@available(iOS 10.0, *)
open var mediaTypesRequiringUserActionForPlayback: WKAudiovisualMediaTypes
So here is my question:
as mediaPlaybackRequiresUserAction
is deprecated for iOS 9, and mediaTypesRequiringUserActionForPlayback
is only for iOS 10+, what can I use for iOS 9?
There is a property on the WKWebViewConfiguration
object you initialize your WKWebView
with named requiresUserActionForMediaPlayback
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With