webvtt

How to enable CORS for html5 video loading vtt file?

允我心安 提交于 2021-02-07 13:54:13
问题 My Need html5 video element loads both a video and a vtt file saved in a different domain. The problem vtt is not loaded and error Text track from origin has been blocked from loading: Not at same origin as the document, and parent of track element does not have a 'crossorigin' attribute. My investigation I am aware that CORS needs to be used so vtt can be loaded in html5 successfully. I have enabled CORS on server side for requests from any domain. Some articles say adding crossorigin or

AVUrlAsset and WebVTTs

狂风中的少年 提交于 2021-01-28 04:37:15
问题 On iOS/TVOS, is it possible to load a remote .vtt file from a URL and use it as a subtitle track with a remote HLS video also loaded from a URL (as opposed to the VTT being specified within the m3u8 playlist)? pseudocode: AVAsset* video_asset = AVAsset( "http://video.m3u8" ); AVAsset* subtitle_asset = AVAsset( "http://subtitle.vtt" ); AVPlayer player = player.playVideoWithSubtitle( video_asset, subtitle_asset ); player.play(). Edit: The docs mention using AVAsset for subtitles, but does

Crossorigin errors when loading VTT file

蓝咒 提交于 2019-12-21 09:16:14
问题 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 my code: <audio controls> <source src="myaudio.mp3" type="audio/mpeg"> <track kink="caption" src="myaudio.vtt" srclang="en" label="English"> </audio> According to what I've read, track is supposed to work for both audio and video, which makes sense from an accessibility stand-point. What doesn't make sense is the error I get

Javascript parser for RDF/JSON from WEBVTT

折月煮酒 提交于 2019-12-09 13:11:34
问题 Good evening. Straight to the point - I would need a script that grabs RDF/JSON structure from specific time interval in WEBVTT file. Does such a thing exist? RDF/JSON is Talis specified file structure that looks like this: { "S" : { "P" : [ O ] } } WEBVTT implements mentioned structure like this: 0 00:00:00,000 --> 00:00:46,119 { "S" : { "P" : [ O ] } } 1 00:00:48,000 --> 00:00:50,211 { "S" : { "P" : [ O ] } } ... And I would use such file while viewing the video files in such way that when

Javascript parser for RDF/JSON from WEBVTT

此生再无相见时 提交于 2019-12-03 15:16:56
Good evening. Straight to the point - I would need a script that grabs RDF/JSON structure from specific time interval in WEBVTT file. Does such a thing exist? RDF/JSON is Talis specified file structure that looks like this: { "S" : { "P" : [ O ] } } WEBVTT implements mentioned structure like this: 0 00:00:00,000 --> 00:00:46,119 { "S" : { "P" : [ O ] } } 1 00:00:48,000 --> 00:00:50,211 { "S" : { "P" : [ O ] } } ... And I would use such file while viewing the video files in such way that when I click on some part of the timeline, script fetches corresponding RDF/JSON code (I'm able to do this