| Index: ui/file_manager/video_player/js/video_player.js
|
| diff --git a/ui/file_manager/video_player/js/video_player.js b/ui/file_manager/video_player/js/video_player.js
|
| index 1c6e04abed05409ce0631908acdbfb6fd65c431b..58da165da0c0e50a38d3639c9712ec4d86ada55d 100644
|
| --- a/ui/file_manager/video_player/js/video_player.js
|
| +++ b/ui/file_manager/video_player/js/video_player.js
|
| @@ -318,6 +318,8 @@ VideoPlayer.prototype.loadVideo_ = function(video, opt_callback) {
|
|
|
| var videoElementInitializePromise;
|
| if (this.currentCast_) {
|
| + metrics.recordPlayType(metrics.PLAY_TYPE.CAST);
|
| +
|
| videoPlayerElement.setAttribute('casting', true);
|
|
|
| document.querySelector('#cast-name').textContent =
|
| @@ -342,6 +344,7 @@ VideoPlayer.prototype.loadVideo_ = function(video, opt_callback) {
|
| }.bind(this));
|
| }.bind(this));
|
| } else {
|
| + metrics.recordPlayType(metrics.PLAY_TYPE.LOCAL);
|
| videoPlayerElement.removeAttribute('casting');
|
|
|
| this.videoElement_ = document.createElement('video');
|
| @@ -390,6 +393,9 @@ VideoPlayer.prototype.loadVideo_ = function(video, opt_callback) {
|
| }.bind(this))
|
| // In case of error.
|
| .catch(function(error) {
|
| + if (this.currentCast_)
|
| + metrics.recordCastVideoErrorAction();
|
| +
|
| videoPlayerElement.removeAttribute('loading');
|
| console.error('Failed to initialize the video element.',
|
| error.stack || error);
|
| @@ -668,6 +674,10 @@ var initPromise = Promise.all(
|
|
|
| initPromise.then(function(results) {
|
| var videos = results[0];
|
| +
|
| + metrics.recordOpenVideoPlayerAction();
|
| + metrics.recordNumberOfOpenedFiles(videos.length);
|
| +
|
| player.prepare(videos);
|
| return new Promise(player.playFirstVideo.wrap(player));
|
| }.wrap(null));
|
|
|