]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/shared/resolutions/peertube-resolutions-plugin.ts
Handle network issues in video player (#5138)
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / shared / resolutions / peertube-resolutions-plugin.ts
index e7899ac71a0459c337e80c2d572604524ca4e1b1..4fafd27b1ba21dcb08f94527477960cfb9fe0e56 100644 (file)
@@ -21,6 +21,11 @@ class PeerTubeResolutionsPlugin extends Plugin {
     this.trigger('resolutionsAdded')
   }
 
+  remove (resolutionIndex: number) {
+    this.resolutions = this.resolutions.filter(r => r.id !== resolutionIndex)
+    this.trigger('resolutionRemoved')
+  }
+
   getResolutions () {
     return this.resolutions
   }