One of a series of test instances for migrating the Koha Wiki MediaWiki database.
For the current Koha Wiki, visit https://wiki.koha-community.org .HTML5 Media RFC
Support for HTML5 media elements <video>, <audio> and <track>
Description
HTML5 allows embedding audio and video content directly into HTML files. This enhancement gives you the option of showing a HTML5 media player in a new tab "HTML5 Media" on opac-detail.pl to play files catalogued in 856 (MARC21/UNIMARC).
The bug number for this enhancement is 8377.
Elements supported by most browsers
<video> for video content <audio> for audio content
Elements not widely supported yet
<track> for subtitles, chapters, metadata
Attributes
The <video>, <audio> and <track> tags support different attributes. Here are brief descriptions, examples and proposed 856 subfields. Please note that not all these attributes need to be given to play a file. Basically an URL and a mime type is enough.
src
video, audio, track
"The src content attribute on media elements gives the address of the media resource (video, audio) to show."[1]
It can either come directly from 856$u or be constructed from $a $d $f. Additional fields may be used, see below.
Proposed subfields
856$a Host + / +$d Path + / + $f File
856$u Unified Resource Locator
URL construction
If subfield a, d and f are given, these are used to construct the URL for the src attribute. Protocol, username, password, port will be used if given in the appropriate fields. Protocol default if unspecified is http.
Protocol + '://' [+ Logon + ':' + Password + '@'] + Host [+ ':' + Port] + '/' + Path + '/' + File
If subfield u is given, it is used as is to construct the URL used with the src attribute. No other fields are used. Protocol, possible username, password or port specifications are expected inside the URL in subfield u. Subfields a, d, f are not used in this case.
Status
implemented
type
video, audio, track
Description
A file's content type. It can contain the mime type and the codecs used to compress video and audio of the file. See codecs for further information.
Examples
The most common combinations for video are
type='video/webm; codecs="vp8, vorbis"'
type='video/ogg; codecs="theora, vorbis"'
type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'
You can see that mp4 is the most complicated of these three options because you have to specify versions of the codecs. It is also the most problematic because h.264 belongs to the MPEG-LA, a consortium whose formats you should try to avoid because of patent/licensing issues. For these reasons there are no default settings for mp4 in the patch at this point.
Defaults
Use subfield q. If that is not defined, use codecs and/ or file extension.
oga | type='audio/ogg; codecs="vorbis"' | |
ogg | type='audio/ogg; codecs="vorbis"' | (if codec 'vorbis') |
spx | type='audio/ogg; codecs="speex"' | |
opus | type='audio/ogg; codecs="opus"' | |
ogv | type='video/ogg; codecs="theora, vorbis"' | |
webm | type='audio/webm; codecs="vorbis"' | (if codec '^vorbis$') |
webm | type='video/webm; codecs="vp8, vorbis"' | |
vtt | type='text/vtt' |
This does not reflect the status of the patch 100% atm. File extensions are correct though
Proposed subfield
856$q Electronic format type
Status
implemented
codecs
video, audio
Description
The codecs attribute is used to specify the video and/ or audio compression of the file. This may be helpful for the browser to decide on the way how to play the file. In case of a single video file, there should be the codecs given for both the video and the audio file.
Examples
see type
Proposed subfield
856$c Compression information
Status
implemented
default
Description
Play this src by default. <track> in Chromium only works when default is set.
Proposed subfield
? 856$x Non-Public note ?
Status
not implemented
kind
(video, audio), track
Description
Defines the contents of the element. There are different values for different types of elements. As of June 2012, only the values for the track element are part of the w3.org standard.
Values
Value | Video | Audio | Track |
---|---|---|---|
Main | X | X | - |
Alternative | X | X | - |
Commentary | X | X | - |
Description | - | X | X |
Captions | X | - | X |
Subtitles | X | - | X |
Translation | - | X | - |
Sign | - | - | X |
"" | X | X | ? |
Proposed subfield
MARC21: 856$3 Materials specified
or 856$z Public note? (MARC agnostic)
Status
not implemented
label
track
Proposed subfield
MARC21: 856$y Link text
MARC21 only! UNIMARC field is different in this case. Proposal for UNIMARC: use Filename as label
Status
not implemented
srclang
track
Description
- needs non-standard cataloguing with seperate 041 fields per stream
- needs additional checking of 041/ $8 fields
- probably too exotic
- would be easier to put language in the \emph{label} field
- what are use cases of srclang? more advanced players? javascript interaction?
Proposed subfield
n/a
Possible solution
856$8 Link to resp. 041$a or 041$j
The 856$a field could be linked to the respective 041 subfield. To do this it would be neccessary to catalogue each language in its own 041 field.
Will not be in initial patch. Would people use this?
Status
not implemented
Table: MARC21 / UNIMARC / HTML5 Summary
Field | MARC21 | UNIMARC | HTML5 |
---|---|---|---|
Ind1 | Access method | Access method | Protocol |
856$a | Host name | Host name | Host |
856$c | Compression information | Compression information | Codecs |
856$d | Path | Path | Path |
856$f | Electronic name | Electronic name | File |
856$h | Processor of request | Processor of request | Username |
856$k | Password | Password | Password |
856$l | Logon | Logon/Login | Username |
856$p | Port | Port | Port |
856$q | Electronic format type | Electronic format type | Mime |
856$u | URL | URL | URL |
856$x | Non-public note | Non-public note | ? |
856$y | Link text | Label | |
Access method (see Ind1) | Protocol | ||
856$z | Public note | Public note | ? |
856$2 | Access method (see Ind1) | --- | Protocol |
856$3 | Materials specified | --- | Kind |
856$8 | Link | --- | ? |
Missing
kind (here MARC21 only)
label (here MARC21 only, see proposal)
default
srclang (see proposal)
Not used
856$x Non-public note
856$z Public note
For the sake of completeness and to be MARC agnostic I think I would like to use Non-public note for default and Public note for kind even though the choice seems very arbitrary.
Proposed sysprefs
HTML5MediaEnabled
turn feature on or off
HTML5MediaExtensions
list of extensions to use with <video>, <audio>, <track> tags, seperated by |, default: webm|ogv|oga|ogg
Relevant HTML5 documentation
w3.org
http://www.w3.org/TR/html5/media-elements.html
http://www.w3.org/TR/html5/the-video-element.html now >> http://www.w3.org/wiki/HTML/Elements/video
http://www.w3.org/TR/html5/the-audio-element.html now >> http://www.w3.org/wiki/HTML/Elements/audio
http://www.w3.org/TR/html5/the-track-element.html now >> http://www.w3.org/wiki/HTML/Elements/track
WHATWG
Other
Home
Home
Home
Home
Home
Koha > Technical > Development
Koha > Technical > Development > RFCs
Koha > Technical > Development > RFCs > Koha components for RFCs
Koha > Technical > Development > RFCs > Koha components for RFCs > Library System Modules RFCs
Koha > Technical > Development > RFCs > Koha components for RFCs > Library System Modules RFCs > Catalogue RFCs > OPAC RFCs