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"
 | 
			
		||||
     (mouseenter)="this.showControls = true;"
 | 
			
		||||
     (mouseleave)="!this.player.paused ? this.showControls = false : null"
 | 
			
		||||
     (mouseenter)="!isMobile ? this.showControls = true : null"
 | 
			
		||||
     (mouseleave)="!this.player.paused && !isMobile ? this.showControls = false : null"
 | 
			
		||||
     [style.cursor]="this.showControls ? '' : 'none'">
 | 
			
		||||
	<div class="player data-vjs-player">
 | 
			
		||||
		<video id="player" #player
 | 
			
		||||
 | 
			
		||||
@ -257,7 +257,7 @@ export class PlayerComponent implements OnInit, OnDestroy, AfterViewInit
 | 
			
		||||
	{
 | 
			
		||||
		if (this.seeking)
 | 
			
		||||
			this.player.currentTime = this.getTimeFromSeekbar(event.pageX);
 | 
			
		||||
		else
 | 
			
		||||
		else if (!AppComponent.isMobile)
 | 
			
		||||
			this.showControls = true;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -331,11 +331,15 @@ export class PlayerComponent implements OnInit, OnDestroy, AfterViewInit
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	videoClicked()
 | 
			
		||||
	{
 | 
			
		||||
		if (AppComponent.isMobile)
 | 
			
		||||
			this.showControls = !this.showControls;
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			this.showControls = !this.player.paused;
 | 
			
		||||
		if (!AppComponent.isMobile)
 | 
			
		||||
			this.togglePlayback();
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	togglePlayback()
 | 
			
		||||
	{
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user