Metadata API
The contents of this page are still in development and may change.
- 1 Metadata Models
- 2 Constants
- 3 Methods
- 3.1 Metadata
- 3.2 HTML output
- 3.3 options
- 3.4 HTML output
Metadata Models
Video metadata model
{
url: "path/to/video.mp4",
highContrast: true,
signLanguage: true,
flashing: "flashing", // noFlashing, unknown are alternatives
captions: [{
src: "path/to/captions.srt",
language: "en" // language code
}],
audio: "available", // unavailable, unknown are alternatives
audioKeywords: ["dialogue", "soundtrack", "sound effect"]
} Constants
Constant | Value |
|---|---|
fluid.metadata.itemtype.VIDEO_OBJECT |
Methods
h3. fluid.metadata.writer
argument | values | description |
|---|---|---|
container | jQuery Element | The element to add the meta tags inside. This will automatically apply an itemscope to the container. |
metadata | object | Keys will be used as the itemprop, while values will be assigned to the contents property of a metatag.
Metadata{
accessMode: ["audio", "visual"],
keywords: ["dialog", "soundtrack"]
}HTML output <meta itemprop="accessMode" content="audio">
<meta itemprop="accessMode" content="visual">
<meta itemprop="keywords" content="dialog">
<meta itemprop="keywords" content="soundtrack"> |
options | object
| Possible key/value pairs: itemtype: A url representing the schema.org type. If null is passed in, no type will be added. itemprop: A string options{
itemtype: "http://schema.org/VideoObject",
itemprop: "video"
} HTML output<div itemscope itemprop="video" itemtype="http://schema.org/VideoObject">
...
</div> |