How to fix unsafe attempt error and show the caption?

42 Views Asked by At

This is the HTML code <video controls width="1000"> <source src="Video/Conan.mp4" type="video/mp4"> <track kind="captions" src="captions/cap.vtt" srclang="en" label="English"> </video>

This is the VTT File WEBVTT

1 00:00:00.000 --> 00:00:05.000 This is the caption 1

2 00:00:05.000 --> 00:00:10.000 This is the caption 2

This is the Error showed by console Unsafe attempt to load URL file:///C:/Users/USER/Documents/Front%20End/HTML5/AUDIO%20&%20VIDEO/captions/cap.vtt from frame with URL file:///C:/Users/USER/Documents/Front%20End/HTML5/AUDIO%20&%20VIDEO/AuVi.html. 'file:' URLs are treated as unique security origins.

I've tried my best, but I think I can't solve this alone. If you are a kind-hearted one, please help me, I'm newbie.

I want to show the caption, but when I click the caption button, it always disappeared itself.

0

There are 0 best solutions below