Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I have a need to host videos locally, rather than through YouTube or Vimeo. Is there a video attribute that adds the <track> element to a video? I want to specify a .VTT captions file for a video like so:
<track label="English" kind="subtitles" srclang="en" src="captions_file.vtt"> Thanks, Ben |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
Not a the moment. You could come up with a syntax to pass this information via an attribute, such as: video::video.mp4[subtitles=en:captions_file.vtt] Then you'd need to customize the converter by using your own template for the video node (or, the more advanced approach of making a custom composite converter that overrides the transform for video). In that handler, you can access your subtitles attribute using: node.attr 'subtitles', nil, false You'd need to split on the colon to get the language and file part, then add the corresponding <track> tag to the output. (Here's an example template: https://github.com/asciidoctor/asciidoctor-bespoke/blob/master/templates/slim/video.html.slim) If we find that we like this design, we could consider it for core. But I'd like to see a prototype first. Cheers, -Dan p.s. another idea for the syntax: video::video.mp4[subtitles=captions_file.vtt?lang=en] On Tue, Mar 28, 2017 at 12:58 PM, bcammett [via Asciidoctor :: Discussion] <[hidden email]> wrote: I have a need to host videos locally, rather than through YouTube or Vimeo. Is there a video attribute that adds the <track> element to a video? I want to specify a .VTT captions file for a video like so: Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
In reply to this post by bcammett
The key is always in the design of the AsciiDoc syntax ;) Once we have that, the door is open. -Dan On Tue, Mar 28, 2017 at 5:51 PM, Dan Allen <[hidden email]> wrote:
... [show rest of quote] Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Free forum by Nabble | Edit this page |