fetch(`https://${hostname}/.well-known/webfinger?resource=acct:${username}@${hostname}`)
.then(response => response.json())
.then(data => new Promise((resolve, reject) => {
- console.log(data)
-
if (data && Array.isArray(data.links)) {
const link: { template: string } = data.links.find((link: any) => {
return link && typeof link.template === 'string' && link.rel === 'http://ostatus.org/schema/1.0/subscribe'
}
private alterInactivity () {
- if (this.menuOpened || this.mouseInControlBar) {
+ if (this.menuOpened) {
this.player.options_.inactivityTimeout = this.savedInactivityTimeout
return
}
- this.player.options_.inactivityTimeout = 1
+ if (!this.mouseInControlBar && !this.isTouchEnabled()) {
+ this.player.options_.inactivityTimeout = 1
+ }
+ }
+
+ private isTouchEnabled () {
+ return ('ontouchstart' in window) ||
+ navigator.maxTouchPoints > 0 ||
+ navigator.msMaxTouchPoints > 0
}
private initCaptions () {
subtitle: this.subtitle,
videoCaptions,
- inactivityTimeout: 1500,
+ inactivityTimeout: 2500,
videoViewUrl: this.getVideoUrl(videoId) + '/views',
playerElement: this.videoElement,