coursea中英文双字幕

    var myvideo = document.getElementsByTagName('video')[0];
    for (var i = 0; i < myvideo.textTracks.length; i++) {
        ["en", "zh-CN"].indexOf(myvideo.textTracks[i].language) > -1 ? myvideo.textTracks[i].mode = "showing" : myvideo.textTracks[i].mode = "hidden";
    }

  

posted @ 2020-10-07 10:44  天凉好个秋秋  阅读(180)  评论(0编辑  收藏  举报