Comments (3)
Good to see this feature is planned as it is quite useful for large groups.
The way managed rooms were implemented in Syncplay is a bit quirky as we didn't want to store room passwords to a file so as to maintain anonymity. Fortunately, most of the quirkiness is server side and so all the client needs to do when creating a managed room is to basically tell the server "I want to make a managed room with this password" and the server will reply with the name of the managed room which corresponds to that password. After that, anyone with the control password can become a room operator for the room of the name that was created (and so there could theoretically be more than one).
You can see a room is a managed room because it follows the format +RoomName:Hash. On such rooms only those who have identified as an operator can control the room, and everyone else who tries to seek etc when they shouldn't will be ignored (and their client told what state they should actually be).
Importantly if you the room operator is disconnected their client will need to re-identify to become an operator again.
from syncplay-mobile.
In terms of the relevant Syncplay protocol, it should be something like this...
Hello feature for server/client:
{"Hello": {"features": {"managedRooms": true}}}
Creating a managed room:
client >> {"Set": {"controllerAuth": {"room": "foobar", "password": "JE-411-084"}}}
server << {"Set": {"newControlledRoom": {"password": "JE-411-084", "roomName": "+foobar:DF6E12D2FB8B"}}}
client >> {"Set": {"room": {"name": "+foobar:DF6E12D2FB8B"} } }
client >> {"Set": {"controllerAuth": {"room": "+foobar:DF6E12D2FB8B", "password": "JE-411-084"}}}
Identifying as a room operator when in an existing managed room:
client >> {"Set": {"controllerAuth": {"room": "+foobar:DF6E12D2FB8B", "password": "JE-411-084"}}}
server << {"Set": {"controllerAuth": {"user": "Etoh", "room": "+foobar:DF6E12D2FB8B", "success": true}}}
Someone in room identifies as room operator:
server << {"Set": {"controllerAuth": {"user": "Etoh", "room": "+foobar:DF6E12D2FB8B", "success": true}}}
Determine whether or not someone in room has already identifier as an operator:
client >> {"List": null}
server << {"List": {"+foobar:DF6E12D2FB8B": {"Etoh": {"controller": true}}}}
from syncplay-mobile.
@Et0h I still haven't checked the entire code yet but I kind of had a faint idea that the server takes care of it. All I have to do on client side is to set and handle controllerAuth sets I see. I kept the code empty for it for now, so I believe the missing features would cause the app to crash or probably drop connection at the very least. However, it doesn't seem so complicated. You have broken it down for me clearly and exquisitely I believe this can be implemented and ported in no time as the feature is hugely beneficial for large group of users. Thank you very much. I will make sure to put that to use.
from syncplay-mobile.
Related Issues (20)
- pause does not sync through iPadOS HOT 1
- Unable to connect to a private server HOT 4
- Current media timestamp will stop updating locally and remotely HOT 1
- mpv backend does not open files from SMB share (or other non-internal fs locations) HOT 5
- Can you add the Spanish language? HOT 3
- About iOS support... HOT 21
- File is still playing when leaving room HOT 1
- Videos showing only black screen unless I enable gpu-next option in 0.13.0 version HOT 1
- Move "skip 1 minute 30 seconds" button to main screen
- "Add folder" button in shared playlist settings is not working in 0.13.0 HOT 2
- Shared Playlists temporarily disabled in v0.13.0
- versionCode decreased? HOT 11
- Password preventing connection HOT 5
- Preferences do not persist HOT 1
- No Portrait Mode in Android HOT 2
- Can't switch audio and subtitles HOT 4
- Audio and subtitle track doesn't change HOT 7
- Current engine shows `Undefined` and crashes when clicked HOT 1
- Preference `Subtitle size` isn't persistent
- Volume level cannot be set more than 15/30
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 syncplay-mobile.