Last Comment Bug 758481 - When seeking in an unbuffered range after having ended a media, networkState is NETWORK_IDLE
: When seeking in an unbuffered range after having ended a media, networkState ...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla15
Assigned To: Paul Adenot (:padenot)
:
Mentors:
Depends on: 759659
Blocks: 559468
  Show dependency treegraph
 
Reported: 2012-05-24 18:52 PDT by Paul Adenot (:padenot)
Modified: 2012-05-31 05:53 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v0 : When opening a channel, set the networkState to NETWORK_LOADING. (2.93 KB, patch)
2012-05-29 22:39 PDT, Paul Adenot (:padenot)
cajbir.bugzilla: review+
Details | Diff | Review
Addressed Chris' comments. (3.14 KB, patch)
2012-05-30 18:54 PDT, Paul Adenot (:padenot)
no flags Details | Diff | Review

Description Paul Adenot (:padenot) 2012-05-24 18:52:39 PDT
STR :
1. Load a page containing a video ;
2. Start playing the video, the networkState is NETWORK_LOADING ;
3. Seek near the end of the video, the video will buffer from that point, and then the download finishes. The networkState is now NETWORK_IDLE ;
4. Seek in an unbuffered range, in the middle of the video.

Expected result :

Per spec [1], the networkState should be NETWORK_LOADING :

> NETWORK_LOADING (numeric value 2)
>     The user agent is actively trying to download data.

Actual result :

networkState is NETWORK_IDLE.

I could reproduce this on current release, today's nightly. Not sure if it is a regression or it has always been like that.
Comment 1 Paul Adenot (:padenot) 2012-05-29 22:39:24 PDT
Created attachment 628233 [details] [diff] [review]
Patch v0 : When opening a channel, set the networkState to NETWORK_LOADING.

I'm currently also (re)writing test_networkState.html to be sure not to regress here (considering the incoming stop download / resume download feature), but I need other change to land before I can write a reliable test.
Comment 2 cajbir (:cajbir) 2012-05-30 18:15:27 PDT
Comment on attachment 628233 [details] [diff] [review]
Patch v0 : When opening a channel, set the networkState to NETWORK_LOADING.

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

::: content/html/content/public/nsHTMLMediaElement.h
@@ +155,5 @@
>    // asked the decoder to resumed the download.
> +  // If aForce is True, ignore the fact that the download has previously
> +  // finished. We are downloading the middle of the media after having
> +  // downloaded the end, we need to notify the element a download in ongoing.
> +  void DownloadResumed(bool aForce = false);

Can we call this 'aForceNetworkLoading' or something like that? 'aForce' doesn't really explain what it does.
Comment 3 Paul Adenot (:padenot) 2012-05-30 18:54:28 PDT
Created attachment 628560 [details] [diff] [review]
Addressed Chris' comments.
Comment 5 cajbir (:cajbir) 2012-05-30 20:27:13 PDT
My apologies Paul, I had to fix a merge conflict and when committing and I forgot to set the author information for the patch to refer to you.
Comment 6 Ed Morley [:emorley] 2012-05-31 05:53:46 PDT
https://hg.mozilla.org/mozilla-central/rev/28fe5eec1ca3

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