This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27982 - Clarify asynchronicity in duration change algorithm when reducing duration
Summary: Clarify asynchronicity in duration change algorithm when reducing duration
Status: RESOLVED MOVED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: Media Source Extensions (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: CR
Assignee: Adrian Bateman [MSFT]
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 27980
  Show dependency treegraph
 
Reported: 2015-02-08 21:16 UTC by Karl Tomlinson
Modified: 2015-10-13 23:03 UTC (History)
6 users (show)

See Also:


Attachments

Description Karl Tomlinson 2015-02-08 21:16:04 UTC
The last steps of the duration change algorithm are as follows:

4. If the new duration is less than old duration, then run the range removal
   algorithm with new duration and old duration as the start and end of the
   removal range.

5. If a user agent is unable to partially render audio frames or text cues
   that start before and end after the duration, then run the following steps:

  1. Update new duration to the highest end time reported by the buffered
     attribute across all SourceBuffer objects in sourceBuffers.

  2. Update duration to new duration.

6. Update the media controller duration to new duration and run the
   HTMLMediaElement duration change algorithm.

How does this work with step 5 of the range removal algorithm?

5. Return control to the caller and run the rest of the steps asynchronously.

If "return control to the caller" means return to the duration change
algorithm, then the buffered attribute would not yet have been updated and so
step 5 of the duration change algorithm would reset duration to
/old duration/.

Is the intention that steps 5 and 6 of the duration change algorithm should
run asynchronously after the asynchronous steps of the range removal algorithm?

Prior to "Added remove() calls to duration change algorithm" in https://dvcs.w3.org/hg/html-media/rev/0c638da9a67a , the duration change algorithm was always synchronous.
Comment 1 Jerry Smith 2015-08-24 21:11:14 UTC
I believe this issue relates to one also raised in https://www.w3.org/Bugs/Public/show_bug.cgi?id=27980, where duration changes that remove buffered data cause issues with asynchronous processing.  That bug proposed disallowing duration changes that remove buffered data, and instead required that be done using remove() only.  If done, that solution should resolve this issue as well.
Comment 2 Matt Wolenetz 2015-10-13 23:03:27 UTC
This bug has been migrated to the GitHub issue tracker. Please follow/update progress using the GitHub issue:
https://github.com/w3c/media-source/issues/20