Difference between revisions of "SMIL Media Objects"

From A-SMIL.org
Jump to: navigation, search
(Created)
 
(Simple HTML Page)
 
(12 intermediate revisions by one user not shown)
Line 8: Line 8:
  
 
A simple video played for its entire duration.
 
A simple video played for its entire duration.
 +
 +
=== RTSP IPTV Streaming ===
 +
 +
RTSP multi-cast streams containing H.264 video can also be specified in the following fashion:
 +
 +
<source lang="smil">
 +
<video src="rtsp://{ip}/{endpoint}" />
 +
</source>
  
 
== Still Image (img) ==
 
== Still Image (img) ==
Line 17: Line 25:
 
The <code>dur</code> attribute specifies duration of the still image during playback.
 
The <code>dur</code> attribute specifies duration of the still image during playback.
  
== Text (smilText) ==
+
== Audio (audio) ==
  
 
<source lang="smil">
 
<source lang="smil">
<smilText textMode="crawl" region="ticker">Hello, world.</smilText>
+
<audio src="music.mp3" />
 
</source>
 
</source>
  
Crawling "Hello, world." across the top of a screen region.
+
Playing music in the background.
  
== Audio (audio) ==
+
=== Sound Volume Control ===
 +
 
 +
For video and audio objects, you can specify the "sound level" attribute to control its audio volume.
  
 
<source lang="smil">
 
<source lang="smil">
<audio src="music.mp3" />
+
<video src="ad1.mpg" soundLevel="20%" />
 
</source>
 
</source>
  
Playing music in the background.
+
Valid values for soundLevel is from 0% (mute) to 100% (max).
 +
 
 +
== HTML Documents and Widgets (text and ref) ==
 +
 
 +
For SMIL players that support HTML content, such as the IAdea XMP-3250/3350/3450 Media Appliances, one may use the <code>text</code> and <code>ref</code> elements to designate the content to play.
 +
 
 +
To enable HTML rendering, one MUST first activate the corresponding system component from the SMIL's <code>body</code> declaration, such as the following:
 +
 
 +
<source lang="smil">
 +
<body systemComponent="http://www.w3.org/1999/xhtml">
 +
</source>
 +
 
 +
There are two types of HTML contents: a simple page and an HTML Widget.
 +
 
 +
=== Simple HTML Page ===
 +
 
 +
A simple HTML page is represented by an URL to the HTML document. The page can be played using the following code:
 +
 
 +
<source lang="smil">
 +
<text src="http://server/index.html" dur="indefinite" />
 +
</source>
 +
 
 +
or
 +
 
 +
<source lang="smil">
 +
<ref src="http://server/index.html" type="text/html" dur="indefinite" />
 +
</source>
 +
 
 +
Note that the media files referenced from the HTML document is external and NOT cached in the media player after power cycling. If network is not available after the player restarts, the referenced media files would be unavailable for display.
 +
 
 +
To make the complete HTML document cached in the player and available to play when network is not available, use HTML Widgets as described below.
 +
 
 +
=== HTML Widget ===
 +
 
 +
An HTML Widget is a zipped HTML file system tree containing at the top level the file named "index.html" which can refer to other files using relative URLs within the zipped tree. A widget is loaded into a player as a self-contained media file, and is cached in the player's storage for offline playback. It can be accessed using the following code:
 +
 
 +
<source lang="smil">
 +
<ref src="http://server/content.wgt" type="application/widget" dur="indefinite" />
 +
</source>
  
 
== Related ==
 
== Related ==
  
 
* [[SMIL Playlists]]: seq, par, and excl playlists
 
* [[SMIL Playlists]]: seq, par, and excl playlists
* [[SMIL Screen Layout]]: multi-zone, multi-layer layout
+
* [[Layout|SMIL Screen Layout]]: multi-zone, multi-layer layout
* [[SMIL Wallclock Scheduling]]: ISO-8601 date/time, repeats
+
* [[Transport|Sending SMIL to Player]]
* [[SMIL APIs]]: file-based, SOAP
+

Latest revision as of 09:17, 24 October 2012

SMIL supports multimedia objects, including

Contents

Video (video)

<video src="ad1.mpg" />

A simple video played for its entire duration.

RTSP IPTV Streaming

RTSP multi-cast streams containing H.264 video can also be specified in the following fashion:

<video src="rtsp://{ip}/{endpoint}" />

Still Image (img)

<img src="ad2.jpg" dur="5s" />

The dur attribute specifies duration of the still image during playback.

Audio (audio)

<audio src="music.mp3" />

Playing music in the background.

Sound Volume Control

For video and audio objects, you can specify the "sound level" attribute to control its audio volume.

<video src="ad1.mpg" soundLevel="20%" />

Valid values for soundLevel is from 0% (mute) to 100% (max).

HTML Documents and Widgets (text and ref)

For SMIL players that support HTML content, such as the IAdea XMP-3250/3350/3450 Media Appliances, one may use the text and ref elements to designate the content to play.

To enable HTML rendering, one MUST first activate the corresponding system component from the SMIL's body declaration, such as the following:

<body systemComponent="http://www.w3.org/1999/xhtml">

There are two types of HTML contents: a simple page and an HTML Widget.

Simple HTML Page

A simple HTML page is represented by an URL to the HTML document. The page can be played using the following code:

<text src="http://server/index.html" dur="indefinite" />

or

<ref src="http://server/index.html" type="text/html" dur="indefinite" />

Note that the media files referenced from the HTML document is external and NOT cached in the media player after power cycling. If network is not available after the player restarts, the referenced media files would be unavailable for display.

To make the complete HTML document cached in the player and available to play when network is not available, use HTML Widgets as described below.

HTML Widget

An HTML Widget is a zipped HTML file system tree containing at the top level the file named "index.html" which can refer to other files using relative URLs within the zipped tree. A widget is loaded into a player as a self-contained media file, and is cached in the player's storage for offline playback. It can be accessed using the following code:

<ref src="http://server/content.wgt" type="application/widget" dur="indefinite" />

Related