资源解释为TextTrack,但以MIME类型text / plain传输

问题描述 投票:0回答:1

你好朋友,当我在视频标签中添加字幕跟踪标签,然后在chrome浏览器的控制台中出现此警告Resource interpreted as TextTrack but transferred with MIME type text/plain: "http://localhost/video/media/View_From_A_Blue_Moon_Trailer-HD.en.vtt".但是我的html页面和标题工作正常Warning我正在将xampp与apache Web服务器一起用于Localhost。

html apache google-chrome html5-video mime-types
1个回答
0
投票

[我的研究提供此解决方案之后,因为我正在使用apache Web服务器,所以首先在存储.htaccess类型文件的根目录中创建了.vtt文件。

例如:H:\xampp\htdocs\video\media\.htaccess

然后在AddType text/vtt .vtt文件中插入.htaccess此内容。

从Chrome浏览器中清除了缓存,并刷新了选项卡,然后.vtt MimeType警告消失了。

如果要使用其他Web服务器,则可以遵循此Answer

© www.soinside.com 2019 - 2024. All rights reserved.