mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-11-03 19:17:16 -05:00 
			
		
		
		
	Fixing controls on mobile
This commit is contained in:
		
							parent
							
								
									2186280d85
								
							
						
					
					
						commit
						0c857c9db1
					
				@ -1,6 +1,6 @@
 | 
				
			|||||||
<div id="root"
 | 
					<div id="root"
 | 
				
			||||||
     (mouseenter)="this.showControls = true;"
 | 
					     (mouseenter)="!isMobile ? this.showControls = true : null"
 | 
				
			||||||
     (mouseleave)="!this.player.paused ? this.showControls = false : null"
 | 
					     (mouseleave)="!this.player.paused && !isMobile ? this.showControls = false : null"
 | 
				
			||||||
     [style.cursor]="this.showControls ? '' : 'none'">
 | 
					     [style.cursor]="this.showControls ? '' : 'none'">
 | 
				
			||||||
	<div class="player data-vjs-player">
 | 
						<div class="player data-vjs-player">
 | 
				
			||||||
		<video id="player" #player
 | 
							<video id="player" #player
 | 
				
			||||||
 | 
				
			|||||||
@ -257,7 +257,7 @@ export class PlayerComponent implements OnInit, OnDestroy, AfterViewInit
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		if (this.seeking)
 | 
							if (this.seeking)
 | 
				
			||||||
			this.player.currentTime = this.getTimeFromSeekbar(event.pageX);
 | 
								this.player.currentTime = this.getTimeFromSeekbar(event.pageX);
 | 
				
			||||||
		else
 | 
							else if (!AppComponent.isMobile)
 | 
				
			||||||
			this.showControls = true;
 | 
								this.showControls = true;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -332,9 +332,13 @@ export class PlayerComponent implements OnInit, OnDestroy, AfterViewInit
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	videoClicked()
 | 
						videoClicked()
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		this.showControls = !this.player.paused;
 | 
							if (AppComponent.isMobile)
 | 
				
			||||||
		if (!AppComponent.isMobile)
 | 
								this.showControls = !this.showControls;
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								this.showControls = !this.player.paused;
 | 
				
			||||||
			this.togglePlayback();
 | 
								this.togglePlayback();
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	togglePlayback()
 | 
						togglePlayback()
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user