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: if self.video:
messages += [ messages += [
'\t(video)', '\t(video)',
'\tcurrent_time: {0},'.format(self.current_time), '\tcurrent_time: {},'.format(self.current_time),
'\tduration: {0},'.format(self.duration), '\tduration: {},'.format(self.duration),
'\texpected_duration: {0},'.format(self.expected_duration), '\texpected_duration: {},'.format(self.expected_duration),
'\tlag: {0},'.format(self.lag), '\tplayed: {}'.format(self.played),
'\turl: {0}'.format(self.video_url), '\tlag: {},'.format(self.lag),
'\tsrc: {0}'.format(self.video_src), '\turl: {}'.format(self.video_url),
'\tframes total: {0}'.format(self.total_frames), '\tsrc: {}'.format(self.video_src),
'\t - dropped: {0}'.format(self.dropped_frames), '\tframes total: {}'.format(self.total_frames),
'\t - corrupted: {0}'.format(self.corrupted_frames) '\t - dropped: {}'.format(self.dropped_frames),
'\t - corrupted: {}'.format(self.corrupted_frames)
] ]
else: else:
messages += ['\tvideo: None'] messages += ['\tvideo: None']