Say there is some website hosting a video that doesn't have an option for captions. Is there a way to "forcefully" attach captions to the <video>
element from my side, for example by editing the DOM with Chrome? I've tried the following:
$("#video_id").append('<track label="English" kind="subtitles" srclang="en" src="https://websitefromotherdomain.com/subs.srt" default>')
This returns:
Unsafe attempt to load URL https://websitefromotherdomain.com/subs.srt from frame with URL https://video_domain.com/123.html. Domains, protocols and ports must match.
So this error is pretty self explanatory. But I was wondering if what I'd want to accomplish is even possible, and if there is another method for appending captions to a video (where the captions are hosted on a different website).