aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/shared/resolutions
diff options
context:
space:
mode:
authorkontrollanten <6680299+kontrollanten@users.noreply.github.com>2022-09-28 11:52:23 +0200
committerGitHub <noreply@github.com>2022-09-28 11:52:23 +0200
commitf2a16d93b476aff16d5353e4d44350298ec7e01c (patch)
tree36c43eb3299c4a1137ca38dd1a564701a5a27236 /client/src/assets/player/shared/resolutions
parent43972ee466740e91b16c08fe106551657969e669 (diff)
downloadPeerTube-f2a16d93b476aff16d5353e4d44350298ec7e01c.tar.gz
PeerTube-f2a16d93b476aff16d5353e4d44350298ec7e01c.tar.zst
PeerTube-f2a16d93b476aff16d5353e4d44350298ec7e01c.zip
Handle network issues in video player (#5138)
* feat(client/player): handle network offline * feat(client/player): human friendly err msg * feat(client/player): handle broken resolutions When an error occurs for a resolution, remove the resolution and try with another resolution. * fix(client/player): prevent err handl when offline * fix(client/player): localize offline text
Diffstat (limited to 'client/src/assets/player/shared/resolutions')
-rw-r--r--client/src/assets/player/shared/resolutions/peertube-resolutions-plugin.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/assets/player/shared/resolutions/peertube-resolutions-plugin.ts b/client/src/assets/player/shared/resolutions/peertube-resolutions-plugin.ts
index e7899ac71..4fafd27b1 100644
--- a/client/src/assets/player/shared/resolutions/peertube-resolutions-plugin.ts
+++ b/client/src/assets/player/shared/resolutions/peertube-resolutions-plugin.ts
@@ -21,6 +21,11 @@ class PeerTubeResolutionsPlugin extends Plugin {
21 this.trigger('resolutionsAdded') 21 this.trigger('resolutionsAdded')
22 } 22 }
23 23
24 remove (resolutionIndex: number) {
25 this.resolutions = this.resolutions.filter(r => r.id !== resolutionIndex)
26 this.trigger('resolutionRemoved')
27 }
28
24 getResolutions () { 29 getResolutions () {
25 return this.resolutions 30 return this.resolutions
26 } 31 }