Closed Bug 1427699 Opened 6 years ago Closed 6 years ago

A cloned resource fails to notify the 'suspend' event

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

Details

Attachments

(3 files)

      No description provided.
Attached file test_suspend.html
Repro steps:
1. History -> Clear recent history -> Everything
   to clear all cache data.
2. open the link: https://bugzilla.mozilla.org/attachment.cgi?id=8939505

Expected result:
'suspend' should be fired for v2 since it is not fetching data.

Actual result:
'stalled' is fired which means the user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
Assignee: nobody → jwwang
Blocks: 1369263
Priority: -- → P3
Attachment #8940567 - Flags: review?(gsquelart)
Attachment #8940568 - Flags: review?(gsquelart)
Blocks: 1423386
Comment on attachment 8940567 [details]
Bug 1427699. P1 - allow element->DownloadSuspended() to be called when mChannel is null.

https://reviewboard.mozilla.org/r/210762/#review216518
Attachment #8940567 - Flags: review?(gsquelart) → review+
Comment on attachment 8940568 [details]
Bug 1427699. P2 - rewrite InitAsCloneInternal() to mimic the case where data is downloaded from a channel.

https://reviewboard.mozilla.org/r/210764/#review216522

::: dom/media/MediaCache.cpp:2893
(Diff revision 1)
>  {
>    MOZ_ASSERT(OwnerThread()->IsOnCurrentThread());
> -  AutoLock lock(aOriginal->mMediaCache->Monitor());
> +  AutoLock lock(mMediaCache->Monitor());
>  
> -  mResourceID = aOriginal->mResourceID;
> +  // Download data and notify events if necessary. Note the order is important
> +  // in order to mimic the behavior of data is downloaded from the channel.

'is' -> 'being'

::: dom/media/MediaCache.cpp:2940
(Diff revision 1)
> +  mClientSuspended = true;
> +  mCacheSuspended = true;
> +  mChannelEnded = true;
> +  mClient->CacheClientSuspend();
>  
> +  // Step 5: add the steam to be managed by the cache.

'steam' -> 'stream'
Attachment #8940568 - Flags: review?(gsquelart) → review+
Thanks for the review.
Pushed by jwwang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/15c31a08d6e3
P1 - allow element->DownloadSuspended() to be called when mChannel is null. r=gerald
https://hg.mozilla.org/integration/autoland/rev/8932f0853269
P2 - rewrite InitAsCloneInternal() to mimic the case where data is downloaded from a channel. r=gerald
https://hg.mozilla.org/mozilla-central/rev/15c31a08d6e3
https://hg.mozilla.org/mozilla-central/rev/8932f0853269
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: