public static void OnAddLike(dynamic message, SyncService s, SyncRoom room) { var res = new { CommandType = CommandType.UPDATELIKES.Value, Likes = room.AddLike() }; room.Broadcast(JsonConvert.SerializeObject(res)); }
public static void OnSyncState(dynamic message, SyncService s, SyncRoom room) { if (s.Permissions == UserPermissionLevel.OWNER) { var res = new { CommandType = CommandType.SYNCSTATE.Value, State = new { Paused = message.Paused, Time = message.Time } }; room.Broadcast(JsonConvert.SerializeObject(res)); } }
public static void OnChat(dynamic message, SyncService s, SyncRoom room) { room.Broadcast(JsonConvert.SerializeObject(message)); }