Summary: This is to demonstrate multimedia content in Vietnam OpenCourseWare. Multimedia content is collected from Connexions project at: http://cnx.org
media tag. See the description of the media
tag in the CNXML Language Specification for more
information. The only requirement is that the object must have
a valid MIME (Multipurpose Internet Mail Extension) type. MIME
is a protocol that enables the transmission of data, such as
sound or movies, over the Internet without first having to be
translated into an ASCII format. See MIME
Types for more information. This module contains
examples of the CNXML entries and their resulting displays for
the different multimedia objects.
type attribute must match the MIME type
for the media object you want to appear in the module. For
example, if you are adding an image file that is in the
Portable Networks Graphics (png file extension) format, the
type attribute must be image/png. The entry
would look like the following example:
<media type="image/png" src="mypicture.png"/>
<figure id="figure-01"> <name>Example Figure</name> <media type="image/png" src="envelope-taller.png"/> <caption>A graphic image displayed as a figure.</caption> </figure>
src attribute in the media tag gives the location
or source of the image that you want to appear in the module. The
attribute can be a file name if you have uploaded the file into your
module, or a full URL for an image file stored elsewhere on the
Internet.
Example figure![]() Figure 1: A graphic image displayed as a figure. |
subfigure tag. This is useful when you have two
related images that you want to display side-by-side or one
above the other. To display two images within the same figure,
insert CNXML entries similar to the following example into the
"index.cnxml" file for your module:
<figure id="figure-2" orient="horizontal">
<subfigure id="subfigure-1">
<name>Tall Icon and Envelope</name>
<media type="image/png" src="envelope-taller.png"/>
<caption>
Subfigure 1.
</caption>
</subfigure>
<subfigure id="subfigure-2">
<name>Small Icon and Envelope</name>
<media type="image/png" src="envelope.png"/>
<caption>
Subfigure 2.
</caption>
</subfigure>
<caption>Two images displayed horizontally in one figure.</caption>
</figure>
Figure 2: Two images displayed horizontally in one figure. |
orient can have a value of
horizontal or vertical, and determines
how the images are arranged in the figure.
eps are the preferred format for printed versions
of Connexions modules. If your module contains eps
files and png files of the same image, Connexions
uses the eps files when it generates a PDF file
for printing and uses the png files when displaying
the module on-line.
eps format version of your
image files. The image should be sized to the appropriate
dimensions.media type entry for the
eps image file in the "index.cnxml" file just
above the entry for image file for the on-line display. The
image files should have the same name, except that the
extension should indicate the file type. For example:
"image1.png" (for on-line) and "image1.eps" (for print)eps image file to the module.
<figure id='printimage'>
<media type='application/postscript' src='image.eps'>
<media type='image/png' src='image.png'/>
</media>
</figure>
eps) entry must appear above the
on-line image (png) entry in the "index.cnxml" file.
The on-line image entry should be indented and nested under the
alternate image entry.
media type entry for the full-sized
and thumbnail images, as shown in the following example.
<figure id='thumbnail'>
<media type='image/png' src='TajMahal_medium.jpg'>
<param name='thumbnail' value='TajMahal_Thumb.jpg'/>
</media>
</figure>
The actual display for the previous
CNXML example is:
Figure 3: The photograph of the Taj Mahal in this figure and the following figures was taken by Steve
Evans. It is licensed for public use under the
Creative Commons Attribution License. |
param tags with name attributes for height and width.
<figure id="element-856">
<media type="image/jpeg" src="TajMahal_medium.jpg">
<param name="height" value="250"/>
<param name="width" value="250"/>
</media>
</figure>
The way this code would display is shown in Figure 4.![]() Figure 4 |
![]() Figure 5 |
<figure id='flashfig'>
<media type="application/x-shockwave-flash" src="flash.swf">
<param name='height' value='250'/>
<param name='width' value='250'/>
</media>
<caption>"Welcome to Connexions" example Flash object.</caption>
</figure>
The Flash object appears in your
module, similar to the way in which a movie or an image appears.
Figure 6: "Welcome to Connexions" example Flash object. |
figure tags
to allow captions for explanation purposes. The figure
tags are not required to include these media objects in a module.<figure id='moviefig2'> <media type="video/mpeg" src="Building_on_the_Past.mpg"> <param name="width" value="450"/> <param name="height" value="400"/> <param name="autoplay" value="false"/> </media> <caption>The Creative Commons movie: "Building on the Past". Click the Play button to start the movie.</caption> </figure>The actual display for the previous CNXML example is:
Figure 7: The Creative Commons movie: "Building on the Past".
Click the Play button to start the movie. |
figure tags
to allow captions for explanation purposes. The figure
tags are not required to include these media objects in a module.
<figure id="javafig">
<media type="application/x-java-applet" src="PhasorDemo.class">
<param name="width" value="430"/>
<param name="height" value="500"/>
</media>
<caption>3D Animation of a Complex Sinusoid. Click the Run button
to start the animation.</caption>
</figure>
The actual display for the previous
CNXML example is:
Figure 8: 3D Animation of a Complex Sinusoid. Click the Run button
to start the animation. |
figure tags
to allow captions for explanation purposes. The figure
tags are not required to include these media objects in a module.
<figure id='musicscale'>
<media type="audio/x-wav" src="chromatic_slurred.wav"/>
<caption>A chromatic scale performed on clarinet by Michael Lawrence.</caption>
</figure>
Audio File:
chromatic_slurred.wav Figure 9: A chromatic scale performed on clarinet by Michael Lawrence. |
figure tags
to allow captions for explanation purposes. The figure
tags are not required to include these media objects in a module.param tag. This tag is contained within the
media tags and does not require modification of the
media tag. See the description of the
param
tag in the CNXML Language Specification for more
information.
param tag entry for a video
(mpg) object:
<media type="video/mpeg" src="testmovie.mpg">
<param name="width" value="300"/>
<param name="height" value="300"/>
</media>
param tag allows you to specify the run-time
settings for an object inserted into XHTML documents.
param entries for the primary image before
the nested media entry for the alternate image, as
shown in the following example:
<media type="video/mov" src="howto.mov">
<param name="height" value="250" />
<param name="width" value="250" />
<media type="image/png" src="novideo.png />
</media>
Comments, questions, feedback, criticisms?