Commit 7fd27c4b authored by Dale Curtis's avatar Dale Curtis Committed by Commit Bot

Start WatchTimeReporter when created in the middle of playback.

When EME is attached, if playback is ongoing, we will attempt to
recreate the WatchTimeReporter without triggering play on it
again -- losing that watch time. It's unclear if this is actually
a real possibility though... is EME required to be attached to
start playback of even a non-encrypted stream? Or just by the
time the encrypted portion needs to play?

Previously this also happened for property changes, but since those
have all moved into secondary property updates that don't restart
the reporter, there is no issue there anymore.

BUG=none
TEST=none.

Change-Id: Ib2c021418eb63634c59b450bf9c80810ca2dc835
Reviewed-on: https://chromium-review.googlesource.com/1148951Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579194}
parent e30141a3
......@@ -2889,6 +2889,12 @@ void WebMediaPlayerImpl::CreateWatchTimeReporter() {
}
UpdateSecondaryProperties();
// If the WatchTimeReporter was recreated in the middle of playback, we want
// to resume playback here too since we won't get another play() call. When
// seeking, the seek completion will restart it if necessary.
if (!paused_ && !seeking_)
watch_time_reporter_->OnPlaying();
}
void WebMediaPlayerImpl::UpdateSecondaryProperties() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment