brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.53k stars 2.27k forks source link

Media runtime sometimes not shown (shown as `0m 0s`) #40234

Open stephendonner opened 1 month ago

stephendonner commented 1 month ago

Description

Media runtime sometimes not shown (shown as 0m 0s)

Found while testing https://github.com/brave/brave-browser/issues/32585

Steps to reproduce

  1. install 1.70.41
  2. launch Brave
  3. load https://www.youtube.com/watch?v=4iNMyilmDfg
  4. restart Brave (to pick up Griffin seeds)
  5. load https://www.youtube.com/watch?v=4iNMyilmDfg again
  6. click on the music note icon to Add to Playlist

Actual result

Runtime is shown as 0m 0s

Screen Shot 2024-08-02 at 2 12 01 PM

Expected result

Should show the media's hours minutes seconds runtime

Reproduces how often

Easily reproduced

Brave version (brave://version info)

Brave | 1.70.41 Chromium: 127.0.6533.88 (Official Build) nightly (x86_64)
-- | --
Revision | 9303bae9fe07bc2ec7c0cdef139e87304b2d6c96
OS | macOS Version 11.7.10 (Build 20G1427)

Channel information

Reproducibility

Miscellaneous information

@aguscruiz @sangwoo108 @szilardszaloki @rebron @brave/qa-team

MadhaviSeelam commented 1 month ago

Reproduced the issue with twitch.tv clips https://www.twitch.tv/mrskilted/clip/ExcitedDistinctGarageANELE-HE82zvRFIxiX8Xkj

image
sangwoo108 commented 1 month ago

Yeah, sometimes we can't get the duration properly at the point of caching. I was thinking of updating it when the video is played.

szilardszaloki commented 1 month ago

Hey all, Just a heads-up that we won't have to deal with this once we're on the MediaSession API.