Closed Bug 1780150 Opened 2 months ago Closed 1 month ago

Twitter video clock flashes "-1:0-1:0-1" before looping

Categories

(Core :: Audio/Video: Playback, defect, P3)

defect

Tracking

()

VERIFIED FIXED
105 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- wontfix
firefox102 --- wontfix
firefox103 --- wontfix
firefox104 --- wontfix
firefox105 --- verified

People

(Reporter: cpeterson, Assigned: padenot)

References

(Regressed 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Attached image screenshot.png

@ Paul, this bug is a regression in 102 from muted audio stream bug 1743834. I bisected this regression to this pushlog:

https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=6323b526b0ac784521845c58f4035da85572c4be&tochange=3774e6ab386979c9553482e1bd2ed5d0a2eee075

Steps to reproduce

  1. Open https://twitter.com/grumpygamer/status/1549048421708836864
  2. Scroll up to the first tweet. (I linked to a reply tweet because directly linking to the first tweet sometimes causes the video to play without showing a clock.)
  3. Play the video.
  4. Watch the video loop.

Expected result

The video's clock should seamlessly roll over from 0:00 to 0:09.

Actual result

Before rolling over to 0:09, the clock flashes -1:0-1:0-1. See the attached screenshot.

Flags: needinfo?(padenot)

I can reproduce this bug on both Windows and macOS.

OS: Unspecified → All
Hardware: Unspecified → All

By doing a quick check, from the point of the MDSM, I didn't see any problem yet. When the video reaches to the end, its current time and the media time in MDSM are both correct. That video would be seeked from zero as well, not from a negative timestamp. If you hover cursor over the video, Twitter would show another video control interface, which time is correct when looping back to the head.

Maybe we incorrectly dispatch some events or change media element's attribute causing Twitter think the video's duration in unknown?

Severity: -- → S4
Priority: -- → P3

I've observed that the currentTime can be greater than the duration on this page, by doing this in the console:

setInterval(function() { if ($$("video")[0].currentTime > $$("video")[0].duration) { console.log($$("video")[0].currentTime)}})

it has printed: 9.673986, the duration being 9.636281.

I'll get us a fix.

Assignee: nobody → padenot
Flags: needinfo?(padenot)

Set release status flags based on info from the regressing bug 1743834

Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9c2c6af6a7cf
Cap currentTime to the end time of the last packet when a video with an audio track is muted. r=alwu
https://hg.mozilla.org/integration/autoland/rev/d060eced6ecf
Test that a muted media element with an audio track never has currentTime exceeding its duration. r=alwu

Backed out for causing build bustages on AudioSinkWrapper.h

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: /builds/worker/checkouts/gecko/dom/media/mediasink/AudioSinkWrapper.h:144:9: error: unknown type name 'TimeUnit'; did you mean 'media::TimeUnit'?
Flags: needinfo?(padenot)
Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d85601edc0c4
Cap currentTime to the end time of the last packet when a video with an audio track is muted. r=alwu
https://hg.mozilla.org/integration/autoland/rev/c09aaf7f5146
Test that a muted media element with an audio track never has currentTime exceeding its duration. r=alwu
Flags: needinfo?(padenot)
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch

Reproduced the issue in Nightly 105.0a1 (build id: 20220727214405)
Verified - Fixed in Beta 105.0b4 and the latest Nightly 106.0a1 (2022-08-30) using Windows 10 and macOS 12.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Regressions: 1789103

We're backing this out in bug 1789103, and we'll reland a different fix.

You need to log in before you can comment on or make changes to this bug.