Bug 1301055 - part1 : allow to replay the same video again. draft
authorAlastor Wu <alwu@mozilla.com>
Thu, 24 Nov 2016 10:24:02 +0800
changeset 443243 5042392bd1939706a8eb947f16f32da7bba8c363
parent 443220 34fce7c12173bdd6dda54c2ebf6d344252f1ac48
child 443244 bc90782a78a0e2f14773a66714f9192e61970ec9
push id36935
push useralwu@mozilla.com
push dateThu, 24 Nov 2016 03:29:08 +0000
bugs1301055
milestone53.0a1
Bug 1301055 - part1 : allow to replay the same video again. MozReview-Commit-ID: LNz6vEeMZOL
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -4515,27 +4515,22 @@ var BrowserEventHandler = {
         if (this._inCluster) {
           aEvent.preventDefault();
         }
         break;
       case 'MozMouseHittest':
         this._handleRetargetedTouchStart(aEvent);
         break;
       case 'OpenMediaWithExternalApp': {
-        if (aEvent.target.moz_video_uuid) {
-          return;
-        }
         let mediaSrc = aEvent.target.currentSrc || aEvent.target.src;
-        if (!aEvent.target.moz_video_uuid) {
-          aEvent.target.moz_video_uuid = uuidgen.generateUUID().toString();
-        }
+        let uuid = uuidgen.generateUUID().toString();
         Services.androidBridge.handleGeckoMessage({
           type: "Video:Play",
           uri: mediaSrc,
-          uuid: aEvent.target.moz_video_uuid
+          uuid: uuid
         });
         break;
       }
     }
   },
 
   _handleRetargetedTouchStart: function(aEvent) {
     // we should only get this called just after a new touchstart with a single