mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Player not reloading on changing from channel to frontpage
This commit is contained in:
		@@ -80,15 +80,31 @@
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#closePlayer{
 | 
					#closePlayer{
 | 
				
			||||||
  position: absolute;
 | 
					  position: fixed;
 | 
				
			||||||
  top: 10px;
 | 
					  bottom: 175px;
 | 
				
			||||||
  right: 10px;
 | 
					  right: 20px;
 | 
				
			||||||
  z-index: 1;
 | 
					  z-index: 11;
 | 
				
			||||||
  font-size: 18px;
 | 
					  font-size: 18px;
 | 
				
			||||||
  color: white;
 | 
					  color: white;
 | 
				
			||||||
  text-shadow: 0px 0px 2px black;
 | 
					  text-shadow: 0px 0px 2px black;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.frontpage_modified_heights{
 | 
				
			||||||
 | 
					  height: 0px !important;
 | 
				
			||||||
 | 
					  margin-bottom:0px !important;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.player_bottom{
 | 
				
			||||||
 | 
					  position: fixed !important;
 | 
				
			||||||
 | 
					  left: auto !important;
 | 
				
			||||||
 | 
					  top: auto !important;
 | 
				
			||||||
 | 
					  bottom: 10px;
 | 
				
			||||||
 | 
					  width: 250px !important;
 | 
				
			||||||
 | 
					  height: 200px !important;
 | 
				
			||||||
 | 
					  right: 10px;
 | 
				
			||||||
 | 
					  z-index: 10;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#frontpage_player{
 | 
					#frontpage_player{
 | 
				
			||||||
  position: fixed;
 | 
					  position: fixed;
 | 
				
			||||||
  bottom: 10px;
 | 
					  bottom: 10px;
 | 
				
			||||||
@@ -135,7 +151,7 @@ body {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.main, #main-row, .video-container, #playlist{
 | 
					.main, #main-row, .video-container, #playlist{
 | 
				
			||||||
  height: calc(100vh - 64px) !important;
 | 
					  height: calc(100vh - 64px);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
footer{
 | 
					footer{
 | 
				
			||||||
@@ -944,6 +960,7 @@ ul #chat-log{
 | 
				
			|||||||
    /*padding:0px 15px;*/
 | 
					    /*padding:0px 15px;*/
 | 
				
			||||||
    flex:1;
 | 
					    flex:1;
 | 
				
			||||||
    position: relative;
 | 
					    position: relative;
 | 
				
			||||||
 | 
					    height: calc(100vh - 64px) !important;
 | 
				
			||||||
    /*background-color:rgba(0,0,0,0.2);*/
 | 
					    /*background-color:rgba(0,0,0,0.2);*/
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								static/dist/embed.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								static/dist/embed.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										4
									
								
								static/dist/main.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								static/dist/main.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -565,12 +565,19 @@ function onepage_load(){
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		    	$("meta[name=theme-color]").attr("content", "#2D2D2D"); 
 | 
							    	$("meta[name=theme-color]").attr("content", "#2D2D2D"); 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		    	if(!/iPad|iPhone|iPod/.test(navigator.userAgent)) Player.ytplayer.destroy();
 | 
					 | 
				
			||||||
		    	if(!window.mobilecheck()){
 | 
							    	if(!window.mobilecheck()){
 | 
				
			||||||
		    		$("<a id='closePlayer'>X</a>").appendTo("#frontpage_player");
 | 
							    		/*$("<a id='closePlayer'>X</a>").appendTo("#frontpage_player");
 | 
				
			||||||
		    		$("#player").appendTo("#frontpage_player");
 | 
							    		$("#player").appendTo("#frontpage_player");
 | 
				
			||||||
		    		Player.onYouTubeIframeAPIReady();
 | 
							    		Player.onYouTubeIframeAPIReady();*/
 | 
				
			||||||
 | 
							    		$("main").append("<a id='closePlayer'>X</a>");
 | 
				
			||||||
 | 
							    		$("#player_overlay").remove();
 | 
				
			||||||
 | 
							    		$("#controls").remove();
 | 
				
			||||||
 | 
							    		$("#playlist").remove();
 | 
				
			||||||
 | 
							    		$(".ui-resizable-handle").remove();
 | 
				
			||||||
 | 
							    		$("#player").addClass("player_bottom");
 | 
				
			||||||
 | 
							    		$("#main-row").addClass("frontpage_modified_heights");
 | 
				
			||||||
		    	} else {
 | 
							    	} else {
 | 
				
			||||||
 | 
							    		if(!/iPad|iPhone|iPod/.test(navigator.userAgent)) Player.ytplayer.destroy();
 | 
				
			||||||
		    		Player.ytplayer = "";
 | 
							    		Player.ytplayer = "";
 | 
				
			||||||
		    	}
 | 
							    	}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -582,7 +589,8 @@ function onepage_load(){
 | 
				
			|||||||
		      	$("header").html($($(e)[61]).html());
 | 
							      	$("header").html($($(e)[61]).html());
 | 
				
			||||||
		      	$($(e)[63]).insertAfter("header");
 | 
							      	$($(e)[63]).insertAfter("header");
 | 
				
			||||||
		      	$($(e)[65]).insertAfter(".mega");
 | 
							      	$($(e)[65]).insertAfter(".mega");
 | 
				
			||||||
		      	$("main").html($($(e)[69]).html());
 | 
							      	if(window.mobilecheck()) $("main").html($($(e)[69]).html());
 | 
				
			||||||
 | 
							      	else $("main").append($($($(e)[69]).html())[0]);
 | 
				
			||||||
		      	$(".page-footer").removeClass("padding-bottom-extra");
 | 
							      	$(".page-footer").removeClass("padding-bottom-extra");
 | 
				
			||||||
		      	$(".page-footer").removeClass("padding-bottom-novideo");
 | 
							      	$(".page-footer").removeClass("padding-bottom-novideo");
 | 
				
			||||||
		      	$("#favicon").attr("href", "static/images/favicon.png");
 | 
							      	$("#favicon").attr("href", "static/images/favicon.png");
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -394,7 +394,7 @@ $(document).on("click", "#closePlayer", function(e){
 | 
				
			|||||||
  Player.ytplayer.destroy();
 | 
					  Player.ytplayer.destroy();
 | 
				
			||||||
  Player.ytplayer = "";
 | 
					  Player.ytplayer = "";
 | 
				
			||||||
  document.title = "Zöff";
 | 
					  document.title = "Zöff";
 | 
				
			||||||
  $("#frontpage_player").empty();
 | 
					  $("#closePlayer").remove();
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(document).on('click', '#toast-container', function(){
 | 
					$(document).on('click', '#toast-container', function(){
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user