Embed: mews: added subtitle support

This commit is contained in:
Cat 2022-01-26 10:26:18 +01:00 committed by Thulinma
parent 431c06e4cd
commit b6068f4627
4 changed files with 20 additions and 3 deletions

View file

@ -1536,7 +1536,7 @@ MistSkins["default"] = {
for (var i in MistVideo.info.source) {
var source = MistVideo.info.source[i];
//this is a subtitle source, and it's the same protocol (HTTP/HTTPS) as the video source
if ((source.type == "html5/text/vtt") && (MistUtil.http.url.split(source.url).protocol == MistUtil.http.url.split(MistVideo.source.url).protocol)) {
if ((source.type == "html5/text/vtt") && (MistUtil.http.url.split(source.url).protocol == MistUtil.http.url.split(MistVideo.source.url).protocol.replace(/^ws/,"http"))) {
subtitleSource = source.url.replace(/.srt$/,".vtt");
break;
}