Bug 802466 - Add signature to stream url. r=fabrice
authorDale Harvey <dale@arandomurl.com>
Wed, 17 Oct 2012 15:33:58 -0400
changeset 110584 d896a7f47e02184fa2693ad72641608bad716767
parent 110583 357778ffa80165c04d0b71ab284fa300c870df51
child 110585 bd5e49f6d2fa534fdc1aeb8eb778563a0cae3c95
push id23700
push userryanvm@gmail.com
push dateThu, 18 Oct 2012 02:10:26 +0000
treeherdermozilla-central@5142bbd4da12 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs802466
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 802466 - Add signature to stream url. r=fabrice
b2g/components/YoutubeProtocolHandler.js
--- a/b2g/components/YoutubeProtocolHandler.js
+++ b/b2g/components/YoutubeProtocolHandler.js
@@ -88,17 +88,17 @@ YoutubeProtocolHandler.prototype = {
       streams.forEach(function(aStream) {
         let params = extractParameters(aStream);
         let url = params["url"];
         let type = params["type"] ? params["type"].split(";")[0] : null;
 
         let index;
         if (url && type && ((index = recognizedTypes.indexOf(type)) != -1) &&
             index > bestType) {
-          uri = url;
+          uri = url + '&signature=' + (params["sig"] ? params['sig'] : '');
           mimeType = type;
           bestType = index;
         }
         for (let param in params) {
           if (["thumbnail_url", "length_seconds", "title"].indexOf(param) != -1) {
             extras[param] = decodeURIComponent(params[param]);
           }
         }