HTML5 track captions not showing

2019-06-17 07:45发布

I am trying to make the simplest html5 video player in the world:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>ST Media Player</title>
    </head>
    <body>
        <video id="player" src="http://video-js.zencoder.com/oceans-clip.mp4" controls>
            <track kind="captions" src="_tracks/test.vtt" default>
        </video>
    </body>
</html>

Done!

Now why does the player recognize that there is captions, but doesnt show them? I have tried different video's and subtitle files now.

7条回答
迷人小祖宗
2楼-- · 2019-06-17 08:41

well, if you are using chrome, chances are that you need to start it from the terminal, and type --disable-web-security, for linux, ... more at Disable same origin policy in Chrome

查看更多
登录 后发表回答