Start adding file playback queue support

This commit is contained in:
Calvin Montgomery 2014-06-01 11:43:18 -07:00
parent 30d4e65061
commit f2769e5062
6 changed files with 98 additions and 4 deletions

View file

@ -310,7 +310,7 @@ PlaylistModule.prototype.handleQueue = function (user, data) {
}
/* Specifying a custom title is currently only allowed for custom media */
if (typeof data.title !== "string" || data.type !== "cu") {
if (typeof data.title !== "string" || (data.type !== "cu" && data.type !== "fi")) {
data.title = false;
}
@ -860,6 +860,14 @@ PlaylistModule.prototype._addItem = function (media, data, user, cb) {
});
}
/* Warn about high bitrate for raw files */
if (media.type === "fi" && media.meta.bitrate > 1000) {
user.socket.emit("queueWarn", {
msg: "This video has a bitrate over 1000kbps. Clients with slow " +
"connections may experience lots of buffering."
});
}
var item = new PlaylistItem(media, {
uid: self._nextuid++,
temp: data.temp,