lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
245 stars 17 forks source link

50394324: Video cannot play in iOS 12.2 webview (WKWebView and UIWebView both) #21227

Open openradar-mirror opened 5 years ago

openradar-mirror commented 5 years ago

Description

Area: WebKit

Summary: HTML5 video control wil supported video type will not play when the user clicks the play button in iOS 12.2.

In the safari console, we see this error:

Unhandled Promise Rejection: NotAllowedError: The request is not allowed by >the user agent or the platform in the current context, possibly because the >user denied permission

Steps to Reproduce:

On an html page we have got a video control:

The video is a supported video type. The user clicks the play button and it does not play. In the safari console, we see the error above.

There is no javascript code controlled by us that is playing the video. It appears in the safari debugger that webkit is injecting some javascript that is calling HTMLMedia​Element​.play(), but it is not my code.

This happens whether UIWebView or WKWebView is being used.

Expected Results: The video will play

Actual Results: The video does not play, and the error message above appears.

Version/Build: iOS 12.2

Configuration: No special configuration.

If mediaPlaybackRequiresUserAction is set to YES on the webview, the video will play. I believe this is should not be required, because the video play button is hit by a user interaction.

- Product Version: 12.2 Created: 2019-05-02T04:05:41.072542 Originated: 2019-02-05T00:00:00 Open Radar Link: http://www.openradar.me/50394324