Fix old edge HLS compat

This commit is contained in:
Chocobozzz 2020-05-13 10:39:54 +02:00
parent 0845e480d2
commit 089af69bc8
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 5 additions and 0 deletions

View File

@ -717,6 +717,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
else mode = 'webtorrent' else mode = 'webtorrent'
} }
// p2p-media-loader needs TextEncoder, try to fallback on WebTorrent
if (typeof TextEncoder === 'undefined') {
mode = 'webtorrent'
}
if (mode === 'p2p-media-loader') { if (mode === 'p2p-media-loader') {
const hlsPlaylist = video.getHlsPlaylist() const hlsPlaylist = video.getHlsPlaylist()