aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Session/WebSocketController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Session/WebSocketController.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Session/WebSocketController.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Session/WebSocketController.cs b/MediaBrowser.Server.Implementations/Session/WebSocketController.cs
index 17a3594d8..2f547340e 100644
--- a/MediaBrowser.Server.Implementations/Session/WebSocketController.cs
+++ b/MediaBrowser.Server.Implementations/Session/WebSocketController.cs
@@ -210,5 +210,29 @@ namespace MediaBrowser.Server.Implementations.Session
}, cancellationToken);
}
+
+ public Task SendPlaybackStartNotification(SessionInfoDto sessionInfo, CancellationToken cancellationToken)
+ {
+ var socket = GetActiveSocket();
+
+ return socket.SendAsync(new WebSocketMessage<SessionInfoDto>
+ {
+ MessageType = "PlaybackStart",
+ Data = sessionInfo
+
+ }, cancellationToken);
+ }
+
+ public Task SendPlaybackStoppedNotification(SessionInfoDto sessionInfo, CancellationToken cancellationToken)
+ {
+ var socket = GetActiveSocket();
+
+ return socket.SendAsync(new WebSocketMessage<SessionInfoDto>
+ {
+ MessageType = "PlaybackStopped",
+ Data = sessionInfo
+
+ }, cancellationToken);
+ }
}
}