Bug 1299756 - Update VideoPuppeteer __str__ to output played ranges. r=maja_zf

This is a quality of life change. Since VideoPuppeteer uses, and since I plan on
using the played ranges of a video element more, it is useful to output them as
part of the str representation.

MozReview-Commit-ID: LwVPfVtFF1v

--HG--
extra : rebase_source : 1ebe4b7a7176a15f7e9300dee84103a8f6b86708
This commit is contained in:
Bryce Van Dyk 2016-09-01 10:50:05 +12:00
Родитель 8577fd7039
Коммит f3afe526e9
1 изменённых файлов: 10 добавлений и 9 удалений

Просмотреть файл

@ -268,15 +268,16 @@ class VideoPuppeteer(object):
if self.video:
messages += [
'\t(video)',
'\tcurrent_time: {0},'.format(self.current_time),
'\tduration: {0},'.format(self.duration),
'\texpected_duration: {0},'.format(self.expected_duration),
'\tlag: {0},'.format(self.lag),
'\turl: {0}'.format(self.video_url),
'\tsrc: {0}'.format(self.video_src),
'\tframes total: {0}'.format(self.total_frames),
'\t - dropped: {0}'.format(self.dropped_frames),
'\t - corrupted: {0}'.format(self.corrupted_frames)
'\tcurrent_time: {},'.format(self.current_time),
'\tduration: {},'.format(self.duration),
'\texpected_duration: {},'.format(self.expected_duration),
'\tplayed: {}'.format(self.played),
'\tlag: {},'.format(self.lag),
'\turl: {}'.format(self.video_url),
'\tsrc: {}'.format(self.video_src),
'\tframes total: {}'.format(self.total_frames),
'\t - dropped: {}'.format(self.dropped_frames),
'\t - corrupted: {}'.format(self.corrupted_frames)
]
else:
messages += ['\tvideo: None']