Closed Bug 712836 Opened 8 years ago Closed 8 years ago

Reloading live stream causes HTMLMediaElement.error.code to be copied to new clone of resource

Categories

(Core :: Audio/Video, defect)

11 Branch
x86_64
Windows 7
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla14
Tracking Status
firefox11 --- affected
firefox12 --- fixed
firefox13 --- verified

People

(Reporter: cpearce, Assigned: roc)

References

Details

(Whiteboard: [qa+])

Attachments

(1 file)

If you reload the page while watching a <video> with a live stream, the <video> in the reloaded page will have its error.code set to 1 (MEDIA_ERR_ABORTED). This causes the controls to display a message "Video stopped loading", and show the controls overlay (i.e. partially obscure the video).

This regressed in nightlies between 2011-11-20-03 and 2011-11-26, which is the period that bug 703379 was landing and stabilizing, so I'm assuming this is a regression from bug 703379.

I don't know the URL of a HTML5 live video stream, so I'm reproducing this problem locally with the following STR:

1. Download HttpMediaServer from:
https://github.com/cpearce/HttpMediaServer
2. Start HttpMediaServer.exe in some folder containing videos (like ~/Videos/).
2. Load the following data URI in Firefox:
data:text/html,<video src="http://localhost/video.webm?live" controls id="v" autoplay></video>
(Substitute video.webm with the name of some video in the same directory in which HttpMediaServer is running).
3. Reload page.
4. Observe "Video stopped loading" warning showing.
I guess we need to disconnect thing when we shutdown the decoder for the original page so that the load-aborted error code doesn't reach the media cache.
Alternatively, we could hide the error when we get a "timeupdate" event.
Here is a simple example to test this with:

http://var.mpopp.net/video/

I found the problem beginning in Firefox Beta 11 (in Firefox 10 it seems to work). As Firefox 11 is to be released soon, and this bug appears to be quite significant, a soon fix would be much appreciated.
Attachment #607106 - Flags: review?(cpearce) → review+
https://hg.mozilla.org/mozilla-central/rev/b0e3b2c66abe
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
Comment on attachment 607106 [details] [diff] [review]
Make MediaResources which have ended abnormally ineligible for cloning

Review of attachment 607106 [details] [diff] [review]:
-----------------------------------------------------------------

Fixes video regression.

Risk analysis: Simply makes us use the clone optimization in fewer cases, so shouldn't trigger any risky new behaviors.
Attachment #607106 - Flags: approval-mozilla-beta?
Attachment #607106 - Flags: approval-mozilla-aurora?
JP is helping to find out if this affects any of our other initiatives (games, etc.), which we'd take into consideration for Beta approval.
Comment on attachment 607106 [details] [diff] [review]
Make MediaResources which have ended abnormally ineligible for cloning

Discussed with roc, not a big deal for beta, so approving for aurora and skipping beta.
Attachment #607106 - Flags: approval-mozilla-beta?
Attachment #607106 - Flags: approval-mozilla-beta-
Attachment #607106 - Flags: approval-mozilla-aurora?
Attachment #607106 - Flags: approval-mozilla-aurora+
Hey guys!

I think this is the main ticket for this issue. Is there a workaround for this? It is really hard html5 player when you need to restart firefox everytime you want to refresh the page.

Krystian Kichewko
(In reply to Krystian Kichewko from comment #13)
> I think this is the main ticket for this issue. Is there a workaround for
> this? It is really hard html5 player when you need to restart firefox
> everytime you want to refresh the page.

It is fixed in the Aurora & Nightly channels. I don't know why the bug fix doesn't go into Beta, as it is clearly a bug and not a new feature, or feature enhancement. IMHO it should go into Beta too (sounds bad to me to keep a bug alive although there is a fix), so the wide public (release channel users) get the fix on April 24th.

I hope the decision to not let this into Beta can be reconsidered.
Version: Trunk → 11 Branch
Hey Markus!

I agree, this is a major issue. I hope this gets moved into beta, and released to public asap. Maybe you know someone on Mozilla team who I can contact to ask them to reconsider moving this patch into Beta?

But I'm also searching for a workaround, youtube is doing it somehow because their videos are working on my firefox. Maybe you know how to prevent this error from happening? 

Krystian Kichewko
(In reply to Krystian Kichewko from comment #15)
> Maybe you know how to prevent this
> error from happening?

The only workaround that I know is to use Aurora builds for now.

http://www.mozilla.org/en-US/firefox/aurora/
Comment on attachment 607106 [details] [diff] [review]
Make MediaResources which have ended abnormally ineligible for cloning

Review of attachment 607106 [details] [diff] [review]:
-----------------------------------------------------------------

Renominating based on above comments. Also, this has baked for a while and has no known regressions.
Attachment #607106 - Flags: approval-mozilla-beta- → approval-mozilla-beta?
Comment on attachment 607106 [details] [diff] [review]
Make MediaResources which have ended abnormally ineligible for cloning

Approved for beta since it's had lots of bake time on central, fixes a regression, and is causing user pain.  If possible please land immediately on beta branch so it can get into beta4 which will be going to build in a couple of hours.
Attachment #607106 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Hey!

Thanks for the fast reaction! 

Krystian Kichewko
Whiteboard: [qa+]
Verified as fixed with the steps from comment 0 on:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0
BuildID: 20120425123149
No longer blocks: 703379
Blocks: 703379
You need to log in before you can comment on or make changes to this bug.