When playing video on a web page in the UIWebView interface, the "Plugin handled load" dialog box appears

If I click on the video link in the web page displayed by UIWebView, then the video is playing, but a dialog box appears with the message β€œDownload using the plugin”.

Does anyone know why this is happening and how to stop it?

This is not a duplicate:

Play video in UIWebView damaged in iOS4?

since I am not creating a UIWebView with a frame of zero size, which is described as the reason.

(I am using iOS 5)

+4
source share
2 answers

The problem, apparently, is that UIWebView does not include the same user agent string as mobile safari. (See here.)

If your video is converted to HTML5 or MP4, as follows from your comment above, you will need to change the User Agent of your UIWebView so that it matches Mobile Safari, so that your site knows to convert the view from flash (flash will not play on iOS). Here is the answer on how to change User Agent to UIWebView.

Notice, I have not tried this approach before.

+2
source

Apparently, TYPO3 Media Player checks the User-Agent field of the HTTP request and delivers iOS-compatible video when it finds iOS Safari. UIWebView provides a different user agent that the Typo 3 media player does not recognize, so it provides content that launches a pop-up window.

There are two options for this: 1) Work with TYPO3 to fix the configuration of your media player for the user agent functionality in order to recognize the user agent provided by UIWebView in accordance with the requirements for iOS-compatible video. 2) Change the user agent specified by your UIWebView instance to match the expected TYPO3 media player. A quick search will find various user agent configuration guides for the UIWebView available on the Internet.

+2
source

Source: https://habr.com/ru/post/1233182/


All Articles