New issue
Advanced search Search tips

Issue 679482 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

HLS videos restart when switching tabs

Project Member Reported by tguilbert@chromium.org, Jan 9 2017

Issue description

The fix for crbug.com/677280 introduced a new bug.

MediaPlayerBridge::Initialize() sometimes fails, and we are unable to pre-extract an HLS video's duration. When we resume a video (e.g. tab-switch), we drop the seek in MediaPlayerRenderer::StartPlayingFrom(), since we do not have duration information. This causes the video to start playing from 0:00 instead.

I am currently looking at what the proper way to fix this, without re-introducing 677280.


 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0d32da520686f09a43107b63e9ab365fa5af580f

commit 0d32da520686f09a43107b63e9ab365fa5af580f
Author: tguilbert <tguilbert@chromium.org>
Date: Tue Jan 10 01:31:26 2017

Improve MediaPlayerBridge seek resiliance

crbug.com/677280 manifested whenever we tried seeking on a non-seekable
live stream, causing the MediaPlayer to crash, and the stream to never
start.

Dropping seeks based off of unknown or infinite media duration (for
livestreams) introduced  crbug.com/679482 . When we resume a tab, the
MediaPlayerRenderer is re-created, and if the preliminary attempt to
extract the media's metadata failed, we drop the first seek. This causes
the media restart after every tab switch.

It turns out that there is a better fix for 677280, which prevents
679482 entirely. Currently, in MediaPlayerBridge::OnMediaPrepared(), we
complete pending seeks before updating allowable operations. Updating
allowable operations as a first action properly sets "CanSeekForward"
and "CanSeekBackards", which then aborts any invalid seek attempts
without any additional logic.

BUG= 679482 , 677280
TEST= Manual test on a live HLS stream and non live HLS video.

Review-Url: https://codereview.chromium.org/2626443003
Cr-Commit-Position: refs/heads/master@{#442441}

[modify] https://crrev.com/0d32da520686f09a43107b63e9ab365fa5af580f/content/browser/media/android/media_player_renderer.cc
[modify] https://crrev.com/0d32da520686f09a43107b63e9ab365fa5af580f/media/base/android/media_player_bridge.cc

Status: Fixed (was: Started)

Sign in to add a comment