mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Adding switch for chromecast info being hidden or not (#463)
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							b9b71ff7db
						
					
				
				
					commit
					6385971d3b
				
			| @@ -20,6 +20,7 @@ var sc_initialized = false; | ||||
| var intelligentQueue = []; | ||||
| var intelligentList = false; | ||||
| var deleted_elements = 0; | ||||
| var chromecastInfoShow = true; | ||||
| var soundcloud_enabled = true; | ||||
| var local_new_channel = false; | ||||
| var sc_need_initialization = true; | ||||
| @@ -349,7 +350,8 @@ initializeCastApi = function() { | ||||
|                 mobile_beginning = false; | ||||
|  | ||||
|                 //castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", start: Player.np.start, end: Player.np.end, videoId: video_id, seekTo: _seekTo, channel: chan.toLowerCase(), source: videoSource, thumbnail: Player.np.thumbnail}) | ||||
|                 castSession.sendMessage("urn:x-cast:zoff.me", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title, source: full_playlist[0].source, thumbnail: full_playlist[0].thumbnail}) | ||||
|                 castSession.sendMessage("urn:x-cast:zoff.me", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title, source: full_playlist[0].source, thumbnail: full_playlist[0].thumbnail}); | ||||
|                 castSession.sendMessage("urn:x-cast:zoff.me", {type: "chromecastInfoShow", value: chromecastInfoShow}); | ||||
|                 loadChromecastVideo(); | ||||
|                 if(window.location.hostname.indexOf("zoff.me") > -1 && !offline && window.location.hostname.indexOf("localhost") == -1) { | ||||
|                     socket.emit("get_id"); | ||||
| @@ -375,6 +377,7 @@ initializeCastApi = function() { | ||||
|                 if(window.location.hostname.indexOf("zoff.me") > -1 && !offline && window.location.hostname.indexOf("localhost") == -1) { | ||||
|                     socket.emit("get_id"); | ||||
|                 } | ||||
|                 castSession.sendMessage("urn:x-cast:zoff.me", {type: "chromecastInfoShow", value: chromecastInfoShow}); | ||||
|                 loadChromecastVideo(); | ||||
|                 //castSession.sendMessage("urn:x-cast:zoff.me", {type: "loadVideo", start: Player.np.start, end: Player.np.end, videoId: video_id, seekTo: _seekTo, channel: chan.toLowerCase(), source: videoSource, thumbnail: Player.np.thumbnail}) | ||||
|                 castSession.sendMessage("urn:x-cast:zoff.me", {type: "nextVideo", videoId: full_playlist[0].id, title: full_playlist[0].title, source: full_playlist[0].source, thumbnail: full_playlist[0].thumbnail}) | ||||
| @@ -942,6 +945,14 @@ function addDynamicListeners() { | ||||
|         } | ||||
|     }); | ||||
|  | ||||
|     addListener("change", '.chromecast_info_display_class', function() | ||||
|     { | ||||
|         chromecastInfoShow = document.getElementsByName("chromecast_info_display")[0].checked; | ||||
|         if(chromecastAvailable) { | ||||
|             castSession.sendMessage("urn:x-cast:zoff.me", {type: "chromecastInfoShow", value: chromecastInfoShow}); | ||||
|         } | ||||
|     }); | ||||
|  | ||||
|     addListener("change", '.offline_switch_class', function() | ||||
|     { | ||||
|         offline = document.getElementsByName("offline_switch")[0].checked; | ||||
|   | ||||
| @@ -54,6 +54,18 @@ | ||||
|                     </label> | ||||
|                 </div> | ||||
|             </li> | ||||
|             <li> | ||||
|                 <span class="switch-text"> | ||||
|                     Cast info | ||||
|                 </span> | ||||
|                 <div class="switch"> | ||||
|                     <label> | ||||
|                         Hide | ||||
|                         <input name="chromecast_info_display" type="checkbox" checked class="chromecast_info_display_class" /><span class="lever"></span> | ||||
|                            Show | ||||
|                     </label> | ||||
|                 </div> | ||||
|             </li> | ||||
|             <li class="background_color_container hide"> | ||||
|                 <div class="row"> | ||||
|                     <span class="col switch-text">Color</span> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user