If I click on a link to a video within a web page being displayed by UIWebView then the video plays but a dialog pops up saying "Plugin handled load".
Does anybody know why this happens and how to stop it from happening?
This is not a duplicate of:
Playing videos in UIWebView broken in iOS4?
as I am not creating a UIWebView with a zero size frame, which is described as the cause.
(Am using iOS 5)
The problem would seem to be in the fact the UIWebView does not include the same user agent string as mobile safari. (See this question here).
If your video is being converted to HTML5 or MP4 as your comment above implies, you will want to change the User Agent of your UIWebView to match mobile Safari so your website knows to convert the view from flash (flash will not play on iOS). Here is an answer to how to change the User Agent on a UIWebView.
Note, I have not tried this approach before.
Apparently the TYPO3 Media Player checks the User-Agent field of the HTTP request, and supplies iOS compatible video when it finds iOS Safari. The UIWebView supplies a different user agent, which the Typo 3 Media Player doesn't recognize, so it supplies content that triggers the dialog popup.
There are two options for fixing this: 1) Work with TYPO3 to fix their media player's customization for user agent functionality to recognize the user agent supplied by UIWebView as needing iOS compatible video. 2) Change the user agent reported by your instance of UIWebView to match what the TYPO3 media player expects. A quick search will find various guides on setting the user agent for a UIWebView available on the Web.
来源:https://stackoverflow.com/questions/9422507/plugin-handled-load-dialog-appears-when-playing-a-video-within-a-web-page-with