Should apps force-register HttpFetchPlugin on Vega/Fire TV when isSupported() returns false?
Environment: Vega SDK 0.23.8358 · @amazon-devices/react-native-w3cmedia 2.1.99 · Shaka Player 4.16.13 · Fire TV Stick
On our Fire TV Stick, shaka.net.HttpFetchPlugin.isSupported() returns false
(it requires a constructible ReadableStream and new Response('').body —
shaka http_fetch_plugin.js L289-L315),
so Shaka would normally fall back to HttpXHRPlugin.
But the Vega Video Sample App’s ShakaPlayer.ts explicitly unregisters the
default http/https handlers and force-registers the fetch plugin at
APPLICATION priority anyway:
- unregister:
ShakaPlayer.tsL283-L284 - force-register fetch plugin:
ShakaPlayer.tsL290-L302
shaka.net.NetworkingEngine.unregisterScheme('http');
shaka.net.NetworkingEngine.unregisterScheme('https');
const httpFetchPluginSupported = shaka.net.HttpFetchPlugin.isSupported(); // false on Kepler
shaka.net.NetworkingEngine.registerScheme(
'http',
shaka.net.HttpFetchPlugin.parse,
shaka.net.NetworkingEngine.PluginPriority.APPLICATION,
true,
);
shaka.net.NetworkingEngine.registerScheme(
'https',
shaka.net.HttpFetchPlugin.parse,
shaka.net.NetworkingEngine.PluginPriority.APPLICATION,
true,
);
Question: Is force-registering HttpFetchPlugin intentional and the
recommended networking path for Shaka on Vega, even though isSupported()
reports false?
We ask because on the default XHR fallback path, Shaka’s ABR bandwidth estimate
gets corrupted on our device (byte counts come back NaN, which pins ABR to the
startup rendition). So we’re trying to understand whether force-registering the
fetch plugin is the sanctioned workaround, or whether the XHR path is expected
to work. (Happy to share the detailed XHR/NaN root-cause analysis if useful.)