OLD | NEW |
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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** | 7 /** |
8 * Inverval for updating media info (in ms). | 8 * Interval for updating media info (in ms). |
9 * @type {number} | 9 * @type {number} |
10 * @const | 10 * @const |
11 */ | 11 */ |
12 var MEDIA_UPDATE_INTERVAL = 250; | 12 var MEDIA_UPDATE_INTERVAL = 250; |
13 | 13 |
14 /** | 14 /** |
15 * The namespace for communication between the cast and the player. | 15 * The namespace for communication between the cast and the player. |
16 * @type {string} | 16 * @type {string} |
17 * @const | 17 * @const |
18 */ | 18 */ |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 * @type {boolean} | 112 * @type {boolean} |
113 */ | 113 */ |
114 get ended() { | 114 get ended() { |
115 if (!this.castMedia_) | 115 if (!this.castMedia_) |
116 return true; | 116 return true; |
117 | 117 |
118 return this.castMedia_.idleReason === chrome.cast.media.IdleReason.FINISHED; | 118 return this.castMedia_.idleReason === chrome.cast.media.IdleReason.FINISHED; |
119 }, | 119 }, |
120 | 120 |
121 /** | 121 /** |
122 * If this video is seelable or not. | 122 * If this video is seekable or not. |
123 * @type {boolean} | 123 * @type {boolean} |
124 */ | 124 */ |
125 get seekable() { | 125 get seekable() { |
126 // TODO(yoshiki): Support seek. | 126 // TODO(yoshiki): Support seek. |
127 return false; | 127 return false; |
128 }, | 128 }, |
129 | 129 |
130 /** | 130 /** |
131 * Value of the volume | 131 * Value of the volume |
132 * @type {number} | 132 * @type {number} |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 this.dispatchEvent(new Event('durationchange')); | 407 this.dispatchEvent(new Event('durationchange')); |
408 } | 408 } |
409 | 409 |
410 // Media is being unloaded. | 410 // Media is being unloaded. |
411 if (!alive) { | 411 if (!alive) { |
412 this.unloadMedia_(); | 412 this.unloadMedia_(); |
413 return; | 413 return; |
414 } | 414 } |
415 }, | 415 }, |
416 }; | 416 }; |
OLD | NEW |