Shaka namespace needed
Closed this issue · 3 comments
mrlika commented
To integrate P2P Media Loader engine with Shaka Player in Clappr we need both: shaka player instance and shaka namespace object. Namespace object is not available.
function registerParserProxies() {
debug("register parser proxies");
shaka.media.ManifestParser.registerParserByExtension("mpd", ShakaDashManifestParserProxy);
shaka.media.ManifestParser.registerParserByMime("application/dash+xml", ShakaDashManifestParserProxy);
shaka.media.ManifestParser.registerParserByExtension("m3u8", ShakaHlsManifestParserProxy);
shaka.media.ManifestParser.registerParserByMime("application/x-mpegurl", ShakaHlsManifestParserProxy);
shaka.media.ManifestParser.registerParserByMime("application/vnd.apple.mpegurl", ShakaHlsManifestParserProxy);
}
function initializeNetworkingEngine() {
debug("init networking engine");
shaka.net.NetworkingEngine.registerScheme("http", processNetworkRequest);
shaka.net.NetworkingEngine.registerScheme("https", processNetworkRequest);
}
See details:
https://github.com/Novage/p2p-media-loader/blob/master/p2p-media-loader-shaka/lib/integration.ts
Can you make somehow the namespace available to hook into shaka.net and shaka.media before Shaka Player object creation? For example:
var shakaNamespace = DashShakaPlayback.getShakaNamespace();
kslimani commented
Maybe simply add a getter, like we did for HLSJS playback, for example :
static get SHAKA() {
return shaka
}
And the player instance should be available with the shakaPlayerInstance getter. (if created)
leandromoreira commented
Thanks you two =) I'll bring @towerz and @vagnervjs I think @kslimani idea's seems pretty solid.