mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	Reduce latency to < 100ms
This commit is contained in:
		
							parent
							
								
									19a134b441
								
							
						
					
					
						commit
						94aa8acb93
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -179,8 +179,11 @@ export default {
 | 
			
		|||
                            }
 | 
			
		||||
 | 
			
		||||
                            if (this.audioplayer) {
 | 
			
		||||
                                if (Math.abs(this.audioplayer.currentTime - this.player.currentTime()) > 0.25) {
 | 
			
		||||
                                    this.audioplayer.currentTime = this.player.currentTime()
 | 
			
		||||
 | 
			
		||||
                                const delay = this.audioplayer.currentTime - this.player.currentTime()
 | 
			
		||||
 | 
			
		||||
                                if (Math.abs(delay) > 0.1) {
 | 
			
		||||
                                    this.audioplayer.currentTime = this.player.currentTime() - delay
 | 
			
		||||
                                }
 | 
			
		||||
                            }
 | 
			
		||||
                        });
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue