Coder Social home page Coder Social logo

Comments (12)

avayvod avatar avayvod commented on June 12, 2024

@foolip @mounirlamouri do you think this is a good candidate for the F2F in May given Philip will be attending remotely in the best case and I doubt most group participants are closely familiar with Media Session API and user agent's default behaviors. Brainstorming use cases and requirements might still be useful though?

from remote-playback.

avayvod avatar avayvod commented on June 12, 2024

Let's discuss the behavior w/r/t other tabs making sound before and after remote playback of the current tab and also how multiple remotely played media elements interact. Also reuse of metadata.
We can define the behavior that makes sense and then express it via MediaSession API later.

from remote-playback.

tidoust avatar tidoust commented on June 12, 2024

Discussed at the F2F:
http://www.w3.org/2016/05/24-webscreens-minutes.html#item10

ACTION: Mounir to update issue with comments about remote and local don't fight over output, and suggestion that remote playback can access keys. No spec changes at this juncture.

from remote-playback.

mounirlamouri avatar mounirlamouri commented on June 12, 2024

François said it all, not much to add here. The conclusion from our discussion was that remote playback should not compete for audio focus with local playback. A remote playback should fight for audio focus on the device it is playing.

However, remote playback should compete for media keys on the local playback. That means that if there is a remote and local playback, one or the other might get media keys access. I don't think the Media Session spec is mature enough to allow us to hook into this so the conclusion was to do no mention of this in Remote Playback API at the moment. Later, we can either mention this in Media Session API or Remote Playback API.

from remote-playback.

foolip avatar foolip commented on June 12, 2024

This behavior makes sense, I agree. It will require changes to Media Session to decouple media key access from "active local session". If it's not a problem, I suggest leaving this and w3c/mediasession#123 until we figure that out, and implementation could inform the design.

from remote-playback.

tidoust avatar tidoust commented on June 12, 2024

See related discussion at TPAC

The group will wait until the Media Session spec matures before it revisits this issue.

from remote-playback.

avayvod avatar avayvod commented on June 12, 2024

Ok, revisiting the issue as both APIs are now shipping in Chrome.

I'd like the metadata at least to be applied to the remote playback if set on navigator.

The actions and event handlers are harder to define though - it doesn't seem like a good experience to pause both local and remote playback, for instance. It would be okay if only remote playback is happening (e.g. on iOS as I remember, remote and local playback are mutually exclusive).

Otherwise we could add a separate, per-element MediaSession object under remote that would override the one set on navigator.mediaSession if not null.

The corresponding issue on the MediaSession spec (closed as it was mostly about audio focus) is here.

from remote-playback.

mounirlamouri avatar mounirlamouri commented on June 12, 2024

One principle of the Media Session specification is that the instance on navigator.mediaSession will hook itself to the default audio focus used by the user agent. With remote playback, the user agent uses a different audio focus than the one on the device which means that handling remote playback in the default media session would break this principle.

Adding a MediaSession instance on the media.remote instance can help but it sounds slightly limited as other things could benefit from a "remote" media session. I don't have any good idea though. The only thing I can think of is to allow a remote audio focus (when the Audio Focus API happens) that could receive a media session. Though, I am not sure how useful the remote audio focus would be apart from linking to the media session.

from remote-playback.

mfoltzgoogle avatar mfoltzgoogle commented on June 12, 2024

I agree with keeping the global, user-agent media session distinct from a media session used to control remote playback.

One question is, do we expect at most one remote media session per user agent, or could there be multiple active sessions (one per remote device)?

from remote-playback.

avayvod avatar avayvod commented on June 12, 2024

@mounirlamouri Do you agree we can say that if the only media playing is playing remotely, the UA is only involved in one audio focus - the remote one? Using navigator.mediaSession.metadata alone for remote playback sounds useful on its own to me agnostic to audio focus and controls.

it sounds slightly limited as other things could benefit from a "remote" media session.

What other things did you have in mind? Some things not attached to the specific media element?

from remote-playback.

chrisn avatar chrisn commented on June 12, 2024

One question is, do we expect at most one remote media session per user agent, or could there be multiple active sessions (one per remote device)?

I'd prefer a design that allows multiple active sessions.

from remote-playback.

avayvod avatar avayvod commented on June 12, 2024

@mfoltzgoogle In Chrome we only support one remote media session per system (limitation of the Cast SDK). However the Remote Playback API specification doesn't prevent remote playback of multiple elements on multiple remote playback devices in the same spirit as the Presentation API that IIRC allows multiple PresentationConnections to be established with different presentation screens.

from remote-playback.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.