summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/media9/media9.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-04-03 23:40:51 +0000
committerKarl Berry <karl@freefriends.org>2012-04-03 23:40:51 +0000
commit538bf9cb8c628873e9682c8573fe6af45a6304bc (patch)
treea51362f7976c12f1470a977d2bd1ac12f24e3f14 /Master/texmf-dist/doc/latex/media9/media9.tex
parent65dea7bb3a3dfc2b4443ab2175f9e813daeafbcc (diff)
media9 (3apr12)
git-svn-id: svn://tug.org/texlive/trunk@25842 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/media9/media9.tex')
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.tex215
1 files changed, 124 insertions, 91 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/media9.tex b/Master/texmf-dist/doc/latex/media9/media9.tex
index d8c003089b3..9a0f217f8bf 100644
--- a/Master/texmf-dist/doc/latex/media9/media9.tex
+++ b/Master/texmf-dist/doc/latex/media9/media9.tex
@@ -8,8 +8,8 @@
%\pdfobjcompresslevel=0
\documentclass[a4paper]{article}
\frenchspacing
-%\usepackage[draft]{media9}
\usepackage{media9}
+%\usepackage[draft]{media9}
\usepackage{animate}
\usepackage{fancyvrb}
@@ -26,7 +26,7 @@
\usepackage{tabls}
\usepackage{menukeys}
\usepackage{hyperref}
-\def\keywords{embed Flash movie LaTeX PDF 3D include sound swf mp3 video MP4 H.264 FLV audio multimedia streamed media rtmp YouTube animation JavaScript pdfLaTeX dvips ps2pdf dvipdfmx XeLaTeX U3D PRC Adobe Reader RichMedia annotation LuaLaTeX}
+\def\keywords{embed flash movie LaTeX pdf 3d include sound swf mp3 video mp4 h.264 aac flv audio multimedia streamed media rtmp YouTube animation JavaScript pdfLaTeX dvips ps2pdf dvipdfmx XeLaTeX u3d prc Adobe Reader RichMedia annotation LuaLaTeX}
\hypersetup{
bookmarksnumbered,linktocpage,breaklinks,
pdftitle={The media9 Package},
@@ -70,18 +70,18 @@
\maketitle
\begin{abstract}\noindent
-A \LaTeX{} package for embedding interactive Adobe Flash (SWF) and 3D files (Adobe U3D \& PRC) as well as video and sound files or streams (FLV, MP4/H.246, MP3) into PDF documents with Acrobat-9/X compatibility.\\[0.2\baselineskip]
+A \LaTeX{} package for embedding interactive Adobe Flash (SWF) and 3D files (Adobe U3D \& PRC) as well as video and sound files or streams (FLV, MP4/H.246, MP3, AAC) into PDF documents with Adobe Reader-9/X compatibility.\\[0.2\baselineskip]
\emph{Keywords}: \keywords
\end{abstract}
\tableofcontents
\section{Introduction}
-This package provides an interface to embed interactive Flash (SWF) and 3D objects (Adobe U3D \& PRC) as well as video and sound files or streams in the popular MP4, FLV and MP3 formats into PDF documents. Playback of multimedia files uses the built-in Flash Player of Adobe Reader and does, therefore, not depend on external plug-ins. Flash Player supports the efficient H.264 codec for video compression.
+This package provides an interface to embed interactive Flash (SWF) and 3D objects (Adobe U3D \& PRC) as well as video and sound files or streams in the popular MP4, FLV, MP3 and AAC formats into PDF documents. Playback of multimedia files uses the built-in Flash Player of Adobe Reader and does, therefore, not depend on external plug-ins. Flash Player supports the efficient H.264 codec for video compression.
-Among the supported media types, video and sound files require an additional Flash (SWF) application for playback, which must be either embedded into the PDF or loaded at runtime from the internet. There are numerous such players, both open-source and commercial, available on the internet. One of them is the highly configurable open-source `Strobe Media Playback'~\cite{strobe}, maintained by Adobe and downloadable from SourceForge.net. Package `media9' comes with two simple players for video and audio, `VPlayer.swf' and `APlayer.swf', which can be used instead. They provide sufficient functionality for playing embedded files and streamed media.
+Among the supported media types, video and sound files require an additional Flash (SWF) application for playback, which must be either embedded into the PDF or loaded at runtime from the internet. There are numerous such players, both open-source and commercial, available on the internet. One of them is the highly configurable open-source `StrobeMediaPlayback.swf'~\cite{strobe}, maintained by Adobe and hosted on \href{http://sourceforge.net/projects/smp.adobe/files/}{SourceForge.net}. Package `media9' comes with an enhanced version of `StrobeMediaPlayback.swf'. In addition, two simple players for video and audio, `VPlayer.swf' and `APlayer.swf' are included, which can be used instead. They provide sufficient functionality for playing embedded files and streamed media.
-\emph{Note:} `media9' package replaces the now obsolete `movie15' package. `media9' is based on the RichMedia Annotation, an Adobe addition to the PDF specification~\cite{supplement}, while `movie15' uses the old multimedia framework (`Screen Annotation') of pre-9 Readers which depends on external plug-ins and which does not support recent media file formats. Annotations are the interactive parts in a document, in PDF specification parlance.
+\emph{Note:} `media9' package replaces the now obsolete `movie15' package. `media9' is based on the RichMedia Annotation (Annotations are the interactive parts in a document, in PDF specification parlance.), an Adobe addition to the PDF specification~\cite{supplement}, while `movie15' uses the old multimedia framework (`Screen Annotation') of pre-9 Readers which depends on external plug-ins and which does not support recent media file formats.
Package `media9' supports the usual PDF making workflows, i.\,e. pdf\LaTeX{}, Lua\LaTeX, \LaTeX{} $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+/Distiller and \pXepLaTeX{} $\rightarrow$ \verb+(x)dvipdfmx+.
@@ -98,9 +98,9 @@ The final PDF can be viewed in current Adobe Readers on MS Windows and other pla
\end{trivlist}
\section{Installation}
-MiK\TeX{} users should run the package manager for installation.
+MiK\TeX{} and \TeX{}Live users should run the package manager for installation and updates.
-Unfortunately, `media9' is not in TeXLive. It must be installed manually into the \emph{local} TeX-Directory-Structure (TDS) root directory along the following steps:
+Otherwise, a manual installation into the \emph{local} TeX-Directory-Structure (TDS) root directory is done along the following steps:
\begin{enumerate}
\item Download the TDS compliant package file `\href{http://tug.ctan.org/tex-archive/install/macros/latex/contrib/media9.tds.zip}{media9.tds.zip}' from CTAN.
\item Find the local TDS root directory by running\\
@@ -192,7 +192,9 @@ Every invocation of this option embeds another local file that is required to ru
\begin{verbatim}
flashvars={<some_var=some_val&another_var=another_val&...>}
\end{verbatim}
-(Flash only) Usually, Flash applications can be configured via ActionScript variables the programmer of the application has made visible from outside. A typical use would be to set the video source of a media player to point to an embedded MP4 file or to a live stream, or to set the speaker volume for playback of an MP3 file. The argument of the \verb+flashvars+ option is a list of \verb+<variable>=<value>+ pairs separated by `\verb+&+' and enclosed in a pair of braces (\verb+{...}+). Note: If a variable is to be set to point to an embedded resource, the value of the variable must be given in exactly the same way as with the `\verb+addresource+' option. Otherwise the name of the embedded file cannot be resolved. For example,
+(Flash only) Usually, Flash applications can be configured via ActionScript (AS) variables the programmer of the application has made visible from outside. A typical use would be to set the video source of a media player to point to an embedded MP4 file or to a live stream, or to set the speaker volume for playback of an MP3 file. The argument of the \verb+flashvars+ option is a list of \verb+<AS variable>=<value>+ pairs separated by `\verb+&+' and enclosed in a pair of braces (\verb+{...}+). String values of AS variables with embedded space characters must be put in quotes, e.\,g. \verb+string_var="... ..."+.
+
+Note: If a variable is to be set to point to an embedded resource, the value of the variable must be given in exactly the same way as with the `\verb+addresource+' option. Otherwise the name of the embedded file cannot be resolved. For example,
\begin{verbatim}
addresource=path/to/video.mp4
\end{verbatim}
@@ -206,11 +208,11 @@ if, for a particular media player, the video source is set through ActionScript
\begin{verbatim}
activate=onclick | pageopen | pagevisible
\end{verbatim}
-Decides on how to activate the media annotation. `\verb+activate=onclick+' is default behaviour and does not need be given explicitly; embedded media is activated when the user clicks on it or through a JavaScript. It is recommended to provide a poster image with the \verb+<poster text>+ argument in that case. `\verb+pageopen+' and `\verb+pagevisible+' automatically activate the media when the page becomes visible; `{\tt pagevisible}' is better for two-up and continuous page display.
+Decides on how to activate the media annotation. `\verb+activate=onclick+' is default behaviour and does not need be given explicitly; embedded media is activated when the user clicks on it or by a JavaScript. It is recommended to provide a poster image with the \verb+<poster text>+ argument in that case. `\verb+pageopen+' and `\verb+pagevisible+' automatically activate the media when the page becomes visible; `{\tt pagevisible}' is better for two-up and continuous page display.
\begin{verbatim}
deactivate=onclick | pageclose | pageinvisible
\end{verbatim}
-Decides on how to de-activate the media annotation. `\verb+deactivate=onclick+' is default behaviour and does not need be given explicitly; media is de-activated when the user right-clicks on it and selects `Disable Content', or through a JavaScript. `\verb+pageclose+' and `\verb+pageinvisible+' automatically de-activate the media when the user navigates away from the page containing the media; `{\tt page\-in\-visible}' is better for two-up and continuous page display.
+Decides on how to de-activate the media annotation. `\verb+deactivate=pageclose+' is default behaviour and does not need be given explicitly; media is automatically de-activated when the user leaves the page containing the media. `\verb+pageinvisible+' is similar, but may be better for two-up and continuous page display. Setting `\verb+deactivate=onclick+' requires user interaction for de-activating the media, either by right-click and chosing `\emph{\sffamily Disable Content}' or by a JavaScript.
\begin{verbatim}
draft
final
@@ -416,54 +418,81 @@ Things like animation, lighting, background of 3D objects etc. may also be scrip
A YouTube video clip, as shown in Fig.~\ref{alien}, may serve as a basic example of loading Flash content from a URL to be displayed in an embedded fashion in a PDF document. Indeed, a YouTube clip is nothing more than a small SWF file which loads a video stream and other necessary resources, such as user controls and a player skin from a remote server. It can be configured via ActionScript variables, to play several videos in a row, to play a video in a loop etc. Player parameters are documented on \url{http://code.google.com/apis/youtube/player_parameters.html} and can be passed to the player using either the `\verb+flashvars+' option, as in the example, or appended to the URL string after the video ID. A question mark `\verb+?+' must be put between the video ID and the parameter string. Some of the documented parameters, such as `\verb+rel+', seem to have an effect only if they are passed as part of the URL.
\begin{figure}[bp]
+\centering
\begin{Verbatim}
\includemedia[
width=0.6\linewidth,height=0.45\linewidth,
activate=pageopen,
- flashvars={%
- modestbranding=1% no YT logo in control bar
- &autohide=1% % controlbar autohide
- &showinfo=0% % no title and other info before start
- &rel=0% % no related videos after end
- },%
- url % Flash loaded from URL
+ flashvars={
+ modestbranding=1 % no YT logo in control bar
+ &autohide=1 % controlbar autohide
+ &showinfo=0 % no title and other info before start
+ &rel=0 % no related videos after end
+ },
+ url % Flash loaded from URL
]{}{http://www.youtube.com/v/Mdc3o7wOwNA?rel=0}
\end{Verbatim}
-%\begin{minipage}{0.5\linewidth}
-\begin{center}
+\vspace{1ex}
\includemedia[
width=0.6\linewidth,height=0.45\linewidth,
activate=pageopen,
- flashvars={%
- modestbranding=1% no YT logo in control bar
- &autohide=1% controlbar autohide
- &showinfo=0% no title and other info before start
-% &rel=0% no display of related videos
- },
- url
+ flashvars={
+ modestbranding=1 % no YT logo in control bar
+ &autohide=1 % controlbar autohide
+ &showinfo=0 % no title and other info before start
+ &rel=0 % no related videos after end
+ },
+ url % Flash loaded from URL
]{}{http://www.youtube.com/v/Mdc3o7wOwNA?rel=0}
-%]{}{http://www.youtube.com/v/k0BGuONQWUw?loop=1}
-\end{center}
-%\end{minipage}
\caption{A YouTube video as an example of a Flash application loaded from a URL.}\label{alien}
\end{figure}
-Video and sound files are always loaded and then played by a media player application. Two simple players, `VPlayer.swf' for video and `APlayer.swf' for sound, are installed along with the `media9.sty' package file. Although they do not have user controls, minimal interactivity for play, pause and resume is provided via left mouse button press and release. The players support MP4 video and MP3 sound files and streams. They were compiled, using the free Adobe Flex SDK~\cite{flex}, from XML source files which reside in the same directory as the players. More sophisticated players are available, e.\,g.~\cite{strobe}. There is no need to copy `VPlayer.swf' and `APlayer.swf' into the directory of the document source for embedding. They will be found by \LaTeX{} without taking any further action.
+Video and sound files are always loaded and then played by a media player application. Three players are installed along with the `media9.sty' package file: two simple players, `VPlayer.swf' for video and `APlayer.swf' for sound, and a fully blown one, `StrobeMediaPlayback.swf', with some fixes to improve its usability. The simple ones are `chromeless' players, that is, they do not have user controls. Minimal interactivity for play, pause and resume is still provided via left mouse button press and release. They were compiled, using the free Adobe Flex SDK~\cite{flex}, from XML files which reside in the \verb+doc/+ folder of the package installation. For `StrobeMediaPlayback.swf', only a patch file is included, as the sources can be downloaded elsewhere.
+
+The included version of `StrobeMediaPlayback.swf' is preferably to be used, as it is smaller than `VPlayer.swf' in terms of file size and it provides user controls. The improvements of `StrobeMediaPlayback.swf' in comparision to the original version on SourceForge.net are
+\begin{itemize}
+ \item fix: video could not be restarted after end of playback if ActionScript variable `{\tt autoRewind}' is set to `{\tt false}'
+ \item new: first frame of video is shown as default poster instead of black stage
+ \item new: play/pause video by clicking on the stage (as with `VPlayer.swf'), useful in a lecture situation
+\end{itemize}
-Like YouTube videos, media players are configured via ActionScript variables which are passed using option `\verb+flashvars+'. Table~\ref{playerparams} lists parameters available for VPlayer.swf and APlayer.swf.
+There is no need to copy the installed players into the directory of the document source for embedding. They will be found by \LaTeX{} without taking any further action.
-Playback of an embedded video is shown in Fig.~\ref{video}a. Besides embedded files, `VPlayer.swf' also supports video that is streamed from remote servers via HTTP and RTMP protocols, as shown in Fig.~\ref{video}b.
+Like YouTube videos, media players are configured via ActionScript variables which are passed using option `\verb+flashvars+'. Table~\ref{playerparams} lists parameters available for `VPlayer.swf' and `APlayer.swf', table~\ref{smpparams} for `StrobeMediaPlayback.swf'.
-\begin{table}
+Playback of an embedded video is shown in Fig.~\ref{video}a. Besides embedded files, also video streamed from remote servers via HTTP and RTMP protocols is supported, as shown in Fig.~\ref{video}b.
+
+\begin{table}[p]
\centering
-\caption{Parameters for media players VPlayer.swf and APlayer.swf shipping with media9. Parameters must be passed as `{\tt\&}'-separated string using `{\tt flashvars}' option.}\label{playerparams}
+\caption{Parameters (ActionScript variables) for media players `VPlayer.swf' and `APlayer.swf' shipping with media9. Parameters are passed as `{\tt\&}'-separated string using `{\tt flashvars}' option.}\label{playerparams}
\begin{tabular}[t]{p{0.4\linewidth}p{0.5\linewidth}}\hline
parameter & description\\\hline\hline
-{\tt source=<file path or URL>} & (required) path to embedded media file (see option `{\tt addresource}'), or URL (http, rtmp) to stream or online media file\\
+{\tt source=<file path or URL>} & (required) path to embedded media file (see option `{\tt addresource}'), or URL (http, rtmp) to online media file\\
{\tt autoPlay=true|false} & if {\tt=true}, automatically starts playback after activation (see option `{\tt activation})'\\
{\tt loop=true|false} & if {\tt=true}, media is played in a loop\\
-{\tt volume=<value between 0.0 and 1.0>} & sets volume of the sound\\
-{\tt balance=<value between -1.0 and 1.0>} & (APlayer.swf only) sets balance of sound speakers\\\hline
+{\tt volume=<value between 0.0 \phantom{.}\hfill{}and 1.0>} & sets volume of the sound\\
+{\tt balance=<value between \phantom{xxxx} \phantom{.}\hfill{}-1.0 and 1.0>} & (APlayer.swf only) sets balance of sound speakers\\\hline
+\end{tabular}
+\end{table}
+
+\begin{table}[p]
+\centering
+\caption{Parameters (ActionScript variables) for `StrobeMediaPlayback.swf' shipping with media9. Parameters are passed as `{\tt\&}'-separated string using `{\tt flashvars}' option.}\label{smpparams}
+\begin{tabular}[t]{p{0.4\linewidth}p{0.5\linewidth}}\hline
+parameter & description\\\hline\hline
+{\tt src=<file path or URL>} & (required) path to embedded media file (see option `{\tt addresource}'), or URL (http, rtmp) of online media file\\
+{\tt autoPlay=true|false} & default: {\tt false}; if {\tt=true}, automatically starts playback after activation (see option `{\tt activation})'\\
+{\tt autoRewind=true|false} & default: {\tt true}; if {\tt=false}, keep last frame after end of playback\\
+{\tt loop=true|false} & if {\tt=true}, media is played in a loop\\
+{\tt scaleMode=letterbox|none| \phantom{.}\hfill{}stretch|zoom} & default: {\tt letterbox}; determines how to scale the video in order to fit into player\\
+{\tt controlBarMode=docked|\phantom{xxxxxxxxxxxxxx} \phantom{.}\hfill{}floating|none} & default: {\tt docked}; determines position and visibility of control bar\\
+{\tt controlBarAutoHide=\phantom{xxxxxxx} \phantom{.}\hfill{}true|false} & default: {\tt true}; automatically hide or not control bar\\
+{\tt controlBarAutoHideTimeOut= \phantom{.}\hfill{}<number [s]>} & default: {\tt 3}; time span before auto-hide\\
+{\tt volume=<value between 0.0 \phantom{.}\hfill{}and 1.0>} & sets volume of the sound\\
+{\tt audioPan=<value between \phantom{xxxx} \phantom{.}\hfill{}-1.0 and 1.0>} & default: {\tt 0}; sets balance of sound speakers\\
+{\tt muted=true|false} & default: {\tt false}; mute or not sound\\
+{\tt clipStartTime=<number [s]>} & default: {\tt NaN}; time to start from\\
+{\tt clipEndTime=<number [s]>} & default: {\tt NaN}; time to end at\\\hline
\end{tabular}
\end{table}
@@ -474,66 +503,69 @@ parameter & description\\\hline\hline
width=0.4\linewidth,height=0.3\linewidth,
activate=pageopen,
addresource=files/random.mp4,
- flashvars={%
- source=files/random.mp4% same path as in addresource!
- &loop=true% loop video
+ flashvars={
+ source=files/random.mp4 % same path as in addresource!
+ &loop=true % loop video
}
]{}{VPlayer.swf}
\end{Verbatim}
+\vspace{1ex}
\makebox[\linewidth]{a)\hfill\includemedia[
width=0.6\linewidth,height=0.45\linewidth,
activate=pageopen,
addresource=files/random.mp4, %embeds video file
- flashvars={%
- source=files/random.mp4% same path as in addresource!
- &loop=true% % loop video
+ flashvars={
+ source=files/random.mp4 % same path as in addresource!
+ &loop=true % loop video
}
]{}{VPlayer.swf}\hfill}
\vskip 1ex
\begin{Verbatim}
\includemedia[
- width=0.6\linewidth,height=0.45\linewidth,
+ width=0.6\linewidth,height=0.3375\linewidth, % 16:9
activate=pageopen,
- flashvars={%
- autoPlay=true%
- &source=rtmp://streaming.music.indiana.edu:1935/onDemand/%
- mp4:media/20090327_VarRussianTheme-h264-480.m4v%
+ flashvars={
+ src=rtmp://streaming.music.indiana.edu:1935/onDemand/mp4:media/%
+ 20090327_VarRussianTheme-h264-480.m4v
+ &scaleMode=stretch
}
-]{}{VPlayer.swf}
+]{}{StrobeMediaPlayback.swf}
\end{Verbatim}
+\vspace{1ex}
\makebox[\linewidth]{b)\hfill\includemedia[
- width=0.6\linewidth,height=0.45\linewidth,
+ width=0.6\linewidth,height=0.3375\linewidth,
activate=pageopen,
- flashvars={%
- autoPlay=true%
- &source=rtmp://streaming.music.indiana.edu:1935/onDemand/mp4:media/20090327_VarRussianTheme-h264-480.m4v%
+ flashvars={
+ src=rtmp://streaming.music.indiana.edu:1935/onDemand/mp4:media/%
+ 20090327_VarRussianTheme-h264-480.m4v
+ &scaleMode=stretch
}
-]{}{VPlayer.swf}\hfill}
-\caption{Example of (a) an embedded MP4 video file and (b) streamed video from an RTMP server. Both examples use `VPlayer.swf', physically embedded in the PDF.}\label{video}
+]{}{StrobeMediaPlayback.swf}\hfill}
+\caption{Example of (a) an embedded MP4 video file and (b) streamed video from an RTMP server. First example uses `VPlayer.swf', the second one `StrobeMediaPlayBack.swf'. Both are physically embedded in the PDF.}\label{video}
\end{figure}
%\enlargethispage{2ex}
-Sound files and streams in the MP3 format can be played with `APlayer.swf'. Fig.~\ref{radio} contains examples of an audio live stream and a downloaded MP3 sound file. Instead of being embedded, the player is loaded from a CTAN mirror during runtime because an internet connection is required anyway for streaming the audio.
+Sound files and streams in the MP3 and AAC formats can be played with `APlayer.swf'. Fig.~\ref{radio} contains examples of an audio live stream and a downloaded MP3 sound file. Instead of being embedded, the player is loaded from a CTAN mirror during runtime because an internet connection is required anyway for streaming the audio.
\begin{figure}[bp]
%\flushright
\begin{Verbatim}
- \includemedia[
- flashvars={%
- source=http://mp3.live.tv-radio.com/franceculture%
- /all/franceculturehautdebit.mp3%
- &autoPlay=true%
- },
- url %refers to APlayer.swf, not to `source' flashvar!
- ]{\color{blue}\fbox{Listen live to Radio France Culture}}{%
- http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/%
- contrib/media9/players/APlayer.swf%
- }
+ \includemedia[
+ flashvars={
+ source=http://mp3.live.tv-radio.com/franceculture%
+ /all/franceculturehautdebit.mp3
+ &autoPlay=true
+ },
+ url % refers to APlayer.swf, not to `source' flashvar!
+ ]{\color{blue}\fbox{Listen live to Radio France Culture}}{%
+ http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/%
+ contrib/media9/players/APlayer.swf%
+ }
\end{Verbatim}
\makebox[\linewidth]{a)\hfill\includemedia[
- flashvars={%
- source=http://mp3.live.tv-radio.com/franceculture/all/franceculturehautdebit.mp3%
- &autoPlay=true%
+ flashvars={
+ source=http://mp3.live.tv-radio.com/franceculture/all/franceculturehautdebit.mp3
+ &autoPlay=true
},
url
]{\color{blue}\fbox{Listen live to Radio France Culture}}{%
@@ -543,25 +575,24 @@ http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/contrib/media9/players/
}\hfill}
\vskip 4ex
\begin{Verbatim}
- \includemedia[
- flashvars={%
- source=http://www.openbsd.org/songs/song50.mp3%
- &autoPlay=true%
- },
- url
- ]{\color{blue}\fbox{Listen to OpenBSD 4.9 release song.}}{%
- http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/%
- contrib/media9/players/APlayer.swf%
- }
+ \includemedia[
+ flashvars={
+ source=http://www.openbsd.org/songs/song50.mp3
+ &autoPlay=true
+ },
+ url
+ ]{\color{blue}\fbox{Listen to OpenBSD 4.9 release song.}}{%
+ http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/%
+ contrib/media9/players/APlayer.swf%
+ }
\end{Verbatim}
\makebox[\linewidth]{b)\hfill\includemedia[
- flashvars={%
- source=http://www.openbsd.org/songs/song49.mp3%
- &autoPlay=true%
+ flashvars={
+ source=http://www.openbsd.org/songs/song50.mp3
+ &autoPlay=true
},
- url
+ url
]{\color{blue}\fbox{Listen to OpenBSD 4.9 release song.}}{%
-%APlayer.swf%
http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/contrib/media9/players/APlayer.swf%
}\hfill}
\caption{Example of (a) streamed audio and (b) progressively downloaded MP3. The sound player, APlayer.swf, is loaded from a CTAN mirror upon activation.}\label{radio}
@@ -594,6 +625,7 @@ Additional resource files that are needed to render the 3D scene can be embedded
Below, two examples of embedded 3D files are shown. The first one, Fig.~\ref{asyex} is a PRC file generated with Asymptote. Note the text labels always facing the camera thanks to the attached 3D JavaScript file `asylabels.js'. The second example, Fig.~\ref{u3dex}, demonstrates the use of a views file which defines additional named views of the 3D object. Moreover, the possibilities of the extended 3D context menu can be evaluated. They were enabled by adding the `\verb+3Dmenu+' option to \verb+\includemedia+. All part and scene rendering attributes that can be changed via the `\emph{\sffamily Part Options}' and `\emph{\sffamily Viewing Options}' menu entries, as well as a cross section to be added with the `\emph{\sffamily Cross Section}' menu entry can be saved into a new view (`\emph{\sffamily Get Current View}'). Position, orientation and scaling of individual parts and of the cross section can be changed using the keyboard (keys \keys{\arrowkeyleft}, \keys{\arrowkeyright}, \keys{\arrowkeyup}, \keys{\arrowkeydown}, \keys{X}, \keys{\shift+X}, \keys{Y}, \keys{\shift+Y}, \keys{Z}, \keys{\shift+Z}, \keys{S}, \keys{\shift+S}).
\begin{figure}[bp]
+\centering
\begin{Verbatim}
\includemedia[
width=0.8\linewidth,height=0.8\linewidth,
@@ -608,7 +640,7 @@ Below, two examples of embedded 3D files are shown. The first one, Fig.~\ref{asy
3Dc2c=4 2 3
]{}{epix.prc}
\end{Verbatim}
-\centering
+\vspace{1ex}
\includemedia[
width=0.8\linewidth,height=0.8\linewidth,
activate=pageopen,
@@ -635,6 +667,7 @@ Below, two examples of embedded 3D files are shown. The first one, Fig.~\ref{asy
3Dmenu
]{}{dice.u3d}
\end{Verbatim}
+\vspace{1ex}
Contents of `dice.vws':
\begin{Verbatim}
VIEW=Front
@@ -699,9 +732,9 @@ Contents of `dice.vws':
\begin{itemize}
\item[a)] Open a text file, e.\,g. `myviews.vws', to be populated with additional views of the 3D object.
\item[b)] Manipulate the 3D object using the mouse (camera position) and via 3D context menu items `\emph{\sffamily Part Options}' and `\emph{\sffamily Viewing Options}' (visibility, rendering attributes, background etc.); the camera target can be moved into the centre of a single part via `\emph{\sffamily Part Options}'$\rightarrow$`\emph{\sffamily Zoom to Part}'.
- \item[c)] Add a cross section plane, adjust its position using the keyboard, keyboard keys are given \hyperlink{3dmenu}{here}.
- \item[d)] Adjust scaling and position of individual parts using the keyboard, keyboard keys are given \hyperlink{3dmenu}{here}.
- \item[e)] Re-adjust the camera distance using either `\emph{\sffamily Generate Default View}' or `\emph{\sffamily Part Options}'$\rightarrow$`\emph{\sffamily Fit Visible}'.
+ \item[c)] Add a cross section plane, adjust its position using the keyboard; keyboard keys are given \hyperlink{3dmenu}{here}.
+ \item[d)] Adjust scaling and position of individual parts using the keyboard; keyboard keys are given \hyperlink{3dmenu}{here}.
+ \item[e)] Re-adjust the camera distance using either `\emph{\sffamily Generate Default View}' or `\emph{\sffamily Part Options}'$\rightarrow$`\emph{\sffamily Fit Visible}'.
\item[f)] When you are done, select `\emph{\sffamily Get Current View}' to get the {\tt VIEW} section, readily formatted for insertion into the views file. Repeat steps (a)--(f) to get any number of views you want to define. The views file can be edited manually to give meaningful names to the views (change the value of the {\tt VIEW} key), or to further tweak camera settings, opacity, part options etc.
\item[g)] Attach the views file with option `{\tt 3Dviews}':
\begin{Verbatim}
@@ -712,7 +745,7 @@ Contents of `dice.vws':
3Dmenu
]{}{myfile.u3d}
\end{Verbatim}
- If you are satisfied with the predefined views in the views file, the default view first specified through the options of {\tt\string\includemovie} can be deleted. The first view in the views file becomes the default view then.
+ If you are satisfied with the predefined views in the views file, the default view first specified through the options of {\tt\string\includemovie} can be deleted. The first view in the views file becomes the default view then.
\end{itemize}
\item Associate any number of 3D JavaScript files with the 3D object:
\begin{Verbatim}