Bug 992568 - Part 1: Render RTSP in the browser. r=sworkman
authorEthan Tseng <ettseng@mozilla.com>
Mon, 20 Jan 2014 18:54:33 +0800
changeset 180002 fa91f01d12363cd91b706118c0923e246a594b40
parent 180001 95cb03addd29a81c89afc9e730afd0d7530547cf
child 180003 93cc1760dbbb17537ca5b46fba7a016a6198426a
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewerssworkman
bugs992568
milestone31.0a1
Bug 992568 - Part 1: Render RTSP in the browser. r=sworkman
b2g/app/b2g.js
content/media/DecoderTraits.cpp
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -44,17 +44,17 @@ pref("offline-apps.allow_by_default", tr
 pref("network.protocol-handler.warn-external.tel", false);
 pref("network.protocol-handler.warn-external.mailto", false);
 pref("network.protocol-handler.warn-external.vnd.youtube", false);
 
 /* protocol expose prefs */
 // By default, all protocol handlers are exposed. This means that the browser
 // will response to openURL commands for all URL types. It will also try to open
 // link clicks inside the browser before failing over to the system handlers.
-pref("network.protocol-handler.expose.rtsp", false);
+pref("network.protocol-handler.expose.rtsp", true);
 
 /* http prefs */
 pref("network.http.pipelining", true);
 pref("network.http.pipelining.ssl", true);
 pref("network.http.proxy.pipelining", true);
 pref("network.http.pipelining.maxrequests" , 6);
 pref("network.http.keep-alive.timeout", 600);
 pref("network.http.max-connections", 20);
--- a/content/media/DecoderTraits.cpp
+++ b/content/media/DecoderTraits.cpp
@@ -426,16 +426,21 @@ DecoderTraits::CanHandleMediaType(const 
     result = CANPLAY_MAYBE;
   }
 #endif
 #ifdef MOZ_MEDIA_PLUGINS
   if (MediaDecoder::IsMediaPluginsEnabled() &&
       GetMediaPluginHost()->FindDecoder(nsDependentCString(aMIMEType), &codecList))
     result = CANPLAY_MAYBE;
 #endif
+#ifdef NECKO_PROTOCOL_rtsp
+  if (IsRtspSupportedType(nsDependentCString(aMIMEType))) {
+    result = CANPLAY_MAYBE;
+  }
+#endif
   if (result == CANPLAY_NO || !aHaveRequestedCodecs || !codecList) {
     return result;
   }
 
   // See http://www.rfc-editor.org/rfc/rfc4281.txt for the description
   // of the 'codecs' parameter
   nsCharSeparatedTokenizer tokenizer(aRequestedCodecs, ',');
   bool expectMoreTokens = false;
@@ -660,12 +665,15 @@ bool DecoderTraits::IsSupportedInVideoDo
      Preferences::GetBool("media.windows-media-foundation.play-stand-alone", true)) ||
 #endif
 #ifdef MOZ_DIRECTSHOW
     IsDirectShowSupportedType(aType) ||
 #endif
 #ifdef MOZ_APPLEMEDIA
     IsAppleMediaSupportedType(aType) ||
 #endif
+#ifdef NECKO_PROTOCOL_rtsp
+    IsRtspSupportedType(aType) ||
+#endif
     false;
 }
 
 }