mirror of https://github.com/synctv-org/synctv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
914 B
Protocol Buffer
56 lines
914 B
Protocol Buffer
syntax = "proto3";
|
|
option go_package = ".;pb";
|
|
|
|
package proto;
|
|
|
|
enum MessageType {
|
|
UNKNOWN = 0;
|
|
ERROR = 1;
|
|
CHAT = 2;
|
|
STATUS = 3;
|
|
CHECK_STATUS = 4;
|
|
EXPIRED = 5;
|
|
CURRENT = 6;
|
|
MOVIES = 7;
|
|
VIEWER_COUNT = 8;
|
|
SYNC = 9;
|
|
MY_STATUS = 10;
|
|
WEBRTC_OFFER = 11;
|
|
WEBRTC_ANSWER = 12;
|
|
WEBRTC_ICE_CANDIDATE = 13;
|
|
WEBRTC_JOIN = 14;
|
|
WEBRTC_LEAVE = 15;
|
|
}
|
|
|
|
message Sender {
|
|
string user_id = 1;
|
|
string username = 2;
|
|
}
|
|
|
|
message Status {
|
|
bool is_playing = 1;
|
|
double current_time = 2;
|
|
double playback_rate = 3;
|
|
}
|
|
|
|
message WebRTCData {
|
|
string data = 1;
|
|
string to = 2;
|
|
string from = 3;
|
|
}
|
|
|
|
message Message {
|
|
MessageType type = 1;
|
|
sfixed64 timestamp = 2;
|
|
optional Sender sender = 3;
|
|
|
|
oneof payload {
|
|
string error_message = 4;
|
|
string chat_content = 5;
|
|
Status playback_status = 6;
|
|
fixed64 expiration_id = 7;
|
|
int64 viewer_count = 8;
|
|
WebRTCData webrtc_data = 9;
|
|
}
|
|
}
|