Lines Matching refs:metrics
6 // and collect metrics for each.
9 // MediaMetric class responsible for collecting metrics on a media element.
10 // It attaches required event listeners in order to collect different metrics.
13 this.metrics = {};
19 return this.metrics;
25 'metrics': this.getMetrics()
99 metric.metrics['avg_loop_time'] =
107 if (!this.metrics[metric])
108 this.metrics[metric] = [];
109 this.metrics[metric].push(value);
114 if (!this.metrics['time_to_play'] && this.playbackTimer)
115 this.metrics['time_to_play'] = this.playbackTimer.stop();
119 var time_to_end = this.playbackTimer.stop() - this.metrics['time_to_play'];
123 this.metrics['buffering_time'] = time_to_end - this.element.duration * 1000;
131 this.metrics['decoded_frame_count'] = decodedFrames;
133 this.metrics['dropped_frame_count'] = droppedFrames;
134 this.metrics['decoded_video_bytes'] =
136 this.metrics['decoded_audio_bytes'] =
138 return this.metrics;
198 // Returns a summary (info + metrics) for all media metrics.
199 var metrics = [];
201 metrics.push(window.__mediaMetrics[i].getSummary());
202 return metrics;