Additional cast params

pull/702/head
Tim Hobbs 11 years ago
parent 631bba1d3c
commit 416a494b78

@ -3846,7 +3846,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
* @param {String} userId
* @param {String} itemId
*/
self.reportPlaybackProgress = function (userId, itemId, mediaSourceId, positionTicks, isPaused, isMuted) {
self.reportPlaybackProgress = function (userId, itemId, mediaSourceId, params) {
if (!userId) {
throw new Error("null userId");
@ -3862,25 +3862,29 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
var msgData = itemId;
msgData += "|" + (positionTicks == null ? "" : positionTicks);
msgData += "|" + (isPaused == null ? "" : isPaused);
msgData += "|" + (isMuted == null ? "" : isMuted);
msgData += "|" + (params.positionTicks == null ? "" : params.positionTicks);
msgData += "|" + (params.isPaused == null ? "" : params.isPaused);
msgData += "|" + (params.isMuted == null ? "" : params.isMuted);
msgData += "|" + (mediaSourceId == null ? "" : mediaSourceId);
msgData += "|" + (params.audioStreamIndex == null ? "" : params.audioStreamIndex);
msgData += "|" + (params.subtitleStreamIndex == null ? "" : params.subtitleStreamIndex);
msgData += "|" + (params.volumeLevel == null ? "" : params.volumeLevel);
self.sendWebSocketMessage("PlaybackProgress", msgData);
deferred.resolveWith(null, []);
return deferred.promise();
}
var params = {
isPaused: isPaused,
isMuted: isMuted
};
////var params = {
//// isPaused: isPaused,
//// isMuted: isMuted
////};
if (positionTicks) {
params.positionTicks = positionTicks;
}
////if (positionTicks) {
//// params.positionTicks = positionTicks;
////}
if (mediaSourceId) {
params.mediaSourceId = mediaSourceId;

Loading…
Cancel
Save