acl-anthology
acl-anthology copied to clipboard
Embed videos on paper page
It would be nice to embed videos on the paper pages. This shouldn't be hard to implement. It would require:
- Modifying the paper page template,
hugo/layouts/papers/single.html, to embed the video - Maybe writing a custom field in the generated YAML that is used by Hugo to build the Anthology. This would be done by creating a field, say
video_embed_link, in thefrom_xml()function inbin/anthology/papers.py. (This file is used to load papers from the XML file, and all of itsattribattributes are dumped to the YAML).
We link to videos on Vimeo and Slideslives, which likely have different embedding code blocks, which is the reason for point 2 above.
Here is the code to embed Slideslive (where XXX should be replaced by the Slideslive ID, e.g., 38928822):
<div class="col-md-12 col-xs-12 my-auto p-2" >
<div id="presentation-embed" class="slp my-auto"></div>
<script src='https://slideslive.com/embed_presentation.js'></script>
<script>
embed = new SlidesLiveEmbed('presentation-embed', {
presentationId: 'XXX',
autoPlay: false, // change to true to autoplay the embedded presentation
verticalEnabled: true,
verticalWhenWidthLte: 500,
allowHiddenControlsWhenPaused: true,
hideTitle: true
});
</script>
<div class="text-muted">
NOTE: The SlidesLive video may display a random order of the authors.
The correct author list is shown at the top of this webpage.
</div>
</div>