diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Roku/RokuSessionController.cs | 11 | ||||
| -rw-r--r-- | MediaBrowser.Server.Implementations/Session/WebSocketController.cs | 12 |
2 files changed, 23 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Roku/RokuSessionController.cs b/MediaBrowser.Server.Implementations/Roku/RokuSessionController.cs index 0e2f9e1b5..d806db1e0 100644 --- a/MediaBrowser.Server.Implementations/Roku/RokuSessionController.cs +++ b/MediaBrowser.Server.Implementations/Roku/RokuSessionController.cs @@ -146,5 +146,16 @@ namespace MediaBrowser.Server.Implementations.Roku RequestContentType = "application/json" }); } + + + public Task SendGenericCommand(GenericCommand command, CancellationToken cancellationToken) + { + return SendCommand(new WebSocketMessage<GenericCommand> + { + MessageType = "Command", + Data = command + + }, cancellationToken); + } } } diff --git a/MediaBrowser.Server.Implementations/Session/WebSocketController.cs b/MediaBrowser.Server.Implementations/Session/WebSocketController.cs index 70d7ac071..ddf4ec2ca 100644 --- a/MediaBrowser.Server.Implementations/Session/WebSocketController.cs +++ b/MediaBrowser.Server.Implementations/Session/WebSocketController.cs @@ -198,5 +198,17 @@ namespace MediaBrowser.Server.Implementations.Session }, cancellationToken); } + + public Task SendGenericCommand(GenericCommand command, CancellationToken cancellationToken) + { + var socket = GetActiveSocket(); + + return socket.SendAsync(new WebSocketMessage<GenericCommand> + { + MessageType = "Command", + Data = command + + }, cancellationToken); + } } } |
