diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-16 16:55:34 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-16 17:16:47 +0200 |
commit | 536598cfafab1c5e24e881db1c528489f804fb6b (patch) | |
tree | 9d15e809218174622d68d21b0c7f0a73147187db /client/src/assets | |
parent | 3daaa1927474869f8dbaddd6b94b4c071e314e10 (diff) | |
download | PeerTube-536598cfafab1c5e24e881db1c528489f804fb6b.tar.gz PeerTube-536598cfafab1c5e24e881db1c528489f804fb6b.tar.zst PeerTube-536598cfafab1c5e24e881db1c528489f804fb6b.zip |
Add audio support in upload
Diffstat (limited to 'client/src/assets')
-rw-r--r-- | client/src/assets/player/peertube-player-manager.ts | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts index 6cdd54372..31cbc7dfd 100644 --- a/client/src/assets/player/peertube-player-manager.ts +++ b/client/src/assets/player/peertube-player-manager.ts | |||
@@ -117,8 +117,17 @@ export class PeertubePlayerManager { | |||
117 | videojs(options.common.playerElement, videojsOptions, function (this: any) { | 117 | videojs(options.common.playerElement, videojsOptions, function (this: any) { |
118 | const player = this | 118 | const player = this |
119 | 119 | ||
120 | player.tech_.one('error', () => self.maybeFallbackToWebTorrent(mode, player, options)) | 120 | let alreadyFallback = false |
121 | player.one('error', () => self.maybeFallbackToWebTorrent(mode, player, options)) | 121 | |
122 | player.tech_.one('error', () => { | ||
123 | if (!alreadyFallback) self.maybeFallbackToWebTorrent(mode, player, options) | ||
124 | alreadyFallback = true | ||
125 | }) | ||
126 | |||
127 | player.one('error', () => { | ||
128 | if (!alreadyFallback) self.maybeFallbackToWebTorrent(mode, player, options) | ||
129 | alreadyFallback = true | ||
130 | }) | ||
122 | 131 | ||
123 | self.addContextMenu(mode, player, options.common.embedUrl) | 132 | self.addContextMenu(mode, player, options.common.embedUrl) |
124 | 133 | ||