Several fixes
- User playlists should now list correctly (fixed a race condition) - Livestream types can autoplay (no longer stuck at currentTime = -3) - Playlist items with NaN duration do not break user playlist saving - ffmpeg support can handle live media (e.g. icecast) - Invalid volume is sanitized and an error message is added - JWPlayer displays correctly for both HTML5 and Flash - JWPlayer volume synchronization is fixed - <audio> and <video> tags are scaled correctly with .embed-responsive-item
This commit is contained in:
parent
b09346392e
commit
b587da6701
7 changed files with 33 additions and 14 deletions
|
|
@ -219,6 +219,9 @@ PlaylistModule.prototype.onUserPostJoin = function (user) {
|
|||
user.socket.on("shufflePlaylist", this.handleShuffle.bind(this, user));
|
||||
/* User playlists */
|
||||
user.socket.on("listPlaylists", this.handleListPlaylists.bind(this, user));
|
||||
if (user.is(Flags.U_REGISTERED)) {
|
||||
this.handleListPlaylists(user);
|
||||
}
|
||||
user.socket.typecheckedOn("clonePlaylist", TYPE_CLONE_PLAYLIST, this.handleClonePlaylist.bind(this, user));
|
||||
user.socket.typecheckedOn("deletePlaylist", TYPE_CLONE_PLAYLIST, this.handleDeletePlaylist.bind(this, user));
|
||||
user.socket.typecheckedOn("queuePlaylist", TYPE_QUEUE_PLAYLIST, this.handleQueuePlaylist.bind(this, user));
|
||||
|
|
@ -1018,7 +1021,7 @@ PlaylistModule.prototype.startPlayback = function (time) {
|
|||
}
|
||||
|
||||
/* Lead-in time of 3 seconds to allow clients to buffer */
|
||||
time = time || -3;
|
||||
time = time || (media.seconds > 0 ? -3 : 0);
|
||||
media.paused = time < 0;
|
||||
media.currentTime = time;
|
||||
|
||||
|
|
|
|||
|
|
@ -404,14 +404,14 @@ module.exports.saveUserPlaylist = function (pl, username, plname, callback) {
|
|||
var e = {
|
||||
id: pl[i].media.id,
|
||||
title: pl[i].media.title,
|
||||
seconds: pl[i].media.seconds,
|
||||
seconds: pl[i].media.seconds || 0,
|
||||
type: pl[i].media.type,
|
||||
meta: {
|
||||
codec: pl[i].media.meta.codec,
|
||||
bitrate: pl[i].media.meta.bitrate
|
||||
}
|
||||
};
|
||||
time += pl[i].media.seconds;
|
||||
time += pl[i].media.seconds || 0;
|
||||
tmp.push(e);
|
||||
}
|
||||
var count = tmp.length;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ exports.query = function (filename, cb) {
|
|||
|
||||
var data = {
|
||||
title: meta.title || "Raw Video",
|
||||
duration: Math.ceil(meta.seconds),
|
||||
duration: Math.ceil(meta.seconds) || "--:--",
|
||||
bitrate: meta.bitrate,
|
||||
codec: codec
|
||||
};
|
||||
|
|
@ -67,7 +67,7 @@ exports.query = function (filename, cb) {
|
|||
|
||||
var data = {
|
||||
title: meta.title || "Raw Audio",
|
||||
duration: Math.ceil(meta.seconds),
|
||||
duration: Math.ceil(meta.seconds) || "--:--",
|
||||
bitrate: meta.bitrate,
|
||||
codec: codec
|
||||
};
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ var urlRetrieve = function (transport, options, callback) {
|
|||
Logger.errlog.log(err.stack);
|
||||
Logger.errlog.log("urlRetrieve failed: " + err);
|
||||
Logger.errlog.log("Request was: " + options.host + options.path);
|
||||
callback(503, "");
|
||||
});
|
||||
d.run(function () {
|
||||
var req = transport.request(options, function (res) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue