XML
Code
If you want to provide a fallback video for cases where the user has JavaScript turned off, or the RedBlue player fails to load, you can specify the third-party embed code manually. Just include the embed as a child of redblue-video.
<redblue-video id="redblue-youtube-fallback" aspect-ratio="16:9">
<hvml xmlns="https://hypervideo.tech/hvml#" hidden="hidden">
<video>
<!-- … -->
</video>
</hvml>
<iframe
src="//www.youtube.com/embed/nWdWq3hMwao?rel=0&showinfo=0&start=517&end=527&enablejsapi=1&controls=1&modestbranding=1&playsinline=1&fs=0&origin=http%3A%2F%2Flocal.redblue.video"
frameborder="0"
allow="autoplay; encrypted-media"
allowfullscreen="allowfullscreen"
></iframe>
</redblue-video>
If you wish to override RedBlue’s auto-generated embed code with your own even in the full-featured version, you can set the iframe’s slot attribute to player.
<script type="module">
import RedBlueVideo from './modules/redblue-video-compat.js';
customElements.define( RedBlueVideo.is, RedBlueVideo );
</script><redblue-video>. HVML can be represented as either XML or JSON-LD. When using the XML serialization, set the boolean hidden attribute to true to prevent the browser from rendering the metadata.<redblue-video>
<hvml xmlns="https://hypervideo.tech/hvml#" hidden="hidden"></hvml>
</redblue-video>video element. (Not to be confused with HTML’s video element—though unless your page is served as XHTML, technically the browser will interpret it as such.) This is the container for all of your video’s metadata.<redblue-video>
<hvml xmlns="https://hypervideo.tech/hvml#" hidden="hidden">
<video></video>
</hvml>
</redblue-video>video, include a showing with its scope set to release. This tells the HVML parser that the video has been shown to an audience (or will be), and that this showing represents its initial release. For movies shown in a theater, there may be more than one showing, such as at different film festivals, but for online videos, there is typically only one.<redblue-video>
<hvml xmlns="https://hypervideo.tech/hvml#" hidden="hidden">
<video>
<showing scope="release"></showing>
</video>
</hvml>
</redblue-video>showing, include a venue with its type set to site. This tells the HVML parser where this showing takes place; in this case, a website.<redblue-video>
<hvml xmlns="https://hypervideo.tech/hvml#" hidden="hidden">
<video>
<showing scope="release">
<venue type="site"></venue>
</showing>
</video>
</hvml>
</redblue-video>venue, include a uri with text matching the appropriate pattern for a third-party video link. The appropriate embed code will be automatically generated and inserted depending on the link pattern.//www.youtube.com/watch?v=.//vimeo.com/.<redblue-video>
<hvml xmlns="https://hypervideo.tech/hvml#" hidden="hidden">
<video>
<showing scope="release">
<venue type="site">
<uri>https://www.youtube.com/watch?v=nWdWq3hMwao</uri>
</venue>
</showing>
</video>
</hvml>
</redblue-video>
video, include a presentation element. This is the container for instructions telling the HVML parser how to present a video on playback.<redblue-video>
<hvml xmlns="https://hypervideo.tech/hvml#" hidden="hidden">
<video>
<showing scope="release">
<venue type="site">
<uri>https://www.youtube.com/watch?v=nWdWq3hMwao</uri>
</venue>
</showing>
<presentation></presentation>
</video>
</hvml>
</redblue-video>presentation, include a choice element for each hotspot you want to create.<redblue-video>
<hvml xmlns="https://hypervideo.tech/hvml#" hidden="hidden">
<video>
<showing scope="release">
<venue type="site">
<uri>https://www.youtube.com/watch?v=nWdWq3hMwao</uri>
</venue>
</showing>
<presentation>
<choice></choice>
</presentation>
</video>
</hvml>
</redblue-video>choice, include a name specifying the hotspot’s link text. In the XML serialization of HVML, This can directly include HTML markup. However, a tags are not supported, as the hotspot will be generated as an a tag itself in the final product.<redblue-video>
<hvml xmlns="https://hypervideo.tech/hvml#" hidden="hidden">
<video>
<showing scope="release">
<venue type="site">
<uri>https://www.youtube.com/watch?v=nWdWq3hMwao</uri>
</venue>
</showing>
<presentation>
<choice>
<name>Go to: <code>hugh.today/2016-09-17/live</code> for the full stream</name>
</choice>
</presentation>
</video>
</hvml>
</redblue-video>choice, include a goto, which specifies a hyperlink action to perform.on attribute to duration, which specifies that this hotspot is triggered by the viewer arriving at a specific duration range in the timeline.xlink:href attribute to the URL you wish to link to.xlink:actuate attribute to onRequest, which specifies that the link should be activated when clicked or tapped on, rather than automatically.hvml element.<redblue-video>
<hvml xmlns="https://hypervideo.tech/hvml#" xmlns:xlink="http://www.w3.org/1999/xlink" hidden="hidden">
<video>
<showing scope="release">
<venue type="site">
<uri>https://www.youtube.com/watch?v=nWdWq3hMwao</uri>
</venue>
</showing>
<presentation>
<choice>
<name>Go to: <code>hugh.today/2016-09-17/live</code> for the full stream</name>
<goto on="duration" xlink:actuate="onRequest" xlink:href="https://www.facebook.com/hugh.guiney/videos/10100195051457860/"></goto>
</choice>
</presentation>
</video>
</hvml>
</redblue-video>goto, include an animate element for every transition from one state to another that you want the hotspot to go through.startTime and endTime attributes to the video times in seconds you want the transition to start and end respectively.startX and endX attributes to the x-axis coordinates, specified as a percentage relative to the video container starting from the left, that you want the transition to start at and move to respectively.startY and endY attributes to the y-axis coordinates, specified as a percentage relative to the video container starting from the bottom, that you want the transition to start at and move to respectively.<redblue-video>
<hvml xmlns="https://hypervideo.tech/hvml#" xmlns:xlink="http://www.w3.org/1999/xlink" hidden="hidden">
<video>
<showing scope="release">
<venue type="site">
<uri>https://www.youtube.com/watch?v=nWdWq3hMwao</uri>
</venue>
</showing>
<presentation>
<choice>
<name>Go to: <code>hugh.today/2016-09-17/live</code> for the full stream</name>
<goto on="duration" xlink:actuate="onRequest" xlink:href="https://www.facebook.com/hugh.guiney/videos/10100195051457860/">
<animate startTime="517.292107" endTime="518.872131" startX="14.9%" startY="-15%" endX="15%" endY="10%"></animate>
<animate startTime="523.373882" endTime="524.873404" startX="14.9%" startY="10%" endX="15%" endY="-15%"></animate>
</goto>
</choice>
</presentation>
</video>
</hvml>
</redblue-video>