You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1404 lines
72 KiB
1404 lines
72 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<!--
|
|
******* WARNING *********************************************************
|
|
This document was automatically generated using the Re-Spec specification
|
|
publishing system. Edits made here will be lost when it is regenerated
|
|
and chances are high that the editor will do something quite unpleasant
|
|
to you should that happen.
|
|
******* WARNING *********************************************************
|
|
-->
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
<title>Media Access Events</title>
|
|
<link rel="stylesheet" href="respec-w3c.css" type="text/css" />
|
|
<link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-WD" type="text/css" />
|
|
<meta name="revision" content="$Id: Overview.html,v 1.4 2006/10/12 17:47:44 dean Exp $" />
|
|
</head>
|
|
<body><div class="head"><p><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" width="72" height="48" alt="W3C" /></a></p><h1 class="head">Media Access Events</h1><h2 id="pagesubtitle">W3C Working Draft <em>13 October 2006</em></h2>
|
|
<dl><dt>This version:</dt>
|
|
<dd><a href="http://www.w3.org/TR/2006/WD-MediaAccessEvents-20061013/">http://www.w3.org/TR/2006/WD-MediaAccessEvents-20061013/</a></dd>
|
|
<dt>Latest version:</dt>
|
|
<dd><a href="http://www.w3.org/TR/MediaAccessEvents/">http://www.w3.org/TR/MediaAccessEvents/</a></dd>
|
|
<dt>Editors:</dt>
|
|
<dd><span class="person">Ola Andersson (<a href="http://www.ikivo.com/">Ikivo</a>) <<a href="mailto:ola.andersson@ikivo.com">ola.andersson@ikivo.com</a>></span></dd><dd><span class="person">Jean-Claude Dufourd (<a href="http://www.streamezzo.com/">Streamezzo</a>) <<a href="mailto:jean-claude.dufourd@streamezzo.com">jean-claude.dufourd@streamezzo.com</a>></span></dd><dd><span class="person">Roland Lundblad (<a href="http://www.ikivo.com/">Ikivo</a>) <<a href="mailto:roland.lundblad@ikivo.com">roland.lundblad@ikivo.com</a>></span></dd></dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©2006
|
|
<a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup>
|
|
(<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>,
|
|
<a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
|
|
<a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C
|
|
<a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
|
|
<a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
|
|
<a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
|
|
</p></div><hr />
|
|
|
|
|
|
|
|
<h2 id="specabstract">Abstract</h2><div class="section">
|
|
|
|
<p>
|
|
This specification defines a set of DOM 3 Events [<cite><a href="#DOM3EV" class="bibref">DOM3EV</a></cite>] compatible events and DOM APIs related to
|
|
media access. The defined events and APIs enables detailed monitoring of media stream buffering and initialization.
|
|
They are designed to be easily combined with the SVG Tiny 1.2 [<cite><a href="#SVGT12" class="bibref">SVGT12</a></cite>] uDOM but can equally well be combined
|
|
with other, larger DOM APIs.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="section"><h2 id="sotd">Status of this Document</h2>
|
|
|
|
|
|
|
|
<p>
|
|
<em>This section describes the status of this document at the time of its publication.
|
|
Other documents may supersede this document. A list of current <acronym title="World Wide Web Consortium">W3C</acronym> publications and the
|
|
latest revision of this technical report can be found in the
|
|
<a href="http://www.w3.org/TR/"><acronym title="World Wide Web Consortium">W3C</acronym>
|
|
technical reports index</a> at http://www.w3.org/TR/.</em>
|
|
</p>
|
|
|
|
<p>This is a First Public Working Draft of "Media Access Events".</p>
|
|
<p class="custom">This specification has been released for public feedback regarding the
|
|
overall design and functionality; in particular, whether it meets the
|
|
needs of OMA, ISO SC 29, SVG, and SMIL for event-driven access to streaming
|
|
media. It should not be implemented at this stage.</p>
|
|
<p>
|
|
This document was developed by the <a href="http://www.w3.org/Graphics/SVG/">SVG
|
|
<acronym title="Working Group">WG</acronym></a> as part of the <acronym title="World Wide Web Consortium">W3C</acronym>
|
|
<a href="http://www.w3.org/Graphics/Activity">Graphics Activity</a>.
|
|
The Working Group expects to advance this Working Draft to Recommendation Status.
|
|
</p>
|
|
<p>
|
|
Web content and browser developers are encouraged to review this draft.
|
|
Please send comments to <a href="mailto:www-svg@w3.org">www-svg@w3.org</a>,
|
|
the public email list for issues related to SVG.
|
|
<a href="http://lists.w3.org/Archives/Public/www-svg/">Archives</a> of the
|
|
list are available.
|
|
</p>
|
|
|
|
<p>
|
|
Publication as a Working Draft does not imply endorsement by the <acronym title="World Wide Web Consortium">W3C</acronym> Membership.
|
|
This is a draft document and may be updated, replaced or obsoleted by other
|
|
documents at any time. It is inappropriate to cite this document as other than
|
|
work in progress.
|
|
</p>
|
|
|
|
<p>This document was produced by a group operating under the
|
|
<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
|
|
February 2004 <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>.
|
|
<acronym title="World Wide Web Consortium">W3C</acronym> maintains a <a rel="disclosure" href="http://www.w3.org/2004/01/pp-impl/19480/status">public list of any
|
|
patent disclosures</a> made in connection with the
|
|
deliverables of the group; that page also includes
|
|
instructions for disclosing a patent.
|
|
An individual who has actual knowledge of a patent which the
|
|
individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the
|
|
information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the <acronym title="World Wide Web Consortium">W3C</acronym> Patent Policy</a>.</p>
|
|
|
|
</div>
|
|
|
|
<div class="section"><h2 id="contents">Table of Contents</h2>
|
|
|
|
|
|
<ul class="toc"><li><a href="#introduction">1. Introduction</a></li><li><a href="#definitions">2. Definitions</a></li><li><a href="#stateChart">3. State chart</a></li><li><a href="#MediaAccessEvent-if">4. The MediaAccessEvent interface</a></li><li><a href="#MediaStreamInfo-if">5. The MediaStreamInfo interface</a></li><li><a href="#MediaStreamInfoList-if">6. The MediaStreamInfoList interface</a></li><li><a href="#conform">7. Conformance</a></li><li><a href="#example">8. Examples of usage</a></li><li><ul class="toc"><li><a href="#example-1">8.1. Simple state information display</a></li><li><a href="#example-2">8.2. Buffering progress bar</a></li><li><a href="#example-3">8.3. Stream info box</a></li></ul></li><li><a href="#ack">9. Acknowledgements</a></li></ul><ul class="toc"><li><a href="#bibref">A. References</a></li></ul>
|
|
</div>
|
|
|
|
<div class="section"><h2 id="introduction">1. Introduction</h2><p><strong>This section is informative.</strong></p>
|
|
|
|
<p>
|
|
Streamable media, such as audio and video, is streamed over the network and is processed on the client as it
|
|
arrives.
|
|
This leads to different behaviour compared to downloaded media. The client normally holds a buffer where it
|
|
stores part
|
|
of the media prior to processing it. The state of this buffer affects the client. For example, if the buffer
|
|
fills too slowly
|
|
in relation to client processing the client will have to stall processing while it waits for the buffer to
|
|
fill. It is
|
|
often of interest to monitor the state of the buffer and client, and the purpose of correlating
|
|
media access
|
|
events introduced in this specification is to facilitate such monitoring.
|
|
Initialising a
|
|
<a class="term" href="#dfn-session">session</a>
|
|
containing one or several media streams often takes a considerable
|
|
amount of time.
|
|
The author may wish to give the user some feedback that this setup is in progress and, when setup is done,
|
|
present information of the available media streams.
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="section"><h2 id="definitions">2. Definitions</h2>
|
|
|
|
<p>The Media Access Events
|
|
<dfn id="dfn-namespace">namespace</dfn>
|
|
is
|
|
<strong>http://www.w3.org/ns/media-access-event#</strong>
|
|
.
|
|
</p>
|
|
<p>The examples in this specification use a namespace prefix of
|
|
<strong>me</strong>
|
|
to denote the Media Access Events
|
|
<a class="term" href="#dfn-namespace">namespace</a>
|
|
.
|
|
</p>
|
|
<p>A
|
|
<dfn id="dfn-session">session</dfn>
|
|
is a set of synchronized streams rendered by a single media element.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="section"><h2 id="stateChart">3. State chart</h2><p><strong>This section is informative.</strong></p>
|
|
|
|
<p>The following state chart illustrates the flow of events generated when streaming a media resource.
|
|
Even if multiple streams are rendered by a single media element within one
|
|
<a class="term" href="#dfn-session">session</a>
|
|
, only one event is fired
|
|
at each stage.
|
|
</p>
|
|
<img src="images/stateChart.png" alt="State chart" />
|
|
|
|
<p>This chart can be explained as follows:</p>
|
|
|
|
<ul>
|
|
<li>The UA goes into the
|
|
<strong>Setting Session</strong>
|
|
state, firing a
|
|
|
|
'<a href="#event-BeginSessionSetup" class="event-name">BeginSessionSetup</a>'
|
|
|
|
event. If a connection request needs to be sent to the server, it is sent during this phase.
|
|
</li>
|
|
|
|
<li>The UA goes into the
|
|
<strong>Session Setup</strong>
|
|
state, firing a
|
|
|
|
'<a href="#event-EndSessionSetup" class="event-name">EndSessionSetup</a>'
|
|
|
|
event, upon completion of the
|
|
<a class="term" href="#dfn-session">session</a>
|
|
set up on the terminal. If the
|
|
<a class="term" href="#dfn-session">session</a>
|
|
setup cannot be completed, the UA goes into the
|
|
<strong>Stopped</strong>
|
|
state and fires a
|
|
|
|
'<a href="#event-Error" class="event-name">Error</a>'
|
|
|
|
event. If a connection to a server was attempted, it was successful.
|
|
</li>
|
|
|
|
<li>The UA goes into the
|
|
<strong>Reception</strong>
|
|
state, firing a
|
|
|
|
'<a href="#event-DataRequest" class="event-name">DataRequest</a>'
|
|
|
|
event, while sending a request for data to the server. If the data request cannot be sent, the UA goes
|
|
into the
|
|
<strong>Stopped</strong>
|
|
state and fires a
|
|
|
|
'<a href="#event-Error" class="event-name">Error</a>'
|
|
|
|
event. While in this state, the UA may fire
|
|
|
|
'<a href="#event-DataReceptionProgress" class="event-name">DataReceptionProgress</a>'
|
|
|
|
events.
|
|
</li>
|
|
|
|
<li>The UA goes into the
|
|
<strong>Reception and Playing</strong>
|
|
state, firing a
|
|
|
|
'<a href="#event-Playable" class="event-name">Playable</a>'
|
|
|
|
event, when enough data has been received to start playing. If the operation is unsuccessful,
|
|
the UA goes into the
|
|
<strong>Stopped</strong>
|
|
state and fires a
|
|
|
|
'<a href="#event-Error" class="event-name">Error</a>'
|
|
|
|
event. While in this state, the UA may fire
|
|
|
|
'<a href="#event-DataReceptionProgress" class="event-name">DataReceptionProgress</a>'
|
|
|
|
events.
|
|
</li>
|
|
|
|
<li>From the
|
|
<strong>Reception and Playing</strong>
|
|
state, the UA may either go into the
|
|
<strong>Playing</strong>
|
|
state, firing a
|
|
|
|
'<a href="#event-EndOfDataReception" class="event-name">EndOfDataReception</a>'
|
|
|
|
event, when the end of the data has arrived, or back into the
|
|
<strong>Reception</strong>
|
|
state, firing a
|
|
|
|
'<a href="#event-NotPlayable" class="event-name">NotPlayable</a>'
|
|
|
|
event if there is not enough data available to continue playing. If the operation is unsuccessful, the
|
|
UA
|
|
goes into the
|
|
<strong>Stopped</strong>
|
|
state and fires a
|
|
|
|
'<a href="#event-Error" class="event-name">Error</a>'
|
|
|
|
event.
|
|
</li>
|
|
|
|
<li>From the
|
|
<strong>Playing</strong>
|
|
state, the UA goes into the
|
|
<strong>Stopped</strong>
|
|
state, firing a
|
|
|
|
'<a href="#event-Stop" class="event-name">Stop</a>'
|
|
|
|
event, at the end of the playing of available data. If the operation is unsuccessful, the UA
|
|
goes into the
|
|
<strong>Stopped</strong>
|
|
state and fires a
|
|
|
|
'<a href="#event-Error" class="event-name">Error</a>'
|
|
|
|
event.
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="section"><h2 id="MediaAccessEvent-if">4. The MediaAccessEvent interface</h2>
|
|
|
|
<p>
|
|
The Media Access Event module contains basic event types associated with media access. This interface
|
|
inherits from the
|
|
<a href="http://www.w3.org/TR/SVGMobile12/svgudom.html#events__Event">Event</a>
|
|
interface in the SVG uDOM [<cite><a href="#SVGT12" class="bibref">SVGT12</a></cite>].
|
|
</p>
|
|
|
|
<div class="boxed"><p><span class="idlTitle">The MediaAccessEvent interface</span></p><pre class="schema" title="The MediaAccessEvent interface">interface <a href="#idl-if-MediaAccessEvent">MediaAccessEvent</a> : events::Event {
|
|
|
|
// MediaAccessEvent
|
|
const unsigned short <a href="#idl-defs-MediaAccessEvent-STATUS_OK">STATUS_OK</a> = 0;
|
|
const unsigned short <a href="#idl-defs-MediaAccessEvent-STATUS_ERROR_ON_SETUP">STATUS_ERROR_ON_SETUP</a> = 1;
|
|
const unsigned short <a href="#idl-defs-MediaAccessEvent-STATUS_ERROR_UNSUPPORTED_MEDIA">STATUS_ERROR_UNSUPPORTED_MEDIA</a> = 2;
|
|
const unsigned short <a href="#idl-defs-MediaAccessEvent-STATUS_ERROR_CORRUPT_STREAM">STATUS_ERROR_CORRUPT_STREAM</a> = 3;
|
|
|
|
readonly attribute boolean <a href="#dfn-bufferlevelvalid">bufferLevelValid</a>;
|
|
readonly attribute unsigned long <a href="#dfn-bufferlevel">bufferLevel</a>;
|
|
readonly attribute float <a href="#dfn-bufferremainingtime">bufferRemainingTime</a>;
|
|
readonly attribute unsigned short <a href="#dfn-status">status</a>;
|
|
DOMString <a href="#dfn-getsessionname">getSessionName</a>();
|
|
<a href="#idl-if-MediaStreamInfoList">MediaStreamInfoList</a> <a href="#dfn-getmediastreams">getMediaStreams</a>();
|
|
};</pre></div><div class="section" id="idl-if-MediaAccessEvent"><div class="section"><h4 class="idl-header" id="idl-defs-MediaAccessEvent">Definition Group <em>MediaAccessEvent</em></h4><dl class="idl-defs"><dt id="idl-defs-MediaAccessEvent-STATUS_OK"><code>STATUS_OK</code></dt><dd>
|
|
No error has occured.
|
|
</dd><dt id="idl-defs-MediaAccessEvent-STATUS_ERROR_ON_SETUP"><code>STATUS_ERROR_ON_SETUP</code></dt><dd>
|
|
Initialization of a
|
|
<a class="term" href="#dfn-session">session</a>
|
|
failed.
|
|
</dd><dt id="idl-defs-MediaAccessEvent-STATUS_ERROR_UNSUPPORTED_MEDIA"><code>STATUS_ERROR_UNSUPPORTED_MEDIA</code></dt><dd>
|
|
One of more of the streams within this
|
|
<a class="term" href="#dfn-session">session</a>
|
|
contains media not supported by the User
|
|
Agent.
|
|
</dd><dt id="idl-defs-MediaAccessEvent-STATUS_ERROR_CORRUPT_STREAM"><code>STATUS_ERROR_CORRUPT_STREAM</code></dt><dd>
|
|
One of more of the streams within this
|
|
<a class="term" href="#dfn-session">session</a>
|
|
is corrupt and playback is stopped.
|
|
</dd></dl></div><div class="section"><h4 class="idl-header" id="idl-meths-MediaAccessEvent">Attributes</h4><dl class="idl-attr"><dt id="dfn-bufferlevel"><code>bufferLevel</code>
|
|
of type
|
|
unsigned long, readonly</dt><dd><p>
|
|
Specifies a percentage value of the current buffer level. This value is only of
|
|
relevance for
|
|
|
|
'<a href="#event-DataReceptionProgress" class="event-name">DataReceptionProgress</a>'
|
|
|
|
events. If the
|
|
<a class="term" href="#dfn-session">session</a>
|
|
contains multiple streams, then the reported value is the minimum
|
|
buffer level over all the streams of the
|
|
<a class="term" href="#dfn-session">session</a>
|
|
.
|
|
</p></dd><dt id="dfn-bufferlevelvalid"><code>bufferLevelValid</code>
|
|
of type
|
|
boolean, readonly</dt><dd><p>
|
|
If
|
|
<code>false</code>
|
|
the buffer level is unknown and the value of
|
|
<code>bufferLevel</code>
|
|
<em class="rfc2119" title="Keyword in RFC 2119 context">SHOULD</em> be ignored.
|
|
</p></dd><dt id="dfn-bufferremainingtime"><code>bufferRemainingTime</code>
|
|
of type
|
|
float, readonly</dt><dd><p>
|
|
Specifies the playing time (in seconds) of the current content of buffer.
|
|
This value is only of relevance for
|
|
|
|
'<a href="#event-DataReceptionProgress" class="event-name">DataReceptionProgress</a>'
|
|
|
|
events. If the
|
|
<a class="term" href="#dfn-session">session</a>
|
|
contains multiple streams, then the reported value is the minimum
|
|
remaining time over all the streams of the
|
|
<a class="term" href="#dfn-session">session</a>
|
|
.
|
|
</p></dd><dt id="dfn-status"><code>status</code>
|
|
of type
|
|
unsigned short, readonly</dt><dd><p>
|
|
Specifies the error that has occured. One of
|
|
<a href="#idl-defs-MediaAccessEvent-STATUS_OK">STATUS_OK</a>
|
|
,
|
|
<a href="#idl-defs-MediaAccessEvent-STATUS_ERROR_ON_SETUP">STATUS_ERROR_ON_SETUP</a>
|
|
,
|
|
<a href="#idl-defs-MediaAccessEvent-STATUS_ERROR_UNSUPPORTED_MEDIA">
|
|
STATUS_ERROR_UNSUPPORTED_MEDIA</a>
|
|
or
|
|
<a href="#idl-defs-MediaAccessEvent-STATUS_ERROR_CORRUPT_STREAM">
|
|
STATUS_ERROR_CORRUPT_STREAM</a>
|
|
<em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be
|
|
<a href="#idl-defs-MediaAccessEvent-STATUS_OK">STATUS_OK</a>
|
|
for every event type except
|
|
|
|
'<a href="#event-Error" class="event-name">Error</a>'
|
|
|
|
.
|
|
</p></dd></dl></div><div class="section"><h4 class="idl-header" id="idl-attrs-MediaAccessEvent">Methods</h4><dl class="idl-meth"><dt id="dfn-getmediastreams"><code>getMediaStreams</code></dt><dd><p>
|
|
Returns information about the different media streams in this
|
|
<a class="term" href="#dfn-session">session</a>
|
|
.
|
|
</p><dl><dt>No Parameters</dt><dt>Return Value</dt><dd><table><tr><td><code></code></td><td>
|
|
The list of streams in this
|
|
<a class="term" href="#dfn-session">session</a>
|
|
.
|
|
</td></tr></table></dd><dt>No Exceptions</dt></dl></dd><dt id="dfn-getsessionname"><code>getSessionName</code></dt><dd><p>
|
|
Returns the name of the media access
|
|
<a class="term" href="#dfn-session">session</a>
|
|
.
|
|
</p><dl><dt>No Parameters</dt><dt>Return Value</dt><dd><table><tr><td><code></code></td><td>
|
|
The media access
|
|
<a class="term" href="#dfn-session">session</a>
|
|
name.
|
|
</td></tr></table></dd><dt>No Exceptions</dt></dl></dd></dl></div></div>
|
|
|
|
<p>The Media Access event types are listed below.</p>
|
|
<p>Even if a state is not relevant to a particular delivery protocol or implementation, the corresponding events
|
|
<em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired. For example, if there is no
|
|
<a class="term" href="#dfn-session">session</a>
|
|
setup phase, then events
|
|
|
|
'<a href="#event-BeginSessionSetup" class="event-name">BeginSessionSetup</a>'
|
|
|
|
,
|
|
|
|
'<a href="#event-EndSessionSetup" class="event-name">EndSessionSetup</a>'
|
|
|
|
and
|
|
|
|
'<a href="#event-DataRequest" class="event-name">DataRequest</a>'
|
|
|
|
<em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired together in that order.
|
|
</p>
|
|
|
|
<div class="event-definition">
|
|
<dl>
|
|
<dt>
|
|
<a name="event-BeginSessionSetup" id="event-BeginSessionSetup"></a>
|
|
<a class="noxref" href="#event-BeginSessionSetup">BeginSessionSetup</a>
|
|
</dt>
|
|
<dd>
|
|
<table summary="This table contains information about the semantics of the given event type" border="0" cellpadding="2" cellspacing="0">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Type</th>
|
|
<td rowspan="1" colspan="1" style="background-color:#cfcfcf">
|
|
<strong>
|
|
<code>BeginSessionSetup</code>
|
|
</strong>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Namespace</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>http://www.w3.org/ns/media-access-event#</code>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Interface</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<a href="#MediaAccessEvent-if">
|
|
<code>MediaAccessEvent</code>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Cancelable</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Bubbles</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Target</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>the media element holding the URL to the delivered content</code>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Context info</th>
|
|
<td rowspan="1" colspan="1" valign="top">none</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>A
|
|
|
|
'<a href="#event-BeginSessionSetup" class="event-name">BeginSessionSetup</a>'
|
|
|
|
event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired at the beginning of a streaming
|
|
<a class="term" href="#dfn-session">session</a>
|
|
.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
|
|
<div class="event-definition">
|
|
<dl>
|
|
<dt>
|
|
<a name="event-EndSessionSetup" id="event-EndSessionSetup"></a>
|
|
<a class="noxref" href="#event-EndSessionSetup">EndSessionSetup</a>
|
|
</dt>
|
|
<dd>
|
|
<table summary="This table contains information about the semantics of the given event type" border="0" cellpadding="2" cellspacing="0">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Type</th>
|
|
<td rowspan="1" colspan="1" style="background-color:#cfcfcf">
|
|
<strong>
|
|
<code>EndSessionSetup</code>
|
|
</strong>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Namespace</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>http://www.w3.org/ns/media-access-event#</code>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Interface</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<a href="#MediaAccessEvent-if">
|
|
<code>MediaAccessEvent</code>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Cancelable</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Bubbles</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Target</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>the media element holding the URL to the delivered content</code>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Context info</th>
|
|
<td rowspan="1" colspan="1" valign="top">none</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>
|
|
An
|
|
|
|
'<a href="#event-EndSessionSetup" class="event-name">EndSessionSetup</a>'
|
|
|
|
event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired after a
|
|
|
|
'<a href="#event-BeginSessionSetup" class="event-name">BeginSessionSetup</a>'
|
|
|
|
event when the initialisation of
|
|
a streaming
|
|
<a class="term" href="#dfn-session">session</a>
|
|
has been completed.
|
|
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<div class="event-definition">
|
|
<dl>
|
|
<dt>
|
|
<a name="event-DataRequest" id="event-DataRequest"></a>
|
|
<a class="noxref" href="#event-DataRequest">DataRequest</a>
|
|
</dt>
|
|
<dd>
|
|
<table summary="This table contains information about the semantics of the given event type" border="1" cellpadding="2" cellspacing="0">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Type</th>
|
|
<td rowspan="1" colspan="1" style="background-color:#cfcfcf">
|
|
<strong>
|
|
<code>DataRequest</code>
|
|
</strong>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Namespace</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>http://www.w3.org/ns/media-access-event#</code>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Interface</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<a href="#MediaAccessEvent-if">
|
|
<code>MediaAccessEvent</code>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Cancelable</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Bubbles</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Target</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>the media element holding the URL to the delivered content</code>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Context info</th>
|
|
<td rowspan="1" colspan="1" valign="top">none</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>
|
|
A
|
|
|
|
'<a href="#event-DataRequest" class="event-name">DataRequest</a>'
|
|
|
|
event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired when the UA sends the request for data to the server.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
|
|
<div class="event-definition">
|
|
<dl>
|
|
<dt>
|
|
<a name="event-Playable" id="event-Playable"></a>
|
|
<a class="noxref" href="#event-Playable">Playable</a>
|
|
</dt>
|
|
<dd>
|
|
<table summary="This table contains information about the semantics of the given event type" border="1" cellpadding="2" cellspacing="0">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Type</th>
|
|
<td rowspan="1" colspan="1" style="background-color:#cfcfcf">
|
|
<strong>
|
|
<code>Playable</code>
|
|
</strong>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Namespace</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>http://www.w3.org/ns/media-access-event#</code>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Interface</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<a href="#MediaAccessEvent-if">
|
|
<code>MediaAccessEvent</code>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Cancelable</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Bubbles</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Target</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>the media element holding the URL to the delivered content</code>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Context info</th>
|
|
<td rowspan="1" colspan="1" valign="top">none</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>
|
|
An
|
|
|
|
'<a href="#event-Playable" class="event-name">Playable</a>'
|
|
|
|
event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired after a
|
|
|
|
'<a href="#event-DataRequest" class="event-name">DataRequest</a>'
|
|
|
|
event when enough data is available to start or resume playing.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
|
|
<div class="event-definition">
|
|
<dl>
|
|
<dt>
|
|
<a name="event-DataReceptionProgress" id="event-DataReceptionProgress"></a>
|
|
<a class="noxref" href="#event-DataReceptionProgress">DataReceptionProgress</a>
|
|
</dt>
|
|
<dd>
|
|
<table summary="This table contains information about the semantics of the given event type" border="1" cellpadding="2" cellspacing="0">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Type</th>
|
|
<td rowspan="1" colspan="1" style="background-color:#cfcfcf">
|
|
<strong>
|
|
<code>DataReceptionProgress</code>
|
|
</strong>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Namespace</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>http://www.w3.org/ns/media-access-event#</code>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Interface</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<a href="#MediaAccessEvent-if">
|
|
<code>MediaAccessEvent</code>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Cancelable</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Bubbles</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Target</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>the media element holding the URL to the delivered content</code>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Context info</th>
|
|
<td rowspan="1" colspan="1" valign="top">none</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>
|
|
The User Agent <em class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> dispatch
|
|
|
|
'<a href="#event-DataReceptionProgress" class="event-name">DataReceptionProgress</a>'
|
|
|
|
when data is being received. Information on the current buffer level <em class="rfc2119" title="Keyword in RFC 2119 context">SHOULD</em> be
|
|
available.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
|
|
<div class="event-definition">
|
|
<dl>
|
|
<dt>
|
|
<a name="event-NotPlayable" id="event-NotPlayable"></a>
|
|
<a class="noxref" href="#event-NotPlayable">NotPlayable</a>
|
|
</dt>
|
|
<dd>
|
|
<table summary="This table contains information about the semantics of the given event type" border="1" cellpadding="2" cellspacing="0">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Type</th>
|
|
<td rowspan="1" colspan="1" style="background-color:#cfcfcf">
|
|
<strong>
|
|
<code>NotPlayable</code>
|
|
</strong>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Namespace</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>http://www.w3.org/ns/media-access-event#</code>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Interface</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<a href="#MediaAccessEvent-if">
|
|
<code>MediaAccessEvent</code>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Cancelable</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Bubbles</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Target</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>the media element holding the URL to the delivered content</code>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Context info</th>
|
|
<td rowspan="1" colspan="1" valign="top">none</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>
|
|
An
|
|
|
|
'<a href="#event-NotPlayable" class="event-name">NotPlayable</a>'
|
|
|
|
event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired when not enough data is available to continue playing.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
|
|
<div class="event-definition">
|
|
<dl>
|
|
<dt>
|
|
<a name="event-EndOfDataReception" id="event-EndOfDataReception"></a>
|
|
<a class="noxref" href="#event-EndOfDataReception">EndOfDataReception</a>
|
|
</dt>
|
|
<dd>
|
|
<table summary="This table contains information about the semantics of the given event type" border="1" cellpadding="2" cellspacing="0">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Type</th>
|
|
<td rowspan="1" colspan="1" style="background-color:#cfcfcf">
|
|
<strong>
|
|
<code>EndOfDataReception</code>
|
|
</strong>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Namespace</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>http://www.w3.org/ns/media-access-event#</code>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Interface</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<a href="#MediaAccessEvent-if">
|
|
<code>MediaAccessEvent</code>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Cancelable</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Bubbles</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Target</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>the media element holding the URL to the delivered content</code>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Context info</th>
|
|
<td rowspan="1" colspan="1" valign="top">none</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>
|
|
An
|
|
|
|
'<a href="#event-EndOfDataReception" class="event-name">EndOfDataReception</a>'
|
|
|
|
event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired when the data reception has finished.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
|
|
<div class="event-definition">
|
|
<dl>
|
|
<dt>
|
|
<a name="event-Stop" id="event-Stop"></a>
|
|
<a class="noxref" href="#event-Stop">Stop</a>
|
|
</dt>
|
|
<dd>
|
|
<table summary="This table contains information about the semantics of the given event type" border="1" cellpadding="2" cellspacing="0">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Type</th>
|
|
<td rowspan="1" colspan="1" style="background-color:#cfcfcf">
|
|
<strong>
|
|
<code>Stop</code>
|
|
</strong>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Namespace</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>http://www.w3.org/ns/media-access-event#</code>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Interface</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<a href="#MediaAccessEvent-if">
|
|
<code>MediaAccessEvent</code>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Cancelable</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Bubbles</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Target</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>the media element holding the URL to the delivered content</code>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Context info</th>
|
|
<td rowspan="1" colspan="1" valign="top">none</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>
|
|
A
|
|
|
|
'<a href="#event-Stop" class="event-name">Stop</a>'
|
|
|
|
event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired when the data reception has finished and all received data has been
|
|
presented.
|
|
</p>
|
|
<p>
|
|
An
|
|
|
|
'<a href="#event-Stop" class="event-name">Stop</a>'
|
|
|
|
event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired when an end condition has been met within the media element, e.g.
|
|
one expression in the end attribute has become true or endElement() has been called on the media
|
|
element. In that case, the
|
|
|
|
'<a href="#event-Stop" class="event-name">Stop</a>'
|
|
|
|
event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be sent before the endEvent to be dispatched
|
|
from the media element.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
|
|
<div class="event-definition">
|
|
<dl>
|
|
<dt>
|
|
<a name="event-Error" id="event-Error"></a>
|
|
<a class="noxref" href="#event-Error">Error</a>
|
|
</dt>
|
|
<dd>
|
|
<table summary="This table contains information about the semantics of the given event type" border="1" cellpadding="2" cellspacing="0">
|
|
<tbody>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Type</th>
|
|
<td rowspan="1" colspan="1" style="background-color:#cfcfcf">
|
|
<strong>
|
|
<code>Error</code>
|
|
</strong>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Namespace</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>http://www.w3.org/ns/media-access-event#</code>
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Interface</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<a href="#MediaAccessEvent-if">
|
|
<code>MediaAccessEvent</code>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Cancelable</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Bubbles</th>
|
|
<td rowspan="1" colspan="1" valign="top">Yes</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Target</th>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<code>the media element holding the URL to the delivered content</code>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="1" colspan="1">Context info</th>
|
|
<td rowspan="1" colspan="1" valign="top">none</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>
|
|
An
|
|
|
|
'<a href="#event-Error" class="event-name">Error</a>'
|
|
|
|
event <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be fired when an error occurs. The error code provides information about which kind
|
|
of error has occured.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<p>There <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> be at most one event of each of the following types sent within one
|
|
<a class="term" href="#dfn-session">session</a>
|
|
:
|
|
|
|
'<a href="#event-BeginSessionSetup" class="event-name">BeginSessionSetup</a>'
|
|
|
|
,
|
|
|
|
'<a href="#event-EndSessionSetup" class="event-name">EndSessionSetup</a>'
|
|
|
|
,
|
|
|
|
'<a href="#event-DataRequest" class="event-name">DataRequest</a>'
|
|
|
|
,
|
|
|
|
'<a href="#event-EndOfDataReception" class="event-name">EndOfDataReception</a>'
|
|
|
|
,
|
|
|
|
'<a href="#event-Stop" class="event-name">Stop</a>'
|
|
|
|
,
|
|
|
|
'<a href="#event-Error" class="event-name">Error</a>'
|
|
|
|
</p>
|
|
<p>There <em class="rfc2119" title="Keyword in RFC 2119 context">MAY</em> be more than one event of each of the following types sent within one
|
|
<a class="term" href="#dfn-session">session</a>
|
|
:
|
|
|
|
'<a href="#event-DataReceptionProgress" class="event-name">DataReceptionProgress</a>'
|
|
|
|
,
|
|
|
|
'<a href="#event-Playable" class="event-name">Playable</a>'
|
|
|
|
,
|
|
|
|
'<a href="#event-NotPlayable" class="event-name">NotPlayable</a>'
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="section"><h2 id="MediaStreamInfo-if">5. The MediaStreamInfo interface</h2>
|
|
|
|
<p>
|
|
The
|
|
<a href="#idl-if-MediaStreamInfo" class="if-name">MediaStreamInfo</a>
|
|
interface stores information about a media stream.
|
|
</p>
|
|
|
|
<div class="boxed"><p><span class="idlTitle">The MediaStreamInfo interface</span></p><pre class="schema" title="The MediaStreamInfo interface">interface <a href="#idl-if-MediaStreamInfo">MediaStreamInfo</a> {
|
|
readonly attribute DOMString <a href="#dfn-mediatype">mediaType</a>;
|
|
readonly attribute DOMString <a href="#dfn-transport">transport</a>;
|
|
readonly attribute DOMString <a href="#dfn-format">format</a>;
|
|
};</pre></div><div class="section" id="idl-if-MediaStreamInfo"><div class="section"><h4 class="idl-header" id="idl-meths-MediaStreamInfo">Attributes</h4><dl class="idl-attr"><dt id="dfn-format"><code>format</code>
|
|
of type
|
|
DOMString, readonly</dt><dd><p>
|
|
The format of the media in this stream. E.g. "H264". This attribute <em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em> match
|
|
the format as specified by
|
|
<a href="http://www.iana.org/">IANA</a>
|
|
,
|
|
<a href="http://www.iana.org/assignments/media-types/">see
|
|
listing</a>
|
|
[<cite><a href="#MIME-Media-Types" class="bibref">MIME-Media-Types</a></cite>].
|
|
</p></dd><dt id="dfn-mediatype"><code>mediaType</code>
|
|
of type
|
|
DOMString, readonly</dt><dd><p>
|
|
The type of media in this stream, e.g. "video" or "audio". [Editor's note: this wording is
|
|
under discussion]
|
|
</p></dd><dt id="dfn-transport"><code>transport</code>
|
|
of type
|
|
DOMString, readonly</dt><dd><p>
|
|
The protocol this stream is being delivered over, e.g. "RTP" or "HTTP". [Editor's note: this wording is
|
|
under discussion]
|
|
</p></dd></dl></div></div>
|
|
</div>
|
|
|
|
|
|
<div class="section"><h2 id="MediaStreamInfoList-if">6. The MediaStreamInfoList interface</h2>
|
|
|
|
<p>
|
|
Returns the
|
|
<code>index</code>
|
|
th item in the collection. If
|
|
<code>index</code>
|
|
is greater than or equal to the
|
|
number of
|
|
<a href="#idl-if-MediaStreamInfo" class="if-name">MediaStreamInfo</a>
|
|
s in the list, this returns
|
|
<code>null</code>
|
|
.
|
|
</p>
|
|
|
|
<div class="boxed"><p><span class="idlTitle">The MediaStreamInfoList interface</span></p><pre class="schema" title="The MediaStreamInfoList interface">interface <a href="#idl-if-MediaStreamInfoList">MediaStreamInfoList</a> {
|
|
readonly attribute unsigned long <a href="#dfn-length">length</a>;
|
|
<a href="#idl-if-MediaStreamInfo">MediaStreamInfo</a> <a href="#dfn-item">item</a>(in unsigned long index);
|
|
};</pre></div><div class="section" id="idl-if-MediaStreamInfoList"><div class="section"><h4 class="idl-header" id="idl-meths-MediaStreamInfoList">Attributes</h4><dl class="idl-attr"><dt id="dfn-length"><code>length</code>
|
|
of type
|
|
unsigned long, readonly</dt><dd><p>
|
|
Returns the
|
|
<code>number</code>
|
|
of items in the collection.
|
|
</p></dd></dl></div><div class="section"><h4 class="idl-header" id="idl-attrs-MediaStreamInfoList">Methods</h4><dl class="idl-meth"><dt id="dfn-item"><code>item</code></dt><dd><p>
|
|
Returns the
|
|
<code>index</code>
|
|
th item in the collection. If
|
|
<code>index</code>
|
|
is greater than or equal
|
|
to the number of
|
|
<a href="#idl-if-MediaStreamInfo" class="if-name">MediaStreamInfo</a>
|
|
s in the list, this returns
|
|
<code>null</code>
|
|
.
|
|
</p><dl><dt>Parameters</dt><dd class="idl-params"><dl><dt><code>index</code>
|
|
of type
|
|
unsigned long</dt><dd>
|
|
Index into the collection.
|
|
</dd></dl></dd><dt>Return Value</dt><dd><table><tr><td><code></code></td><td>
|
|
The
|
|
<a href="#idl-if-MediaStreamInfo" class="if-name">MediaStreamInfo</a>
|
|
at the
|
|
<code>index</code>
|
|
th position in the
|
|
<a href="#idl-if-MediaStreamInfoList" class="if-name">MediaStreamInfoList</a>
|
|
,
|
|
or
|
|
<code>null</code>
|
|
if that is not a valid
|
|
<code>index</code>
|
|
.
|
|
</td></tr></table></dd><dt>No Exceptions</dt></dl></dd></dl></div></div>
|
|
</div>
|
|
|
|
<div class="section"><h2 id="conform">7. Conformance</h2>
|
|
|
|
<p>
|
|
The key words "<em class="rfc2119" title="Keyword in RFC 2119 context">MUST</em>", "<em class="rfc2119" title="Keyword in RFC 2119 context">MUST NOT</em>", "<em class="rfc2119" title="Keyword in RFC 2119 context">REQUIRED</em>", "<em class="rfc2119" title="Keyword in RFC 2119 context">SHALL</em>", "<em class="rfc2119" title="Keyword in RFC 2119 context">SHALL NOT</em>", "<em class="rfc2119" title="Keyword in RFC 2119 context">SHOULD</em>", "<em class="rfc2119" title="Keyword in RFC 2119 context">SHOULD NOT</em>",
|
|
"<em class="rfc2119" title="Keyword in RFC 2119 context">RECOMMENDED</em>", "<em class="rfc2119" title="Keyword in RFC 2119 context">MAY</em>", and "<em class="rfc2119" title="Keyword in RFC 2119 context">OPTIONAL</em>" in this document are to be interpreted as described in
|
|
RFC 2119 [<cite><a href="#RFC2119" class="bibref">RFC2119</a></cite>].
|
|
</p>
|
|
<p>
|
|
Unless otherwise specified immediately following the header, all sections in this
|
|
document - to the exclusion of examples which are all informative - are normative.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="section"><h2 id="example">8. Examples of usage</h2><p><strong>This section is informative.</strong></p>
|
|
|
|
<p>Three examples to illustrate the usage of streaming events.</p>
|
|
|
|
<div class="section"><h3 id="example-1">8.1. Simple state information display</h3>
|
|
|
|
<p>The following example shows the streaming of video. When the playback of the video is stalled due to
|
|
network congestion, a simple text is displayed. When the playback resumes, the text is removed.</p>
|
|
<div class="boxed"><div><span class="exampleTitle">Example: Using MediaAccessEvents in SVG to display a simple message</span></div><pre class="example" title="Using MediaAccessEvents in SVG to display a simple message"><svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"
|
|
xmlns:se="http://www.w3.org/ns/media-access-event#" width="100%" height="100%"
|
|
viewBox="0 0 400 300">
|
|
<video id="exampleMovie" type="video/h264" xlink:href="rtsp://example.org/movies/exampleMovie.sdp"
|
|
x="0" y="0" width="400" height="300"/>
|
|
<text display="none" id="information" fill="white" x="50" y="50" font-size="30">
|
|
<set attributeName="display" to="inline" begin="exampleMovie.NotPlayable" fill="freeze"/>
|
|
<set attributeName="display" to="none" begin="exampleMovie.Playable" fill="freeze"/>
|
|
Buffering
|
|
</text>
|
|
</svg></pre></div>
|
|
</div>
|
|
|
|
<div class="section"><h3 id="example-2">8.2. Buffering progress bar</h3>
|
|
|
|
<p>The following example shows streaming of video within svg. When playback of the video is stalled due to a
|
|
lack
|
|
of video data a progress bar is displayed. The progress bar indicates how much buffering that is needed
|
|
before
|
|
playback can be resumed. The example is not runnable as is since the intention is to show an example of
|
|
using
|
|
streaming events, not to give a complete svg example.</p>
|
|
<div class="boxed"><div><span class="exampleTitle">Example: Using MediaAccessEvents in SVG to display a buffering progress bar</span></div><pre class="example" title="Using MediaAccessEvents in SVG to display a buffering progress bar"><svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"
|
|
xmlns:se="http://www.w3.org/ns/media-access-event#">
|
|
<script type="application/ecmascript"><![CDATA[
|
|
function initSetup (evt) {
|
|
var setupAnimation = document.getElementById('setupAnimation');
|
|
setupAnimation.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "visible");
|
|
setupAnimation.beginElement();
|
|
}
|
|
|
|
function exitSetup (evt) {
|
|
var setupAnimation = document.getElementById('setupAnimation');
|
|
setupAnimation.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "hidden");
|
|
setupAnimation.endElement();
|
|
}
|
|
|
|
function bufferStart (evt) {
|
|
var progressBar = document.getElementById('progressBar');
|
|
progressBar.setAttributeNS("http://www.w3.org/2000/svg", "width", "0");
|
|
progressBar.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "visible");
|
|
var bufferAnimation = document.getElementById('bufferAnimation');
|
|
bufferAnimation.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "visible");
|
|
bufferAnimation.beginElement();
|
|
}
|
|
|
|
function bufferProgress (evt) {
|
|
var progressBar = document.getElementById('progressBar');
|
|
progressBar.setAttributeNS("http://www.w3.org/2000/svg", "width", 100*(evt.bufferFillLevel));
|
|
}
|
|
|
|
function bufferComplete (evt) {
|
|
var progressBar = document.getElementById('progressBar');
|
|
progressBar.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "hidden");
|
|
var bufferAnimation = document.getElementById('bufferAnimation');
|
|
bufferAnimation.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "hidden");
|
|
bufferAnimation.endElement();
|
|
}
|
|
]]></script>
|
|
|
|
<video id="exampleMovie" type="video/h264" xlink:href="rtsp://example.org/movies/exampleMovie.sdp"
|
|
x="0" y="0" width="400" height="300">
|
|
<handler type="application/ecmascript" ev:event="me:BeginSessionSetup">
|
|
initSetup(evt);
|
|
</handler>
|
|
|
|
<handler type="application/ecmascript" ev:event="me:EndSessionSetup">
|
|
exitSetup(evt);
|
|
</handler>
|
|
|
|
<handler type="application/ecmascript" ev:event="me:NotPlayable">
|
|
bufferStart(evt);
|
|
</handler>
|
|
|
|
<handler type="application/ecmascript" ev:event="me:DataRequest">
|
|
bufferStart(evt);
|
|
</handler>
|
|
|
|
<handler type="application/ecmascript" ev:event="me:DataReceptionProgress">
|
|
bufferProgress(evt);
|
|
</handler>
|
|
|
|
<handler type="application/ecmascript" ev:event="me:Playable">
|
|
bufferComplete(evt);
|
|
</handler>
|
|
</video>
|
|
|
|
<g> ...
|
|
<animate id="bufferAnimation" ... />
|
|
</g>
|
|
|
|
<g> ...
|
|
<animate id="setupAnimation" ... />
|
|
</g>
|
|
|
|
<rect id="progressBar" ... />
|
|
</svg></pre></div>
|
|
</div>
|
|
|
|
|
|
<div class="section"><h3 id="example-3">8.3. Stream info box</h3>
|
|
|
|
|
|
|
|
<table summary="Layout table" border="0" cellpadding="0" cellspacing="0">
|
|
<tbody>
|
|
<tr>
|
|
<td style="width:50%" rowspan="1" colspan="1" valign="top">This example shows streaming of video
|
|
within svg. An
|
|
svg-button is available and when clicked it displays a box with information about the video
|
|
stream. As with
|
|
the example above this one isn't runnable as is since the svg markup isn't complete. The
|
|
image to the right
|
|
shows a possible rendering of the info box in this example.</td>
|
|
<td rowspan="1" colspan="1" valign="top">
|
|
<img src="images/example2.jpg" alt="Example of info box" width="385" height="289" />
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<div class="boxed"><div><span class="exampleTitle">Example: Using MediaAccessEvents in SVG to display a stream info box</span></div><pre class="example" title="Using MediaAccessEvents in SVG to display a stream info box"><svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"
|
|
xmlns:se="http://www.w3.org/ns/media-access-event#">
|
|
<script type="application/ecmascript"><![CDATA[
|
|
function sessionSetupComplete (evt) {
|
|
var sessionName, sessionProtocol;
|
|
var streamFormat, mediaType;
|
|
sessionName = evt.sessionName;
|
|
if (sessionName == 0) sessionName = "No session name available";
|
|
var streamList = evt.getMediaStreams();
|
|
var stream = streamList.item(0);
|
|
if (stream == 0){
|
|
sessionProtocol = "N/A";
|
|
streamFormat = "N/A";
|
|
mediaType = "N/A";
|
|
}
|
|
else{
|
|
sessionProtocol = stream.transport;
|
|
streamFormat = stream.format;
|
|
mediaType = stream.mediaType;
|
|
}
|
|
document.getElementById('sessionNameText').textContent = "Session name: " + sessionName;
|
|
document.getElementById('sessionProtocolText').textContent = "Streaming protocol: " + sessionProtocol;
|
|
document.getElementById('sessionTypeText').textContent = "Streaming media: " + mediaType;
|
|
document.getElementById('sessionFormatText').textContent = "Format/codec: " + streamFormat;
|
|
}
|
|
|
|
function showInfo (evt) {
|
|
var infoBox = document.getElementById('infoBox');
|
|
setupAnimation.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "visible");
|
|
}
|
|
|
|
function hideInfo (evt) {
|
|
var infoBox = document.getElementById('infoBox');
|
|
setupAnimation.setAttributeNS("http://www.w3.org/2000/svg", "visibility", "hidden");
|
|
}
|
|
]]></script>
|
|
|
|
<video id="exampleMovie" type="video/h264" xlink:href="rtsp://example.org/movies/exampleMovie.sdp"
|
|
x="0" y="0" width="400" height="300">
|
|
<handler type="application/ecmascript" ev:event="me:EndSessionSetup">
|
|
sessionSetupComplete(evt);
|
|
</handler>
|
|
</video>
|
|
|
|
<g id="infoButton"> ...
|
|
<handler type="application/ecmascript" ev:event="ev:DOMActivate">
|
|
showInfo(evt);
|
|
</handler>
|
|
</g>
|
|
|
|
<g id="infoBox"> ...
|
|
<text id="sessionNameText" ...></text>
|
|
<text id="sessionProtocolText" ...></text>
|
|
<text id="sessionTypeText" ...></text>
|
|
<text id="sessionFormatText" ...></text>
|
|
|
|
<g id="okButton"> ...
|
|
<handler type="application/ecmascript" ev:event="ev:DOMActivate">
|
|
hideInfo(evt);
|
|
</handler>
|
|
</g>
|
|
</g>
|
|
</svg></pre></div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="section"><h2 id="ack">9. Acknowledgements</h2><p><strong>This section is informative.</strong></p>
|
|
|
|
<p>
|
|
The authors would like to thank Cyril Concolato for his thorough review and excellent contribution.
|
|
We would also like to thank Robin Berjon for ReSpec, the editorial framework upon
|
|
which this specification is written.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="section"><h2 id="bibref">A. References</h2>
|
|
|
|
<dl class="bibliography">
|
|
|
|
|
|
|
|
|
|
<dt id="DOM3EV">DOM3EV</dt><dd><cite><a href="http://www.w3.org/TR/DOM-Level-3-Events/">Document Object Model (DOM) Level 3 Events Specification</a></cite>,
|
|
<span class="person">Philippe Le Hégaret (W3C)</span>, and <span class="person">Tom Pixley (Netscape Communications Corporation)</span>.</dd><dt id="MIME-Media-Types">MIME-Media-Types</dt><dd><cite><a href="http://www.iana.org/assignments/media-types/">IANA MIME Media Types</a></cite>,
|
|
</dd><dt id="RFC2119">RFC2119</dt><dd><cite><a href="http://www.ietf.org/rfc/rfc2119.txt">Key words for use in RFCs to Indicate Requirement Levels</a></cite>,
|
|
<span class="person">S. Bradner</span>.</dd><dt id="SVGT12">SVGT12</dt><dd><cite><a href="http://www.w3.org/TR/SVGMobile12/">Scalable Vector Graphics (SVG) Tiny 1.2 Specification</a></cite>,
|
|
<span class="person">Ola Andersson <<a href="mailto:ola.andersson@ikivo.com">ola.andersson@ikivo.com</a>></span>, <span class="person">Robin Berjon <<a href="mailto:robin.berjon@expway.fr">robin.berjon@expway.fr</a>></span>, <span class="person">Jon Ferraiolo <<a href="mailto:jon.ferraiolo@adobe.com">jon.ferraiolo@adobe.com</a>></span>, <span class="person">Vincent Hardy <<a href="mailto:vincent.hardy@sun.com">vincent.hardy@sun.com</a>></span>, <span class="person">Scott Hayman</span>, <span class="person">Dean Jackson <<a href="mailto:dean@w3.org">dean@w3.org</a>></span>, <span class="person">Craig Northway <<a href="mailto:craign@cisra.canon.com.au">craign@cisra.canon.com.au</a>></span>, and <span class="person">Antoine Quint <<a href="mailto:aq@fuchsia-design.com">aq@fuchsia-design.com</a>></span>.</dd></dl>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|