This PR implements a new figure sub-component, media-embed-url which creates an embedded media player src URL and an original source URL for each media host (soundcloud, vimeo, youtube). The audio and video element.js sub-components have been refactored to use media-embed-url.
Figure captions now use media-embed-url to optionally display a link to the original source of the embedded media. This only displays when passing mediaId and mediaType kwargs to figureCaption -- the video/print.js and audio/print.js outputs use this to display media source links in print output only. I had originally tried to split figureCaption into separate print.js and html.js outputs, but since figureCaption is composed in output-specific figure components (video/print.js / video/html.js and audio/print.js / audio/html.js), it renders both print and html variants -- something to look into in the future perhaps.
Audio figures now have separate print.js and html.js outputs
This PR implements a new figure sub-component,
media-embed-url
which creates an embedded media playersrc
URL and an original source URL for each media host (soundcloud, vimeo, youtube). The audio and videoelement.js
sub-components have been refactored to usemedia-embed-url
.Figure captions now use
media-embed-url
to optionally display a link to the original source of the embedded media. This only displays when passingmediaId
andmediaType
kwargs tofigureCaption
-- thevideo/print.js
andaudio/print.js
outputs use this to display media source links in print output only. I had originally tried to splitfigureCaption
into separateprint.js
andhtml.js
outputs, but sincefigureCaption
is composed in output-specific figure components (video/print.js / video/html.js
andaudio/print.js / audio/html.js
), it renders both print and html variants -- something to look into in the future perhaps.print.js
andhtml.js
outputsPlease also review corresponding style changes to display media embed links on their own line: https://github.com/thegetty/quire/pull/646