Comments (10)
Perhaps I'm misunderstanding, but ideally wouldn't the local- and remote-player states always be synchronized? Wouldn't then the last rule be unnecessary?
from remote-playback.
Yes, as long as we're talking about the media element and its state exposed to the webpage. I believe I meant the backend for the local playback under "local player" which could just be suspended until the remote playback is stopped and then synchronized with the remote playback state to continue from there.
from remote-playback.
It would be nice if calls to play()
or pause()
while connecting still take effect remotely after connecting, or locally if the setup fails. Otherwise you'll likely have in-page UI with play/pause buttons that don't know about this odd in-between state and it just seems flaky to the user.
A tricky one is seeking, since that's defined in terms of a bunch of state that might be different on the remote side. I suppose seeking would have to just remember the requested time and base nothing on the local state until the connection is complete.
from remote-playback.
@foolip, I think that the idea here is that while connecting, all commands go to the local playback. That way, the developer can keep the playback running or can stop it while the connection is being made.
from remote-playback.
Hmm, so what seeking, which it can begin before the connection is complete, but doesn't finish locally until after?
from remote-playback.
I guess the local player state would change. Whether the network request related to the seek should be cancelled should probably be an implementation detail. When switching to connected
, the remote playback should be in the same state as the local playback. In this case, it will also use the new seek position. Does that make sense?
from remote-playback.
It would be hard to get it into the same state, because it's locally showing a frame for time x
but trying to seek to time y
. While looking into seeking I filed whatwg/html#1362 but if that were fixed, I think that one could simply try to seek the remote to the official playback position after connection.
This is a basic question, but what happens to the local side when the connection is complete? If its internal media player is destroyed (perhaps to be recreated later) then all is well, but if it lives on then it might end up somewhere other than at the official playback position, but I guess restoring the remote state to local when disconnecting should take care of that?
from remote-playback.
I guess in practice we'll bind the local state and remote states in this case to the external APIs/controls/UI, not the internal/remote media player - when one seeks, the UI/controls usually move to the target position so when the local state will be transferred to the remote playback device once the UA is connected to it, the seek for the target position will be sent to the remote playback device and the controls will reflect the remote player state immediately afterwards. Not sure if seek/fastSeek changes the page visible attributes of the media element to the desired position immediately or if there're some events that need to happen before that. In the latter case, the UA will have to remember to send these events and update the position once the remote player updates it.
from remote-playback.
Not sure if seek/fastSeek changes the page visible attributes of the media element to the desired position immediately or if there're some events that need to happen before that.
Setting currentTime
also sets the "official playback position" which will cause currentTime
to immediately return that same value. There's also the seeking
attribute that becomes true immediately.
I don't thing any of this will be very hard to sort out, but it does mean that one may have to decide whether to seek the remote to the requested position or the actual position in case a seek finishes during the connecting phase.
from remote-playback.
I think this is fixed by #49 although we could be more explicit about what's included in the state, perhaps. Let's file a new issue if we feel so.
from remote-playback.
Related Issues (20)
- Use [Exposed=Window]
- Add explicit text to define the disableRemotePlayback content attribute
- Restrict the API to Secure Contexts or discuss the decision in Security Considerations HOT 1
- Rephrase normative statement in security and privacy consideration section HOT 1
- Compatibility of Remote Playback API with AirPlay mirroring HOT 2
- [Chrome 64] The RemotePlayback API is disabled on this platform HOT 4
- Chromecast TV not detected HOT 5
- Define remote playback interaction with background playback policies HOT 3
- Explore polyfilling Remote Playback API on top of Presentation API HOT 1
- Support for TTML and IMSC captions HOT 1
- How does remote playback interact with EME? HOT 4
- RemotePlaybackState enum can become misleading when changing media.src HOT 17
- Specify the task source for each task to be enqueued HOT 1
- [meta] Publish Proposed Recommendation HOT 2
- Allow adapting the bitrate to network/receiver constraints when using MSE
- Export terms HOT 2
- A
- render a dummy video/progress bar HOT 1
- example HOT 2
- check on the flag to activate the Remote Playback API on desktop HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remote-playback.