fix media streaming from dashboard
This commit is contained in:
parent
3d9e79c46f
commit
c4e505c062
|
@ -37,7 +37,7 @@
|
||||||
var item = items[0];
|
var item = items[0];
|
||||||
|
|
||||||
var mediaElement;
|
var mediaElement;
|
||||||
|
|
||||||
if (item.MediaType === "Video") {
|
if (item.MediaType === "Video") {
|
||||||
|
|
||||||
mediaElement = MediaPlayer.playVideo(items);
|
mediaElement = MediaPlayer.playVideo(items);
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
mediaElement = MediaPlayer.playAudio(items);
|
mediaElement = MediaPlayer.playAudio(items);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mediaElement) {
|
if (!mediaElement) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -69,24 +69,23 @@
|
||||||
var item = items[0];
|
var item = items[0];
|
||||||
|
|
||||||
var baseParams = {
|
var baseParams = {
|
||||||
id: item.Id,
|
|
||||||
audioChannels: 2,
|
audioChannels: 2,
|
||||||
audioBitrate: 128000
|
audioBitrate: 128000
|
||||||
};
|
};
|
||||||
|
|
||||||
var mp3Url = ApiClient.getUrl('audio.mp3', $.extend({}, baseParams, {
|
var mp3Url = ApiClient.getUrl('Audio/' + item.Id + '/stream.mp3', $.extend({}, baseParams, {
|
||||||
audioCodec: 'mp3'
|
audioCodec: 'mp3'
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var aacUrl = ApiClient.getUrl('audio.aac', $.extend({}, baseParams, {
|
var aacUrl = ApiClient.getUrl('Audio/' + item.Id + '/stream.aac', $.extend({}, baseParams, {
|
||||||
audioCodec: 'aac'
|
audioCodec: 'aac'
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var webmUrl = ApiClient.getUrl('audio.webma', $.extend({}, baseParams, {
|
var webmUrl = ApiClient.getUrl('Audio/' + item.Id + '/stream.webma', $.extend({}, baseParams, {
|
||||||
audioCodec: 'Vorbis'
|
audioCodec: 'Vorbis'
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var oggUrl = ApiClient.getUrl('audio.oga', $.extend({}, baseParams, {
|
var oggUrl = ApiClient.getUrl('Audio/' + item.Id + '/stream.oga', $.extend({}, baseParams, {
|
||||||
audioCodec: 'Vorbis'
|
audioCodec: 'Vorbis'
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -113,7 +112,6 @@
|
||||||
var screenHeight = Math.min(screen.height, screen.width);
|
var screenHeight = Math.min(screen.height, screen.width);
|
||||||
|
|
||||||
var baseParams = {
|
var baseParams = {
|
||||||
id: item.Id,
|
|
||||||
audioChannels: 2,
|
audioChannels: 2,
|
||||||
audioBitrate: 128000,
|
audioBitrate: 128000,
|
||||||
videoBitrate: 500000,
|
videoBitrate: 500000,
|
||||||
|
@ -121,17 +119,17 @@
|
||||||
maxHeight: screenHeight
|
maxHeight: screenHeight
|
||||||
};
|
};
|
||||||
|
|
||||||
var tsVideoUrl = ApiClient.getUrl('video.ts', $.extend({}, baseParams, {
|
var tsVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.ts', $.extend({}, baseParams, {
|
||||||
videoCodec: 'h264',
|
videoCodec: 'h264',
|
||||||
audioCodec: 'aac'
|
audioCodec: 'aac'
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var webmVideoUrl = ApiClient.getUrl('video.webm', $.extend({}, baseParams, {
|
var webmVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.webm', $.extend({}, baseParams, {
|
||||||
videoCodec: 'vpx',
|
videoCodec: 'vpx',
|
||||||
audioCodec: 'Vorbis'
|
audioCodec: 'Vorbis'
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var ogvVideoUrl = ApiClient.getUrl('video.ogv', $.extend({}, baseParams, {
|
var ogvVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.ogv', $.extend({}, baseParams, {
|
||||||
videoCodec: 'theora',
|
videoCodec: 'theora',
|
||||||
audioCodec: 'Vorbis'
|
audioCodec: 'Vorbis'
|
||||||
}));
|
}));
|
||||||
|
@ -163,8 +161,8 @@
|
||||||
|
|
||||||
MediaPlayer.mediaElement = null;
|
MediaPlayer.mediaElement = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
isPlaying: function() {
|
isPlaying: function () {
|
||||||
return MediaPlayer.mediaElement;
|
return MediaPlayer.mediaElement;
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.ApiClient</id>
|
<id>MediaBrowser.ApiClient</id>
|
||||||
<version>3.0.0.12-beta</version>
|
<version>3.0.0.13-beta</version>
|
||||||
<title>MediaBrowser.ApiClient</title>
|
<title>MediaBrowser.ApiClient</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>scottisafool,Luke</owners>
|
<owners>scottisafool,Luke</owners>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common.Internal</id>
|
<id>MediaBrowser.Common.Internal</id>
|
||||||
<version>3.0.12</version>
|
<version>3.0.13</version>
|
||||||
<title />
|
<title />
|
||||||
<authors>Luke</authors>
|
<authors>Luke</authors>
|
||||||
<owners>Media Browser Team</owners>
|
<owners>Media Browser Team</owners>
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<description>Contains common components shared by Media Browser Theatre and Media Browser Server. Not intended for plugin developer consumption.</description>
|
<description>Contains common components shared by Media Browser Theatre and Media Browser Server. Not intended for plugin developer consumption.</description>
|
||||||
<dependencies>
|
<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="NLog" version="2.0.0.2000" />
|
||||||
<dependency id="ServiceStack" version="3.9.37" />
|
<dependency id="ServiceStack" version="3.9.37" />
|
||||||
<dependency id="ServiceStack.Api.Swagger" version="3.9.35" />
|
<dependency id="ServiceStack.Api.Swagger" version="3.9.35" />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common</id>
|
<id>MediaBrowser.Common</id>
|
||||||
<version>3.0.12</version>
|
<version>3.0.13</version>
|
||||||
<title>MediaBrowser.Common</title>
|
<title>MediaBrowser.Common</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners />
|
<owners />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Server.Core</id>
|
<id>MediaBrowser.Server.Core</id>
|
||||||
<version>3.0.12</version>
|
<version>3.0.13</version>
|
||||||
<title>Media Browser.Server.Core</title>
|
<title>Media Browser.Server.Core</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners />
|
<owners />
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.12" />
|
<dependency id="MediaBrowser.Common" version="3.0.13" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user