mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Closing player on frontpage now disconnects chromecast if chromecast is connected
This commit is contained in:
@@ -507,6 +507,10 @@ $(document).on("click", "#closePlayer", function(e){
|
||||
e.preventDefault();
|
||||
socket.emit("change_channel");
|
||||
try{
|
||||
if(chromecastAvailable){
|
||||
var castSession = cast.framework.CastContext.getInstance().getCurrentSession();
|
||||
castSession.endSession(true);
|
||||
}
|
||||
Player.player.destroy();
|
||||
} catch(error){}
|
||||
socket.removeEventListener("np");
|
||||
|
||||
Reference in New Issue
Block a user