diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 36bf0595eb..b68e5b2c6a 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -1048,6 +1048,10 @@ currentMediaElement.play(); }; + self.seek = function (position) { + currentMediaElement.currentTime = position / (1000 * 10000); + }; + self.mute = function () { currentMediaElement.volume = 0; }; diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 846209366d..8043391597 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -791,7 +791,23 @@ var Dashboard = { } else if (msg.MessageType === "Playstate") { - + if (msg.Data.Command === 'Stop') { + MediaPlayer.stop(); + } + else if (msg.Data.Command === 'Pause') { + MediaPlayer.pause(); + } + else if (msg.Data.Command === 'Unpause') { + MediaPlayer.unpause(); + } + else if (msg.Data.Command === 'Seek') { + MediaPlayer.seek(msg.Data.SeekPosition); + } + else if (msg.Data.Command === 'NextTrack') { + MediaPlayer.queuePlayNext(); + } + else if (msg.Data.Command === 'PreviousTrack') { + } } },