queue-improvements #21
|
@ -491,6 +491,14 @@ var Playlist = /** @class */ (function () {
|
||||||
this.queueTab.classList.remove('expanded');
|
this.queueTab.classList.remove('expanded');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Playlist.prototype.reQueueNowPlaying = function () {
|
||||||
|
var currentEpisode = this.nowPlayingEpisodeHandler
|
||||||
|
? this.nowPlayingEpisodeHandler()
|
||||||
|
: null;
|
||||||
|
if (currentEpisode) {
|
||||||
|
this.unshiftEpisodes([currentEpisode]);
|
||||||
|
}
|
||||||
|
};
|
||||||
Playlist.prototype.createQueueListItem = function (episode, withControls) {
|
Playlist.prototype.createQueueListItem = function (episode, withControls) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
if (withControls === void 0) { withControls = true; }
|
if (withControls === void 0) { withControls = true; }
|
||||||
|
@ -512,6 +520,7 @@ var Playlist = /** @class */ (function () {
|
||||||
playBtn.href = '#';
|
playBtn.href = '#';
|
||||||
playBtn.innerHTML = 'Play Now';
|
playBtn.innerHTML = 'Play Now';
|
||||||
playBtn.addEventListener('click', function () {
|
playBtn.addEventListener('click', function () {
|
||||||
|
_this.reQueueNowPlaying();
|
||||||
if (_this.playEpisodeHandler)
|
if (_this.playEpisodeHandler)
|
||||||
_this.playEpisodeHandler(episode);
|
_this.playEpisodeHandler(episode);
|
||||||
});
|
});
|
||||||
|
@ -530,6 +539,7 @@ var Playlist = /** @class */ (function () {
|
||||||
text: message,
|
text: message,
|
||||||
gravity: 'bottom',
|
gravity: 'bottom',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
|
stopOnFocus: false,
|
||||||
style: {
|
style: {
|
||||||
marginBottom: '10ex',
|
marginBottom: '10ex',
|
||||||
background: '#090',
|
background: '#090',
|
||||||
|
|
|
@ -208,6 +208,15 @@ class Playlist {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private reQueueNowPlaying(): void {
|
||||||
|
const currentEpisode = this.nowPlayingEpisodeHandler
|
||||||
|
? this.nowPlayingEpisodeHandler()
|
||||||
|
: null;
|
||||||
|
if (currentEpisode) {
|
||||||
|
this.unshiftEpisodes([currentEpisode]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private createQueueListItem(
|
private createQueueListItem(
|
||||||
episode: Episode,
|
episode: Episode,
|
||||||
withControls = true
|
withControls = true
|
||||||
|
@ -230,6 +239,7 @@ class Playlist {
|
||||||
playBtn.href = '#';
|
playBtn.href = '#';
|
||||||
playBtn.innerHTML = 'Play Now';
|
playBtn.innerHTML = 'Play Now';
|
||||||
playBtn.addEventListener('click', () => {
|
playBtn.addEventListener('click', () => {
|
||||||
|
this.reQueueNowPlaying();
|
||||||
if (this.playEpisodeHandler) this.playEpisodeHandler(episode);
|
if (this.playEpisodeHandler) this.playEpisodeHandler(episode);
|
||||||
});
|
});
|
||||||
const remBtn = document.createElement('a');
|
const remBtn = document.createElement('a');
|
||||||
|
@ -248,6 +258,7 @@ class Playlist {
|
||||||
text: message,
|
text: message,
|
||||||
gravity: 'bottom',
|
gravity: 'bottom',
|
||||||
position: 'right',
|
position: 'right',
|
||||||
|
stopOnFocus: false,
|
||||||
style: {
|
style: {
|
||||||
marginBottom: '10ex',
|
marginBottom: '10ex',
|
||||||
background: '#090',
|
background: '#090',
|
||||||
|
|
Loading…
Reference in New Issue