# 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

### 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.

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.

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.

see type

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)

not implemented

#### label

track

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?

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?

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