From 6a032078e934e6517516b225ab993f9e857ff5d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Thu, 19 Aug 2021 15:04:55 +0200 Subject: [PATCH] Feat: Add blob-url support (#3583) Issue #1481 --- lib/net/http_fetch_plugin.js | 4 ++++ lib/net/http_xhr_plugin.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/net/http_fetch_plugin.js b/lib/net/http_fetch_plugin.js index c4183f0c71..b5320258c6 100644 --- a/lib/net/http_fetch_plugin.js +++ b/lib/net/http_fetch_plugin.js @@ -306,4 +306,8 @@ if (shaka.net.HttpFetchPlugin.isSupported()) { 'https', shaka.net.HttpFetchPlugin.parse, shaka.net.NetworkingEngine.PluginPriority.PREFERRED, /* progressSupport= */ true); + shaka.net.NetworkingEngine.registerScheme( + 'blob', shaka.net.HttpFetchPlugin.parse, + shaka.net.NetworkingEngine.PluginPriority.PREFERRED, + /* progressSupport= */ true); } diff --git a/lib/net/http_xhr_plugin.js b/lib/net/http_xhr_plugin.js index ece2b6c96f..aec4ec6de2 100644 --- a/lib/net/http_xhr_plugin.js +++ b/lib/net/http_xhr_plugin.js @@ -158,4 +158,8 @@ shaka.net.NetworkingEngine.registerScheme( 'https', shaka.net.HttpXHRPlugin.parse, shaka.net.NetworkingEngine.PluginPriority.FALLBACK, /* progressSupport= */ true); +shaka.net.NetworkingEngine.registerScheme( + 'blob', shaka.net.HttpXHRPlugin.parse, + shaka.net.NetworkingEngine.PluginPriority.FALLBACK, + /* progressSupport= */ true);