mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Changing tooltip toogle value.
This commit is contained in:
parent
312ab6b80b
commit
725c6c4b88
@ -1,8 +1,7 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Event, Router, NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from '@angular/router';
|
import { Event, Router, NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from '@angular/router';
|
||||||
//import * as $ from "jquery";
|
import * as $ from "jquery";
|
||||||
//import "bootstrap";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
|
@ -23,11 +23,6 @@ export class BrowseComponent implements OnInit
|
|||||||
this.shows = this.route.snapshot.data.shows;
|
this.shows = this.route.snapshot.data.shows;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit()
|
|
||||||
{
|
|
||||||
$('[data-toggle="tooltip"]').tooltip({ trigger: "hover" });
|
|
||||||
}
|
|
||||||
|
|
||||||
getThumb(slug: string)
|
getThumb(slug: string)
|
||||||
{
|
{
|
||||||
return this.sanitizer.bypassSecurityTrustStyle("url(/poster/" + slug + ")");
|
return this.sanitizer.bypassSecurityTrustStyle("url(/poster/" + slug + ")");
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
<a *ngIf="this.item.previousEpisode" mat-icon-button matTooltipPosition="above" matTooltip="Previous" routerLink="/watch/{{this.item.previousEpisode}}" href="/watch/{{this.item.previousEpisode}}" queryParamsHandling="merge">
|
<a *ngIf="this.item.previousEpisode" mat-icon-button matTooltipPosition="above" matTooltip="Previous" routerLink="/watch/{{this.item.previousEpisode}}" href="/watch/{{this.item.previousEpisode}}" queryParamsHandling="merge">
|
||||||
<mat-icon>skip_previous</mat-icon>
|
<mat-icon>skip_previous</mat-icon>
|
||||||
</a>
|
</a>
|
||||||
<button mat-icon-button matTooltipPosition="above" matTooltip="Play" id="play" (click)="tooglePlayback()">
|
<button mat-icon-button matTooltipPosition="above" [matTooltip]="playTooltip" id="play" (click)="tooglePlayback()">
|
||||||
<mat-icon>{{this.playIcon}}</mat-icon>
|
<mat-icon>{{this.playIcon}}</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<a mat-icon-button id="nextBtn" *ngIf="this.item.nextEpisode" routerLink="/watch/{{this.item.nextEpisode.link}}" href="/watch/{{this.item.nextEpisode.link}}" queryParamsHandling="merge">
|
<a mat-icon-button id="nextBtn" *ngIf="this.item.nextEpisode" routerLink="/watch/{{this.item.nextEpisode.link}}" href="/watch/{{this.item.nextEpisode.link}}" queryParamsHandling="merge">
|
||||||
@ -77,7 +77,7 @@
|
|||||||
<button mat-icon-button matTooltipPosition="above" matTooltip="Settings">
|
<button mat-icon-button matTooltipPosition="above" matTooltip="Settings">
|
||||||
<mat-icon>settings</mat-icon>
|
<mat-icon>settings</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button mat-icon-button matTooltipPosition="above" matTooltip="Fullscreen" id="fullscreen" (click)="fullscreen()">
|
<button mat-icon-button matTooltipPosition="above" [matTooltip]="fullscreenTooltip" id="fullscreen" (click)="fullscreen()">
|
||||||
<mat-icon>{{fullscreenIcon}}</mat-icon>
|
<mat-icon>{{fullscreenIcon}}</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -34,6 +34,9 @@ export class PlayerComponent implements OnInit
|
|||||||
volumeIcon: string = "volume_up"; //Icon used by the volume btn.
|
volumeIcon: string = "volume_up"; //Icon used by the volume btn.
|
||||||
fullscreenIcon: string = "fullscreen"; //Icon used by the fullscreen btn.
|
fullscreenIcon: string = "fullscreen"; //Icon used by the fullscreen btn.
|
||||||
|
|
||||||
|
playTooltip: string = "Pause"; //Text used in the play tooltip
|
||||||
|
fullscreenTooltip: string = "Fullscreen"; //Text used in the fullscreen tooltip
|
||||||
|
|
||||||
private player: HTMLVideoElement;
|
private player: HTMLVideoElement;
|
||||||
private thumb: HTMLElement;
|
private thumb: HTMLElement;
|
||||||
private progress: HTMLElement;
|
private progress: HTMLElement;
|
||||||
@ -83,7 +86,7 @@ export class PlayerComponent implements OnInit
|
|||||||
this.player.onpause = () =>
|
this.player.onpause = () =>
|
||||||
{
|
{
|
||||||
this.playIcon = "play_arrow"
|
this.playIcon = "play_arrow"
|
||||||
$("#play").attr("data-original-title", "Play");
|
this.playTooltip = "Play";
|
||||||
}
|
}
|
||||||
|
|
||||||
this.player.ontimeupdate = () =>
|
this.player.ontimeupdate = () =>
|
||||||
@ -194,12 +197,12 @@ export class PlayerComponent implements OnInit
|
|||||||
if (document.fullscreenElement != null)
|
if (document.fullscreenElement != null)
|
||||||
{
|
{
|
||||||
this.fullscreenIcon = "fullscreen_exit";
|
this.fullscreenIcon = "fullscreen_exit";
|
||||||
$("#fullscreen").attr("data-original-title", "Exit fullscreen");
|
this.fullscreenTooltip = "Exit fullscreen";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.fullscreenIcon = "fullscreen";
|
this.fullscreenIcon = "fullscreen";
|
||||||
$("#fullscreen").attr("data-original-title", "Fullscreen");
|
this.fullscreenTooltip = "Fullscreen";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -271,8 +274,6 @@ export class PlayerComponent implements OnInit
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('[data-toggle="tooltip"]').tooltip({ trigger: "hover" });
|
|
||||||
|
|
||||||
this.init();
|
this.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,7 +329,6 @@ export class PlayerComponent implements OnInit
|
|||||||
|
|
||||||
$(document).unbind();
|
$(document).unbind();
|
||||||
$(window).unbind();
|
$(window).unbind();
|
||||||
$('[data-toggle="tooltip"]').hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tooglePlayback()
|
tooglePlayback()
|
||||||
@ -352,7 +352,7 @@ export class PlayerComponent implements OnInit
|
|||||||
initPlayBtn()
|
initPlayBtn()
|
||||||
{
|
{
|
||||||
this.playIcon = "pause";
|
this.playIcon = "pause";
|
||||||
$("#play").attr("data-original-title", "Pause");
|
this.playTooltip = "Pause";
|
||||||
}
|
}
|
||||||
|
|
||||||
fullscreen()
|
fullscreen()
|
||||||
|
@ -46,11 +46,6 @@ export class ShowDetailsComponent implements OnInit
|
|||||||
this.getEpisodes();
|
this.getEpisodes();
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit()
|
|
||||||
{
|
|
||||||
$('[data-toggle="tooltip"]').tooltip({ trigger: "hover" });
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy()
|
ngOnDestroy()
|
||||||
{
|
{
|
||||||
window.removeEventListener("scroll", this.scroll, true);
|
window.removeEventListener("scroll", this.scroll, true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user