Fix resource loading issues: add favicon, fix material-bg path, and add video error handling
	
		
			
	
		
	
	
		
			
				
	
				ci/woodpecker/push/woodpecker Pipeline failed
				
					Details
				
			
		
	
				
					
				
			
				
	
				ci/woodpecker/push/woodpecker Pipeline failed
				
					Details
				
			
		
	This commit is contained in:
		
							parent
							
								
									1199d13a5d
								
							
						
					
					
						commit
						f1381d722a
					
				|  | @ -2,18 +2,28 @@ | ||||||
|  * Initialize Video.js players |  * Initialize Video.js players | ||||||
|  */ |  */ | ||||||
| document.addEventListener('DOMContentLoaded', function() { | document.addEventListener('DOMContentLoaded', function() { | ||||||
|   // Wait for Video.js to be loaded
 |   // Find all video.js players
 | ||||||
|   function checkVideoJS() { |   var videoElements = document.querySelectorAll('.video-js'); | ||||||
|     if (window.videojs) { |  | ||||||
|       // Initialize any video players on the page
 |  | ||||||
|       var players = document.querySelectorAll('.video-js'); |  | ||||||
|       players.forEach(function(player) { |  | ||||||
|         videojs(player.id); |  | ||||||
|       }); |  | ||||||
|     } else { |  | ||||||
|       setTimeout(checkVideoJS, 50); |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
|    |    | ||||||
|   checkVideoJS(); |   // Initialize each player with error handling
 | ||||||
|  |   videoElements.forEach(function(videoElement) { | ||||||
|  |     if (videoElement.id) { | ||||||
|  |       var player = videojs(videoElement.id, { | ||||||
|  |         // Enable responsive mode
 | ||||||
|  |         responsive: true, | ||||||
|  |         // Provide a default source if none is found
 | ||||||
|  |         sources: videoElement.querySelector('source') ? undefined : [ | ||||||
|  |           { src: '/static/videos/hls/blank/index.m3u8', type: 'application/x-mpegURL' } | ||||||
|  |         ] | ||||||
|  |       }); | ||||||
|  |        | ||||||
|  |       // Add error handling
 | ||||||
|  |       player.on('error', function() { | ||||||
|  |         var errorDisplay = videoElement.querySelector('.vjs-error-display'); | ||||||
|  |         if (errorDisplay) { | ||||||
|  |           errorDisplay.innerHTML = '<div class="vjs-modal-dialog-content">Video unavailable or still processing. Please check back later.</div>'; | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |   }); | ||||||
| });  | });  | ||||||
|  | @ -0,0 +1 @@ | ||||||
|  |   | ||||||
|  | @ -0,0 +1,4 @@ | ||||||
|  | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"> | ||||||
|  |   <circle cx="50" cy="50" r="40" fill="#EB2078" /> | ||||||
|  |   <path d="M30,40 Q50,10 70,40 T70,60 Q50,90 30,60 T30,40" fill="#00D0FF" /> | ||||||
|  | </svg>  | ||||||
| After Width: | Height: | Size: 198 B | 
|  | @ -0,0 +1,7 @@ | ||||||
|  | #EXTM3U | ||||||
|  | #EXT-X-VERSION:3 | ||||||
|  | #EXT-X-TARGETDURATION:1 | ||||||
|  | #EXT-X-MEDIA-SEQUENCE:0 | ||||||
|  | #EXTINF:1.000, | ||||||
|  | blank0.ts | ||||||
|  | #EXT-X-ENDLIST  | ||||||
|  | @ -171,4 +171,8 @@ | ||||||
| <link rel="stylesheet" type="text/css" href="/css/app.min.css"> | <link rel="stylesheet" type="text/css" href="/css/app.min.css"> | ||||||
| <link rel="stylesheet" type="text/css" href="/css/custom.css" media="print" onload="this.media='all'"> | <link rel="stylesheet" type="text/css" href="/css/custom.css" media="print" onload="this.media='all'"> | ||||||
| <noscript><link rel="stylesheet" href="/css/custom.css"></noscript> | <noscript><link rel="stylesheet" href="/css/custom.css"></noscript> | ||||||
|  | 
 | ||||||
|  | <!-- Favicon --> | ||||||
|  | <link rel="icon" href="/static/favicon.svg" type="image/svg+xml"> | ||||||
|  | <link rel="icon" href="/static/favicon.ico" type="image/x-icon"> | ||||||
| </head> | </head> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Your Name
						Your Name