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

Side by Side Diff: ui/file_manager/video_player/js/cast/cast_video_element.js

Issue 760853003: Adds histograms for casting feature of Video Player (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move back the place of the recordCastVideoLength (per offline discussion with fukino@) Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /** 5 /**
6 * Interval for updating media info (in ms). 6 * Interval for updating media info (in ms).
7 * @type {number} 7 * @type {number}
8 * @const 8 * @const
9 */ 9 */
10 var MEDIA_UPDATE_INTERVAL = 250; 10 var MEDIA_UPDATE_INTERVAL = 250;
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 this.dispatchEvent(new Event('pause')); 479 this.dispatchEvent(new Event('pause'));
480 480
481 this.currentMediaPlayerState_ = newState; 481 this.currentMediaPlayerState_ = newState;
482 } 482 }
483 if (this.currentMediaCurrentTime_ !== media.getEstimatedTime()) { 483 if (this.currentMediaCurrentTime_ !== media.getEstimatedTime()) {
484 this.currentMediaCurrentTime_ = media.getEstimatedTime(); 484 this.currentMediaCurrentTime_ = media.getEstimatedTime();
485 this.dispatchEvent(new Event('timeupdate')); 485 this.dispatchEvent(new Event('timeupdate'));
486 } 486 }
487 487
488 if (this.currentMediaDuration_ !== media.media.duration) { 488 if (this.currentMediaDuration_ !== media.media.duration) {
489 metrics.recordCastedVideoLength(this.currentMediaDuration_);
490
489 this.currentMediaDuration_ = media.media.duration; 491 this.currentMediaDuration_ = media.media.duration;
490 this.dispatchEvent(new Event('durationchange')); 492 this.dispatchEvent(new Event('durationchange'));
491 } 493 }
492 494
493 // Media is being unloaded. 495 // Media is being unloaded.
494 if (!alive) { 496 if (!alive) {
495 this.unloadMedia_(); 497 this.unloadMedia_();
496 return; 498 return;
497 } 499 }
498 }, 500 },
499 }; 501 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698