Crossorigin errors when loading VTT file

前端 未结 7 1423
我寻月下人不归
我寻月下人不归 2021-02-20 05:48

I\'m new to using the audio tag in HTML 5 and wanted to build a player. I wanted to test using a VTT file in a track tag to see how closed captioning could work.

Here is

相关标签:
7条回答
  • 2021-02-20 06:31

    You might want to add the following lines in your Web.config if you get 404: not found.

    <system.webServer>
        <staticContent>
            <remove fileExtension=".vtt" /> <!--REMOVES SERVER .vtt extention if it exists-->
            <mimeMap fileExtension=".vtt" mimeType="text/vtt" /> <!--ads it again (needed when debuging)-->
        </staticContent>
    </system.webServer></configuration>
    

    Hopes this helps others. .vtt is not supported from scratch, and thus chrome (among others) blocks the content because of security reasons.

    0 讨论(0)
提交回复
热议问题