fix media streaming from dashboard

This commit is contained in:
LukePulverenti 2013-02-27 12:53:42 -05:00
parent 3d9e79c46f
commit c4e505c062
5 changed files with 17 additions and 19 deletions

View File

@ -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;
}
};

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>MediaBrowser.ApiClient</id>
<version>3.0.0.12-beta</version>
<version>3.0.0.13-beta</version>
<title>MediaBrowser.ApiClient</title>
<authors>Media Browser Team</authors>
<owners>scottisafool,Luke</owners>

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MediaBrowser.Common.Internal</id>
<version>3.0.12</version>
<version>3.0.13</version>
<title />
<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" />

View File

@ -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</title>
<authors>Media Browser Team</authors>
<owners />

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MediaBrowser.Server.Core</id>
<version>3.0.12</version>
<version>3.0.13</version>
<title>Media Browser.Server.Core</title>
<authors>Media Browser Team</authors>
<owners />
@ -10,7 +10,7 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Contains core components required to build plugins for Media Browser Server.</description>
<dependencies>
<dependency id="MediaBrowser.Common" version="3.0.12" />
<dependency id="MediaBrowser.Common" version="3.0.13" />
</dependencies>
</metadata>
<files>