aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-02 15:10:06 +0200
committerChocobozzz <me@florianbigard.com>2020-07-02 15:10:06 +0200
commit35f0a5e665a565ffc9d4b88c5a12d45c88b0a090 (patch)
treecbcec5f21cfb21a1424f61cc4a60e9581f5acefa /client/src
parent1e904cde34ba41a16256da1073336dd652368592 (diff)
downloadPeerTube-35f0a5e665a565ffc9d4b88c5a12d45c88b0a090.tar.gz
PeerTube-35f0a5e665a565ffc9d4b88c5a12d45c88b0a090.tar.zst
PeerTube-35f0a5e665a565ffc9d4b88c5a12d45c88b0a090.zip
Fix player menu on mobile
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/shared/shared-user-subscription/remote-subscribe.component.ts2
-rw-r--r--client/src/assets/player/peertube-plugin.ts12
-rw-r--r--client/src/standalone/videos/embed.ts2
3 files changed, 11 insertions, 5 deletions
diff --git a/client/src/app/shared/shared-user-subscription/remote-subscribe.component.ts b/client/src/app/shared/shared-user-subscription/remote-subscribe.component.ts
index 09164a5d3..286ecac02 100644
--- a/client/src/app/shared/shared-user-subscription/remote-subscribe.component.ts
+++ b/client/src/app/shared/shared-user-subscription/remote-subscribe.component.ts
@@ -39,8 +39,6 @@ export class RemoteSubscribeComponent extends FormReactive implements OnInit {
39 fetch(`https://${hostname}/.well-known/webfinger?resource=acct:${username}@${hostname}`) 39 fetch(`https://${hostname}/.well-known/webfinger?resource=acct:${username}@${hostname}`)
40 .then(response => response.json()) 40 .then(response => response.json())
41 .then(data => new Promise((resolve, reject) => { 41 .then(data => new Promise((resolve, reject) => {
42 console.log(data)
43
44 if (data && Array.isArray(data.links)) { 42 if (data && Array.isArray(data.links)) {
45 const link: { template: string } = data.links.find((link: any) => { 43 const link: { template: string } = data.links.find((link: any) => {
46 return link && typeof link.template === 'string' && link.rel === 'http://ostatus.org/schema/1.0/subscribe' 44 return link && typeof link.template === 'string' && link.rel === 'http://ostatus.org/schema/1.0/subscribe'
diff --git a/client/src/assets/player/peertube-plugin.ts b/client/src/assets/player/peertube-plugin.ts
index a5a706420..a2b038b77 100644
--- a/client/src/assets/player/peertube-plugin.ts
+++ b/client/src/assets/player/peertube-plugin.ts
@@ -233,12 +233,20 @@ class PeerTubePlugin extends Plugin {
233 } 233 }
234 234
235 private alterInactivity () { 235 private alterInactivity () {
236 if (this.menuOpened || this.mouseInControlBar) { 236 if (this.menuOpened) {
237 this.player.options_.inactivityTimeout = this.savedInactivityTimeout 237 this.player.options_.inactivityTimeout = this.savedInactivityTimeout
238 return 238 return
239 } 239 }
240 240
241 this.player.options_.inactivityTimeout = 1 241 if (!this.mouseInControlBar && !this.isTouchEnabled()) {
242 this.player.options_.inactivityTimeout = 1
243 }
244 }
245
246 private isTouchEnabled () {
247 return ('ontouchstart' in window) ||
248 navigator.maxTouchPoints > 0 ||
249 navigator.msMaxTouchPoints > 0
242 } 250 }
243 251
244 private initCaptions () { 252 private initCaptions () {
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index 286757e5e..86a91643a 100644
--- a/client/src/standalone/videos/embed.ts
+++ b/client/src/standalone/videos/embed.ts
@@ -201,7 +201,7 @@ export class PeerTubeEmbed {
201 subtitle: this.subtitle, 201 subtitle: this.subtitle,
202 202
203 videoCaptions, 203 videoCaptions,
204 inactivityTimeout: 1500, 204 inactivityTimeout: 2500,
205 videoViewUrl: this.getVideoUrl(videoId) + '/views', 205 videoViewUrl: this.getVideoUrl(videoId) + '/views',
206 206
207 playerElement: this.videoElement, 207 playerElement: this.videoElement,