diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-08 10:17:47 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-08 10:17:47 +0200 |
commit | ffacd78f21d4021b3c0f654ff63ef29ca7afcde3 (patch) | |
tree | e2cebf3ccb43b9c5ffcab68a838d6f25d3719c0a /client/src/assets/player/p2p-media-loader | |
parent | a13df19d578d3c5bf8babfc1864e45fbfda98a47 (diff) | |
download | PeerTube-ffacd78f21d4021b3c0f654ff63ef29ca7afcde3.tar.gz PeerTube-ffacd78f21d4021b3c0f654ff63ef29ca7afcde3.tar.zst PeerTube-ffacd78f21d4021b3c0f654ff63ef29ca7afcde3.zip |
Load embed api resolutions on init
Diffstat (limited to 'client/src/assets/player/p2p-media-loader')
-rw-r--r-- | client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts b/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts index 4275a5e5e..f1bd9f0c4 100644 --- a/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts +++ b/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts | |||
@@ -124,6 +124,10 @@ class P2pMediaLoaderPlugin extends Plugin { | |||
124 | this.trigger('resolutionChange', { auto: this.hlsjs.autoLevelEnabled, resolutionId: data.height }) | 124 | this.trigger('resolutionChange', { auto: this.hlsjs.autoLevelEnabled, resolutionId: data.height }) |
125 | }) | 125 | }) |
126 | 126 | ||
127 | this.hlsjs.on(Hlsjs.Events.MANIFEST_LOADED, (_: any, data: any) => { | ||
128 | this.trigger('resolutionsLoaded') | ||
129 | }) | ||
130 | |||
127 | this.p2pEngine.on(Events.SegmentError, (segment: Segment, err) => { | 131 | this.p2pEngine.on(Events.SegmentError, (segment: Segment, err) => { |
128 | console.error('Segment error.', segment, err) | 132 | console.error('Segment error.', segment, err) |
129 | 133 | ||