added IsMuted to playback progress

This commit is contained in:
Luke Pulverenti 2013-08-29 17:00:27 -04:00
parent 8c16c2b417
commit 3d70e55368
3 changed files with 8 additions and 4 deletions

View File

@ -3354,7 +3354,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
* @param {String} userId
* @param {String} itemId
*/
self.reportPlaybackProgress = function (userId, itemId, positionTicks, isPaused) {
self.reportPlaybackProgress = function (userId, itemId, positionTicks, isPaused, isMuted) {
if (!userId) {
throw new Error("null userId");
@ -3368,13 +3368,17 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
var deferred = $.Deferred();
self.sendWebSocketMessage("PlaybackProgress", itemId + "|" + (positionTicks == null ? "" : positionTicks) + "|" + (isPaused == null ? "" : isPaused));
var msgData = itemId + "|" + (positionTicks == null ? "" : positionTicks) + "|" + (isPaused == null ? "" : isPaused) + "|" + (isMuted == null ? "" : isMuted);
self.sendWebSocketMessage("PlaybackProgress", msgData;);
deferred.resolveWith(null, []);
return deferred.promise();
}
var params = {
isPaused: isPaused,
isMuted: isMuted
};
if (positionTicks) {

View File

@ -134,7 +134,7 @@
function sendProgressUpdate(itemId) {
ApiClient.reportPlaybackProgress(Dashboard.getCurrentUserId(), itemId, getCurrentTicks(), currentMediaElement.paused);
ApiClient.reportPlaybackProgress(Dashboard.getCurrentUserId(), itemId, getCurrentTicks(), currentMediaElement.paused, currentMediaElement.volume == 0);
}
function clearProgressInterval() {

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.165" targetFramework="net45" />
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.166" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.58" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.58" targetFramework="net45" />
</packages>