Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce associated AudioSession #32

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ This default audio session is represented as an {{AudioSession}} object that is

# Extensions to the `Navigator` interface # {#extensions-to-navigator}

Each {{Window}} has an <dfn>associated AudioSession</dfn>, which is an {{AudioSession}} object.
It represents the default audio session that is used by the user agent to automatically set up the audio session parameters.
The user agent will request or abandon audio focus when audio session [=audio session/elements=] start or finish playing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to force the implementers to follow this guideline? If so, should we use MUST request or abandon audio focus?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a general description of the intent of the spec. The algorithms will precisely describe how UA is expected to implement this so that all UAs will behave the same.
I do not think that this sentence is precise enough to warrant a MUST.

Upon creation of the {{Window}} object, its [=associated AudioSession=] MUST be set to a newly created {{AudioSession}} object with the {{Window}} object's [=relevant realm=].

The [=associated AudioSession=] list of [=audio session/elements=] is updated dynamically as audio sources and sinks of the {{Window}} object are created or removed.
youennf marked this conversation as resolved.
Show resolved Hide resolved

<pre class="idl">
[Exposed=Window]
partial interface Navigator {
Expand Down
Loading