Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: chrome/common/extensions/docs/examples/api/desktopCapture/app.js

Issue 121203002: Use window.URL instead of window.webkitURL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: window.URL -> URL in user_images_grid.js Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function gotStream(stream) { 5 function gotStream(stream) {
6 console.log("Received local stream"); 6 console.log("Received local stream");
7 var video = document.querySelector("video"); 7 var video = document.querySelector("video");
8 video.src = webkitURL.createObjectURL(stream); 8 video.src = URL.createObjectURL(stream);
9 localstream = stream; 9 localstream = stream;
10 stream.onended = function() { console.log("Ended"); }; 10 stream.onended = function() { console.log("Ended"); };
11 } 11 }
12 12
13 function getUserMediaError() { 13 function getUserMediaError() {
14 console.log("getUserMedia() failed."); 14 console.log("getUserMedia() failed.");
15 } 15 }
16 16
17 function onAccessApproved(id) { 17 function onAccessApproved(id) {
18 if (!id) { 18 if (!id) {
(...skipping 12 matching lines...) Expand all
31 document.querySelector('#start').addEventListener('click', function(e) { 31 document.querySelector('#start').addEventListener('click', function(e) {
32 pending_request_id = chrome.desktopCapture.chooseDesktopMedia( 32 pending_request_id = chrome.desktopCapture.chooseDesktopMedia(
33 ["screen", "window"], onAccessApproved); 33 ["screen", "window"], onAccessApproved);
34 }); 34 });
35 35
36 document.querySelector('#cancel').addEventListener('click', function(e) { 36 document.querySelector('#cancel').addEventListener('click', function(e) {
37 if (pending_request_id != null) { 37 if (pending_request_id != null) {
38 chrome.desktopCapture.cancelChooseDesktopMedia(pending_request_id); 38 chrome.desktopCapture.cancelChooseDesktopMedia(pending_request_id);
39 } 39 }
40 }); 40 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698