Made major improvements to embedded player, added option for making server force clients to fully refresh, and added some more failsafes for the server

This commit is contained in:
Kasper Rynning-Tønnesen
2017-05-05 17:35:27 +02:00
parent b9aa04f360
commit f71dcb51e9
17 changed files with 444 additions and 248 deletions

View File

@@ -427,7 +427,12 @@ function initfp(){
if(window.location.hostname == "zoff.me") add = "https://zoff.me";
else add = window.location.hostname;
if(socket === undefined || Helper.mobilecheck() || user_auth_avoid) socket = io.connect(''+add+':8080', connection_options);
if(socket === undefined || Helper.mobilecheck() || user_auth_avoid) {
socket = io.connect(''+add+':8080', connection_options);
socket.on('update_required', function() {
window.location.reload(true);
});
}
if($("#alreadyfp").length === 0 || Helper.mobilecheck() || !socket._callbacks.$playlists || user_auth_avoid){
setup_playlist_listener();
}