mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Fixed listeners-issue on embedded player
This commit is contained in:
		| @@ -180,7 +180,7 @@ | ||||
| } | ||||
|  | ||||
| #playlist{ | ||||
| 	background-color:grey; | ||||
| 	/*background-color:grey;*/ | ||||
| 	height:100vh; | ||||
|   width:50vw; | ||||
|   overflow:hidden; | ||||
| @@ -207,10 +207,11 @@ | ||||
|  | ||||
| #controls | ||||
| { | ||||
|   background: inherit; | ||||
|  | ||||
|   position: relative; | ||||
|     opacity:0; | ||||
|     height:32px; | ||||
|     background-color:grey; | ||||
|     width:50vw; | ||||
|     color:white; | ||||
|     margin-top:-5px; | ||||
| @@ -429,6 +430,10 @@ html { | ||||
|   overflow: hidden; | ||||
| } | ||||
|  | ||||
| #pageButtons { | ||||
|   background: inherit; | ||||
| } | ||||
|  | ||||
| #pageButtons, #pageButtons a{ | ||||
|   color:white !important; | ||||
| } | ||||
| @@ -496,6 +501,7 @@ padding: 0 5px; | ||||
| } | ||||
| */ | ||||
| #wrapper{ | ||||
|   background: inherit; | ||||
|   /*height: 94%;*/ | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -118,9 +118,11 @@ window.addEventListener("DOMContentLoaded", function() { | ||||
|     Player.loadPlayer(); | ||||
|  | ||||
|     Playercontrols.initSlider(); | ||||
|     document.getElementById("playpause").addEventListener("click", Playercontrols.play_pause); | ||||
|     window.setVolume = setVolume; | ||||
|     Helper.css("#controls", "background-color", color); | ||||
|     Helper.css("#wrapper", "background-color", color); | ||||
|     //Helper.css("#controls", "background-color", color); | ||||
|  | ||||
|     document.querySelector("body").style.backgroundColor = color; | ||||
|     if(hash.indexOf("controll") > -1) { | ||||
|         Hostcontroller.change_enabled(true); | ||||
|     } else { | ||||
| @@ -325,11 +327,15 @@ function emit() { | ||||
|     } | ||||
| } | ||||
|  | ||||
|  | ||||
| function handleEvent(e, target, tried, type) { | ||||
|     for(var y = 0; y < e.path.length; y++) { | ||||
|         var target = e.path[y]; | ||||
|         if(dynamicListeners[type] && dynamicListeners[type]["#" + target.id]) { | ||||
|             dynamicListeners[type]["#" + target.id].call(target); | ||||
|             return; | ||||
|         } else { | ||||
|             if(target.classList == undefined) return; | ||||
|             for(var i = 0; i < target.classList.length; i++) { | ||||
|                 if(dynamicListeners[type] && dynamicListeners[type]["." + target.classList[i]]) { | ||||
|                     dynamicListeners[type]["." + target.classList[i]].call(target); | ||||
| @@ -337,8 +343,6 @@ function handleEvent(e, target, tried, type) { | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     if(!tried) { | ||||
|         handleEvent(e, e.target.parentElement, true, type); | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -667,7 +667,6 @@ function handleEvent(e, target, tried, type) { | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
| } | ||||
|  | ||||
| function addListener(type, element, callback) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user