mirror of
				https://github.com/scottlamb/moonfire-nvr.git
				synced 2025-10-29 15:55:01 -04:00 
			
		
		
		
	minor error handling improvements
*   When the MediaSource is in error state (or busy, I think),
    endOfStream throws an exception. This prevented the error from being
    properly displayed in the UI. We don't really need to call
    endOfStream, I guess.
*   including an Event in a format string just said [Object object],
    at least on Safari. Use the type instead, which I think is the
    only useful info in the event anyway.
			
			
This commit is contained in:
		
							parent
							
								
									d7f4b255bf
								
							
						
					
					
						commit
						f34937220d
					
				| @ -92,7 +92,6 @@ class LiveCameraDriver { | |||||||
|     console.error(`${this.camera.shortName}: aborting due to ${reason}`); |     console.error(`${this.camera.shortName}: aborting due to ${reason}`); | ||||||
|     this.stopStream(reason); |     this.stopStream(reason); | ||||||
|     this.buf = { state: "error" }; |     this.buf = { state: "error" }; | ||||||
|     this.src.endOfStream("network"); |  | ||||||
|     this.setPlaybackState({ state: "error", message: reason }); |     this.setPlaybackState({ state: "error", message: reason }); | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
| @ -230,7 +229,7 @@ class LiveCameraDriver { | |||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   bufEvent = (e: Event) => { |   bufEvent = (e: Event) => { | ||||||
|     this.error(`bufEvent: ${e}`); |     this.error(`SourceBuffer ${e.type}`); | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   videoPlaying = (e: SyntheticEvent<HTMLVideoElement, Event>) => { |   videoPlaying = (e: SyntheticEvent<HTMLVideoElement, Event>) => { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user