Closed Bug 1666117 Opened 4 years ago Closed 3 years ago

PiP Player window video will not show correctly when video has no loaded metadata and using the context menu or shortcut to start Picture-in-Picture

Categories

(Toolkit :: Video/Audio Controls, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: kernp25, Assigned: katkoor2)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Attached video 1BL7Y7Tvvd.mp4

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

  1. Open https://www.w3.org/2010/05/video/mediaevents.html
  2. Right-click on the video and choose Picture-in-Picture (PiP)

Actual results:

The player window is not in foreground (clicking on it will also not bring it to the foreground).

Flags: needinfo?(gijskruitbosch+bugs)

Note: Only when the video starts playing, it will work correctly.

Why did you needinfo me?

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(kernp25)

(In reply to :Gijs (he/him) from comment #2)

Why did you needinfo me?

Should i needinfo Alex Cornestean?

So he can confirm this bug?

Flags: needinfo?(kernp25)

(In reply to kernp25 from comment #3)

(In reply to :Gijs (he/him) from comment #2)

Why did you needinfo me?

Should i needinfo Alex Cornestean?

So he can confirm this bug?

Any defect/task (ie not enhancement) bug in this component is going to get triaged within a few days (we have triage meetings twice a week, the next one is today). In general, you do not need to needinfo anyone if all you're after is for someone to confirm the issue. Use the flag if you have concrete questions or if something is so urgent it can't wait a few days.

FWIW, I could reproduce but I don't have a clue off-hand what the root cause is, and having been away for a bit I'm too busy to do the digging myself right now - if this is a regression that information would help (but it can't be all that recent if it reproduces on release!).

Root cause here is that https://searchfox.org/mozilla-central/rev/b58ca45005fe02077c92779483d1b60e9a49687c/toolkit/actors/PictureInPictureChild.jsm#1153-1154 assumes that there's a video width / height. In this case, these are both 0, because the video has the preload=none attribute.

We don't show the toggle before the video loads, but both the shortcut and context menu can start PiP in this case.

We should fall back on using the lazy/non-flushing bounding rect of the video, but if that returns height/width of 0, I think we should probably no-op instead of attempting to enter PiP? I also wonder if we should not offer the context menu item for videos in that state (though that doesn't "fix" the shortcut case).

Dropping this in the MSU backlog; I don't think almost any commercial video sites would use preload=none (as it adds delays to playing the video once the user hits play!) so the practical ramifications of this bug are probably limited - but I could imagine that on slower connections and with fast use of the shortcut, you could potentially trip this on realistic websites. Mike, does all that seem right?

Blocks: videopip, 1651414
Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(mconley)
Priority: -- → P3
Summary: Player window video will not show correctly when video not started and using right-click -> Picture-in-Picture (PiP) → PiP Player window video will not show correctly when video has no loaded metadata and using the context menu or shortcut to start Picture-in-Picture
No longer blocks: 1651414
Flags: needinfo?(mconley)

Sorry for the delay. Yes, if the dimensions are 0x0, disabling the context menu (like we hide the toggle) makes sense to me.

Assignee: nobody → katkoor2
Status: NEW → ASSIGNED

This actually might be fixed by Bug 1626600. So once that resolved let's check on this bug again.

Depends on: 1626600

The issue looks like it's been fixed by Bug 1626600 in Nightly. Feel free to re-open if needed.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: