DescriptionWork around unreliable metadata for HLS in WebMediaPlayerAndroid
There are two bugs involved, both specific to HLS:
1. MediaPlayer.getDuration() returning 0 as opposed to -1.
2. The MediaPlayer.OnVideoSizeChangedListener callback being called
with width and height zero and later with a non-zero size.
Logging statements were used to test for the bugs on
http://www.aljazeera.com/watch_now/ with some different devices:
* Huawei P6-U06, Android 4.2.2: both bugs
* Samsung Galaxy S Duos 2, Android 4.2.2: duration bug
* HTC One, Android 4.3: both bugs
* Sony Xperia CP C5303, Android 4.3: both bugs
* Samsung Galaxy S III, Android 4.3: duration bug
* Samsung Galaxy S4, Android 4.4.2: duration bug
* Samsung Galaxy Young 2, Android 4.4.2: duration bug
* Samsung Galaxy Grand Prime, Android 4.4.4: duration bug
* Sony Xperia Z2, Android 5.0.2: duration bug
* Samsung Galaxy S4, CyanogenMod 12.1, Android 5.1.1: duration bug
In summary, the duration bug affects every device tested, while the
video size bug seems to affect some but not all devices running
Android 4.3 and older.
Avoid the need for a local duration variable in OnMediaMetadataChanged
by passing its argument by value, which is already the case for all
other OnMediaMetadataChanged methods in the code base.
BUG=501213, 509972
R=qinmin@chromium.org
Committed: https://crrev.com/e95e3c68fffcac8ca62cb4d0269c7a867bcd02ff
Cr-Commit-Position: refs/heads/master@{#339019}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Also check has_size_info_ #
Messages
Total messages: 13 (3 generated)
|