mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-23 15:30:34 -04: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;
|
||||
}
|
||||
|
||||
@ -332,9 +332,13 @@ export class PlayerComponent implements OnInit, OnDestroy, AfterViewInit
|
||||
|
||||
videoClicked()
|
||||
{
|
||||
this.showControls = !this.player.paused;
|
||||
if (!AppComponent.isMobile)
|
||||
if (AppComponent.isMobile)
|
||||
this.showControls = !this.showControls;
|
||||
else
|
||||
{
|
||||
this.showControls = !this.player.paused;
|
||||
this.togglePlayback();
|
||||
}
|
||||
}
|
||||
|
||||
togglePlayback()
|
||||
|
Loading…
x
Reference in New Issue
Block a user