Track for self-hosted videos?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Track for self-hosted videos?

bcammett
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
Reply | Threaded
Open this post in threaded view
|

Re: Track for self-hosted videos?

mojavelinux
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.


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:

<track label="English" kind="subtitles" srclang="en" src="captions_file.vtt">

Thanks,
Ben


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Track-for-self-hosted-videos-tp5449.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Track for self-hosted videos?

mojavelinux
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:
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.


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:

<track label="English" kind="subtitles" srclang="en" src="captions_file.vtt">

Thanks,
Ben


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Track-for-self-hosted-videos-tp5449.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux