diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index 3d7630ba2157..a5cbbee76d6a 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -6380,6 +6380,16 @@ nsContentUtils::FindInternalContentViewer(const char* aType, } #endif +#ifdef MOZ_DASH + if (DecoderTraits::IsDASHMPDType(nsDependentCString(aType))) { + docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1"); + if (docFactory && aLoaderType) { + *aLoaderType = TYPE_CONTENT; + } + return docFactory.forget(); + } +#endif + #ifdef MOZ_GSTREAMER if (DecoderTraits::IsGStreamerSupportedType(nsDependentCString(aType))) { docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1"); diff --git a/content/media/test/manifest.js b/content/media/test/manifest.js index fc6578d79616..bc4ecb813303 100644 --- a/content/media/test/manifest.js +++ b/content/media/test/manifest.js @@ -27,6 +27,7 @@ var gProgressTests = [ { name:"320x240.ogv", type:"video/ogg", width:320, height:240, duration:0.266, size:28942 }, { name:"seek.webm", type:"video/webm", duration:3.966, size:215529 }, { name:"gizmo.mp4", type:"video/mp4", duration:5.56, size:383631 }, + { name:"dash-manifest.mpd", type:"application/dash+xml", duration:3.966 }, { name:"bogus.duh", type:"bogus/duh" } ]; @@ -255,6 +256,12 @@ var gInfoLeakTests = [ }, { type: 'video/webm', src: fileUriToSrc("tests/content/media/test/404.webm", false), + }, { + type: 'application/dash+xml', + src: fileUriToSrc("tests/content/media/test/dash-manifest.mpd", true), + }, { + type: 'application/dash+xml', + src: fileUriToSrc("tests/content/media/test/404.mpd", false), }, { type: 'video/ogg', src: 'http://localhost/404.ogv', @@ -264,6 +271,9 @@ var gInfoLeakTests = [ }, { type: 'video/webm', src: 'http://localhost/404.webm', + }, { + type: 'application/dash+xml', + src: 'http://localhost/404.mpd', }, { type: 'video/ogg', src: 'http://example.com/tests/content/media/test/test_info_leak.html' diff --git a/content/media/test/test_info_leak.html b/content/media/test/test_info_leak.html index d37b236c107d..cedf1fcfb03c 100644 --- a/content/media/test/test_info_leak.html +++ b/content/media/test/test_info_leak.html @@ -81,7 +81,7 @@ function listener(evt) { } function createMedia(type, src, token) { - var tag = /^video/.test(type) ? "video" : "audio"; + var tag = getMajorMimeType(test.type); var v = document.createElement(tag); for (var i=0; i