<< Chapter < Page Chapter >> Page >

Video

Embedding videos attached to the module

Movies can be added to your module using the same basic structure as with other media types. <figure id='moviefig2'><media id="movie" alt="Building on the Past"><video mime-type="video/mpeg" src="Building_on_the_Past.mpg"width="350" height="300"autoplay="false" /></media><caption>The Creative Commons movie: "Building on the Past". Click the Play button to start the movie.</caption></figure> The movie is displayed below:

The Creative Commons movie: "Building on the Past". Click the Play button to start the movie.

Flash objects

You can insert Flash objects in your module. Here is an example of the CNXML code required to include a Flash object: <figure id='flashfig'><media id="new_flash" alt="flash animation of the connexions logo"><flash mime-type="application/x-shockwave-flash" src="flash.swf"height="250" width="250" /></flash></media><caption>"Welcome to Connexions" example Flash object.</caption></figure> The Flash object appears in your module the same way in which a movie or an image appears:

"Welcome to Connexions" example Flash object.

Audio files

Audio files such as mp3, real audio, and wav files can be inserted into your module quickly and easily. To include audio files in yourdocument, upload the corresponding audio file and include code similar to the following in your "index.cnxml" document: <figure id='musicscale'><media id="music_example" alt="chromatic scale slurred"><audio mime-type="audio/x-wav" src="chromatic_slurred.wav"/></media><caption>A chromatic scale performed on clarinet by Michael Lawrence.</caption></figure>

The actual display for the previous CNXML example is:

A chromatic scale performed on clarinet by Michael Lawrence.

Java applets

Java applets are another media type you can use in your Connexions modules: <figure id="javafig"><media id="java_example" alt="a complex sinusoid"><java-applet mime-type="application/x-java-applet" code="PhasorDemo.class"width="430" height="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:

3D Animation of a Complex Sinusoid. Click the Run button to start the animation.
If the graphic does not appear in the figure above, you may need to install or upgrade the Java plug-in on your computer. Pleasego to java.com to download the latest version of the Java plug-in.

Labview demonstrations

For information on including LabVIEW demonstrations in your module, please see Creating LabVIEW demonstrations for Connexions .

Parameters

Some multimedia objects need options or parameters to display properly. You can pass this information to the multimedia objectswith the param tag. The param tag allows you to specify the run-time settings for an object inserted into XHTML documents.

Here is an example of a param tag for an audio (wav) object: <figure id="audio2"><media id="music_example2" alt="Slurred chromatic scale"><audio mime-type="audio/x-wav" src="chromatic_slurred.wav"><param name="title" value="Chromatic Scale"/></audio></media></figure>

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Ideas and tools for improving connexions modules and collections. OpenStax CNX. Mar 22, 2010 Download for free at http://cnx.org/content/col11184/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Ideas and tools for improving connexions modules and collections' conversation and receive update notifications?

Ask