diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2022-09-28 11:52:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-28 11:52:23 +0200 |
commit | f2a16d93b476aff16d5353e4d44350298ec7e01c (patch) | |
tree | 36c43eb3299c4a1137ca38dd1a564701a5a27236 /client/src/assets/player/shared/resolutions | |
parent | 43972ee466740e91b16c08fe106551657969e669 (diff) | |
download | PeerTube-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.ts | 5 |
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 | } |