w3c / media-source

Media Source Extensions
https://w3c.github.io/media-source/
Other
267 stars 59 forks source link

Simplify text for many conditional cross-context operations #304

Closed wolenetz closed 2 years ago

wolenetz commented 2 years ago

Following one of the suggested alternatives by @mwatson2 on previous pull request review [1], this change introduces a "mirror if necessary" algorithm and uses it to simplfiy multiple places in the spec text where the attached MediaSource needs to update the state of the attached HTMLMediaElement. Note, there are several other cross-context pieces of text left unchanged, since they are specific to either setting up the conditionally cross-context communication ports, conditionally tearing them down, or describe how the extended media element buffering or seekable attributes behave relative to the potentially cross-context and asynchronous communication of the state used in those extensions.

Note, upcoming PR for privacy and security section addition will also update (restrict) the flexibility for optimizing cross-context communication to help mitigate related timing attacks in implementations.

[1] https://github.com/w3c/media-source/pull/282#pullrequestreview-729154906


Preview | Diff

wolenetz commented 2 years ago

@mwatson2 - please take a look. Thanks!

wolenetz commented 2 years ago

@mwatson2 please review. Thank you!