UI Updated to reflect active livestreams, queue locks while streaming.
This commit is contained in:
parent
afa57e8080
commit
b0cca2c6fc
2 changed files with 63 additions and 4 deletions
|
|
@ -599,7 +599,7 @@ class queuePanel extends panelObj{
|
|||
//Otherwise, if the item is currently playing
|
||||
}else if(this.getMediaEnd(entry[1]) > now.getTime()){
|
||||
//Add 'Stop' option to context menu
|
||||
menuMap.set("Stop", ()=>{this.client.socket.emit('stop', {uuid: entry[1].uuid})});
|
||||
menuMap.set("Stop", ()=>{this.client.socket.emit('stop')});
|
||||
//Add the Now Playing glow, not the prettiest place to add this, but why let a good conditional go to waste?
|
||||
entryDiv.classList.add('now-playing');
|
||||
//Otherwise, if the item has been archived
|
||||
|
|
@ -636,10 +636,11 @@ class queuePanel extends panelObj{
|
|||
this.queueContainer.append(entryDiv);
|
||||
}
|
||||
|
||||
//Render out any playing livestreams
|
||||
this.renderLiveStream(date);
|
||||
}
|
||||
|
||||
//Render out any playing livestreams
|
||||
this.renderLiveStream(date);
|
||||
|
||||
function clickEntry(event){
|
||||
//If it's not a left click
|
||||
if(event.buttons != 1){
|
||||
|
|
@ -1040,6 +1041,20 @@ class queuePanel extends panelObj{
|
|||
utils.ux.displayTooltip(event, tooltipDiv, false, null, true, this.ownerDoc);
|
||||
});
|
||||
|
||||
const menuMap = new Map([
|
||||
["Stop", ()=>{this.client.socket.emit('stop');}],
|
||||
["Delete", ()=>{this.client.socket.emit('delete', {uuid: nowPlaying.uuid});}],
|
||||
["Open in New Tab", ()=>{window.open(nowPlaying.url, '_blank').focus();}],
|
||||
["Copy URL", ()=>{navigator.clipboard.writeText(nowPlaying.url);}],
|
||||
|
||||
]);
|
||||
|
||||
//Setup context menu
|
||||
entryDiv.addEventListener('contextmenu', (event)=>{
|
||||
//Display context menu
|
||||
utils.ux.displayContextMenu(event, '', menuMap, this.ownerDoc);
|
||||
});
|
||||
|
||||
//Append entry div to queue container
|
||||
this.queueContainer.appendChild(entryDiv);
|
||||
}else{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue