diff --git a/core/cog-webkit-utils.c b/core/cog-webkit-utils.c index 81e5252f..71e7bdee 100644 --- a/core/cog-webkit-utils.c +++ b/core/cog-webkit-utils.c @@ -72,6 +72,16 @@ cog_handle_web_view_load_failed (WebKitWebView *web_view, GError *error, void *userdata) { + // If the resource is going to be shown by a plug-in or a + // media engine (for the case of API WPE2) just return FALSE and + // let WebKit handle it. +#if COG_USE_WPE2 + if (g_error_matches(error, WEBKIT_MEDIA_ERROR, WEBKIT_MEDIA_ERROR_WILL_HANDLE_LOAD)) +#else + if (g_error_matches(error, WEBKIT_PLUGIN_ERROR, WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD)) +#endif + return FALSE; + // Ignore cancellation errors as the active URI may be changing if (g_error_matches (error, WEBKIT_NETWORK_ERROR,