From c4e505c062b3de60b8e8763b4767a7324e063898 Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Wed, 27 Feb 2013 12:53:42 -0500 Subject: [PATCH] fix media streaming from dashboard --- .../Html/scripts/MediaPlayer.js | 24 +++++++++---------- Nuget/MediaBrowser.ApiClient.nuspec | 2 +- Nuget/MediaBrowser.Common.Internal.nuspec | 4 ++-- Nuget/MediaBrowser.Common.nuspec | 2 +- Nuget/MediaBrowser.Server.Core.nuspec | 4 ++-- 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/MediaBrowser.WebDashboard/Html/scripts/MediaPlayer.js b/MediaBrowser.WebDashboard/Html/scripts/MediaPlayer.js index bf3733ffdc..ae120ce3ee 100644 --- a/MediaBrowser.WebDashboard/Html/scripts/MediaPlayer.js +++ b/MediaBrowser.WebDashboard/Html/scripts/MediaPlayer.js @@ -37,7 +37,7 @@ var item = items[0]; var mediaElement; - + if (item.MediaType === "Video") { mediaElement = MediaPlayer.playVideo(items); @@ -47,7 +47,7 @@ mediaElement = MediaPlayer.playAudio(items); } - + if (!mediaElement) { return; } @@ -69,24 +69,23 @@ var item = items[0]; var baseParams = { - id: item.Id, audioChannels: 2, audioBitrate: 128000 }; - var mp3Url = ApiClient.getUrl('audio.mp3', $.extend({}, baseParams, { + var mp3Url = ApiClient.getUrl('Audio/' + item.Id + '/stream.mp3', $.extend({}, baseParams, { audioCodec: 'mp3' })); - var aacUrl = ApiClient.getUrl('audio.aac', $.extend({}, baseParams, { + var aacUrl = ApiClient.getUrl('Audio/' + item.Id + '/stream.aac', $.extend({}, baseParams, { audioCodec: 'aac' })); - var webmUrl = ApiClient.getUrl('audio.webma', $.extend({}, baseParams, { + var webmUrl = ApiClient.getUrl('Audio/' + item.Id + '/stream.webma', $.extend({}, baseParams, { audioCodec: 'Vorbis' })); - var oggUrl = ApiClient.getUrl('audio.oga', $.extend({}, baseParams, { + var oggUrl = ApiClient.getUrl('Audio/' + item.Id + '/stream.oga', $.extend({}, baseParams, { audioCodec: 'Vorbis' })); @@ -113,7 +112,6 @@ var screenHeight = Math.min(screen.height, screen.width); var baseParams = { - id: item.Id, audioChannels: 2, audioBitrate: 128000, videoBitrate: 500000, @@ -121,17 +119,17 @@ maxHeight: screenHeight }; - var tsVideoUrl = ApiClient.getUrl('video.ts', $.extend({}, baseParams, { + var tsVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.ts', $.extend({}, baseParams, { videoCodec: 'h264', audioCodec: 'aac' })); - var webmVideoUrl = ApiClient.getUrl('video.webm', $.extend({}, baseParams, { + var webmVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.webm', $.extend({}, baseParams, { videoCodec: 'vpx', audioCodec: 'Vorbis' })); - var ogvVideoUrl = ApiClient.getUrl('video.ogv', $.extend({}, baseParams, { + var ogvVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.ogv', $.extend({}, baseParams, { videoCodec: 'theora', audioCodec: 'Vorbis' })); @@ -163,8 +161,8 @@ MediaPlayer.mediaElement = null; }, - - isPlaying: function() { + + isPlaying: function () { return MediaPlayer.mediaElement; } }; \ No newline at end of file diff --git a/Nuget/MediaBrowser.ApiClient.nuspec b/Nuget/MediaBrowser.ApiClient.nuspec index 1b1589e085..9796782801 100644 --- a/Nuget/MediaBrowser.ApiClient.nuspec +++ b/Nuget/MediaBrowser.ApiClient.nuspec @@ -2,7 +2,7 @@ MediaBrowser.ApiClient - 3.0.0.12-beta + 3.0.0.13-beta MediaBrowser.ApiClient Media Browser Team scottisafool,Luke diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec index 9995213f21..628c419686 100644 --- a/Nuget/MediaBrowser.Common.Internal.nuspec +++ b/Nuget/MediaBrowser.Common.Internal.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common.Internal - 3.0.12 + 3.0.13 <authors>Luke</authors> <owners>Media Browser Team</owners> @@ -10,7 +10,7 @@ <requireLicenseAcceptance>false</requireLicenseAcceptance> <description>Contains common components shared by Media Browser Theatre and Media Browser Server. Not intended for plugin developer consumption.</description> <dependencies> - <dependency id="MediaBrowser.Common" version="3.0.12" /> + <dependency id="MediaBrowser.Common" version="3.0.13" /> <dependency id="NLog" version="2.0.0.2000" /> <dependency id="ServiceStack" version="3.9.37" /> <dependency id="ServiceStack.Api.Swagger" version="3.9.35" /> diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index 058e53b6c1..49497cb0d0 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>MediaBrowser.Common</id> - <version>3.0.12</version> + <version>3.0.13</version> <title>MediaBrowser.Common Media Browser Team diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec index f8cd8f1e93..fae20958b8 100644 --- a/Nuget/MediaBrowser.Server.Core.nuspec +++ b/Nuget/MediaBrowser.Server.Core.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Server.Core - 3.0.12 + 3.0.13 Media Browser.Server.Core Media Browser Team @@ -10,7 +10,7 @@ false Contains core components required to build plugins for Media Browser Server. - +