summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/media9
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-03-27 21:42:31 +0000
committerKarl Berry <karl@freefriends.org>2013-03-27 21:42:31 +0000
commit02aa64ea1b6cd28f8217d06507a941c70d39dd9a (patch)
treeadf9d2cdba672ede96760270fa056c19518c53af /Master/texmf-dist/doc/latex/media9
parent086cac171c683caf6fa19aa9e4c3bbbaa06ceeb4 (diff)
media9 (27mar13)
git-svn-id: svn://tug.org/texlive/trunk@29530 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/media9')
-rw-r--r--Master/texmf-dist/doc/latex/media9/ChangeLog3
-rw-r--r--Master/texmf-dist/doc/latex/media9/README12
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/bird.mp3bin0 -> 735130 bytes
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/boutona.pdfbin0 -> 2363 bytes
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/boutonb.pdfbin0 -> 2203 bytes
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/boutonc.pdfbin0 -> 2364 bytes
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/boutond.pdfbin0 -> 2199 bytes
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/boutone.pdfbin0 -> 2236 bytes
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/boutonf.pdfbin0 -> 2208 bytes
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/malte.js42
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/malte.u3dbin0 -> 105696 bytes
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml47
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.pdfbin1965301 -> 2703923 bytes
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.tex41
14 files changed, 113 insertions, 32 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/ChangeLog b/Master/texmf-dist/doc/latex/media9/ChangeLog
index fc82d03a38d..c38154a7731 100644
--- a/Master/texmf-dist/doc/latex/media9/ChangeLog
+++ b/Master/texmf-dist/doc/latex/media9/ChangeLog
@@ -1,3 +1,6 @@
+2013-03-27
+ * new: APlayer displays ID3 tags (artist, song, album), if available
+
2013-03-20
* v0.26
* new: specifier for floating window position on screen, default is centred
diff --git a/Master/texmf-dist/doc/latex/media9/README b/Master/texmf-dist/doc/latex/media9/README
index 8c460a3befa..d1ec2276563 100644
--- a/Master/texmf-dist/doc/latex/media9/README
+++ b/Master/texmf-dist/doc/latex/media9/README
@@ -10,13 +10,11 @@ Alexander Grahn
Description:
-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 formats into PDF documents
-with Acrobat-9/X compatibility. 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 formats into PDF documents with Acrobat-9/X
+compatibility. Playback of multimedia files relies on Adobe Flash Player
+which supports the efficient H.264 codec for video compression.
This package is based on the RichMedia Annotation, an Adobe addition to
the PDF specification. It replaces the now obsolete `movie15' package.
diff --git a/Master/texmf-dist/doc/latex/media9/files/bird.mp3 b/Master/texmf-dist/doc/latex/media9/files/bird.mp3
new file mode 100644
index 00000000000..c9bee679cd6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/media9/files/bird.mp3
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/media9/files/boutona.pdf b/Master/texmf-dist/doc/latex/media9/files/boutona.pdf
new file mode 100644
index 00000000000..7ba15d820d7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/media9/files/boutona.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/media9/files/boutonb.pdf b/Master/texmf-dist/doc/latex/media9/files/boutonb.pdf
new file mode 100644
index 00000000000..605076e4070
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/media9/files/boutonb.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/media9/files/boutonc.pdf b/Master/texmf-dist/doc/latex/media9/files/boutonc.pdf
new file mode 100644
index 00000000000..adf016f9556
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/media9/files/boutonc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/media9/files/boutond.pdf b/Master/texmf-dist/doc/latex/media9/files/boutond.pdf
new file mode 100644
index 00000000000..a8170efa614
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/media9/files/boutond.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/media9/files/boutone.pdf b/Master/texmf-dist/doc/latex/media9/files/boutone.pdf
new file mode 100644
index 00000000000..a87b38d6fd9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/media9/files/boutone.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/media9/files/boutonf.pdf b/Master/texmf-dist/doc/latex/media9/files/boutonf.pdf
new file mode 100644
index 00000000000..b687d0aa2ef
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/media9/files/boutonf.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/media9/files/malte.js b/Master/texmf-dist/doc/latex/media9/files/malte.js
new file mode 100644
index 00000000000..4d019e43a62
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/media9/files/malte.js
@@ -0,0 +1,42 @@
+crank=this.scene.nodes.getByName("manivelle-1-1");
+cross=this.scene.nodes.getByName("croix-1-1");
+
+function cntrClockWise(){dir=1; speed=lastspeed;}
+function pause(){if(speed)lastspeed=speed; speed=0;}
+function clockWise(){dir=-1; speed=lastspeed;}
+function scaleSpeed(s){lastspeed*=s; if(speed) speed=lastspeed;}
+function origSpeed(){lastspeed=1; if(speed) speed=lastspeed;}
+
+Ocrank=new Vector3(-0.025, 0, 0);
+Ocross=new Vector3(0.025, 0, 0);
+
+axeZ=new Vector3(0,0,1);
+mx4x4=new Matrix4x4();
+
+var omega0=Math.PI; // init. angular frequency (half turn per second)
+var dir=1; // init. direction
+var speed=0; // speed multiplier
+var lastspeed=1;
+var alpha=0;
+
+timeEvHnd=new TimeEventHandler();
+timeEvHnd.onEvent=function(event) {
+ var dalpha=dir*speed*omega0*event.deltaTime;
+ if (dalpha!=0){
+ mx4x4.setIdentity();
+ mx4x4.rotateAboutLineInPlace(alpha,Ocrank,axeZ);
+ crank.transform.set(mx4x4);
+ with (Math){
+ if (alpha<3*PI/2) beta=0;
+ else beta=-atan(sin(alpha+PI/4)/(sqrt(2)-cos(alpha+PI/4)))+PI/4;
+ }
+ mx4x4.setIdentity();
+ mx4x4.rotateAboutLineInPlace(beta,Ocross,axeZ);
+ cross.transform.set(mx4x4);
+ alpha+=dalpha+2*Math.PI;
+ alpha%=2*Math.PI;
+ scene.update();
+ }
+}
+
+runtime.addEventHandler(timeEvHnd);
diff --git a/Master/texmf-dist/doc/latex/media9/files/malte.u3d b/Master/texmf-dist/doc/latex/media9/files/malte.u3d
new file mode 100644
index 00000000000..d4ea72aaa31
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/media9/files/malte.u3d
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml b/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml
index f8f916e063c..09783ab38af 100644
--- a/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml
+++ b/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml
@@ -4,7 +4,7 @@
<!-- a FlashPlayer-10 compatible component for playing -->
<!-- MP3 audio files and streams. -->
<!-- -->
-<!-- version 20130111 -->
+<!-- version 20130320 -->
<!-- -->
<!-- -->
<!-- The free Adobe Flex 4 SDK is required to compile -->
@@ -40,7 +40,8 @@
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
preinitialize="initialise(FlexGlobals.topLevelApplication.parameters);"
- applicationComplete="initSound();addeventlisteners();"
+ applicationComplete="initSound();addeventlisteners();
+ fadeTargets=new Array(playProgress, caption);"
creationComplete="initCallBacks();"
mouseDown="pause();setFocus();"
mouseUp="play();"
@@ -55,6 +56,8 @@
[Bindable] private var vol:Number=0.75;
[Bindable] private var pan:Number=0;
[Bindable] private var hideBar:Boolean=false;
+ [Bindable] private var fadeTargets:Array;
+ [Bindable] private var txtAlign:String;
private var snd:Sound;
private var sndCh:SoundChannel;
@@ -95,7 +98,7 @@
private function mouseOvrHnd(e:MouseEvent):void {
mouseIsOver=true;
fadeEffect.end();
- playProgress.alpha=1.0;
+ playProgress.alpha=caption.alpha=1.0;
}
private function mouseOutHnd(e:MouseEvent):void {
@@ -120,7 +123,7 @@
break;
case 37: //<--
fadeEffect.end();
- playProgress.alpha=1.0;
+ playProgress.alpha=caption.alpha=1.0;
if(e.ctrlKey){
pan=Math.max(-1,pan-0.025);
balance(pan);
@@ -140,7 +143,7 @@
break;
case 39: //-->
fadeEffect.end();
- playProgress.alpha=1.0;
+ playProgress.alpha=caption.alpha=1.0;
if(e.ctrlKey){
pan=Math.min(1,pan+0.025);
balance(pan);
@@ -187,7 +190,7 @@
}
}
- private function formatTime(s:Number):String {
+ private function formatLabel(s:Number):String {
s/=1000;
var hrs:Number = Math.floor(s / 3600);
var min:Number = Math.floor(s / 60 % 60);
@@ -203,6 +206,16 @@
if(sec<10) fmtd+='0';
fmtd += String(sec);
+ if(snd.id3.songName)
+ fmtd += ' '+ String.fromCharCode(0x2014) + ' ' + snd.id3.songName;
+ if(snd.id3.artist) fmtd += ' | ' + snd.id3.artist;
+ if(snd.id3.album) fmtd += ' | ' + snd.id3.album;
+
+ if(snd.id3.songName || snd.id3.artist || snd.id3.album)
+ txtAlign="start";
+ else
+ txtAlign="center";
+
return fmtd;
}
@@ -306,18 +319,18 @@
if(!playProgress.indeterminate) {
if(playing) {
playProgress.setProgress(sndCh.position,snd.length);
- playProgress.label=formatTime(sndCh.position);
+ caption.text=formatLabel(sndCh.position);
} else {
playProgress.setProgress(playResumePosition,snd.length);
- playProgress.label=formatTime(playResumePosition);
+ caption.text=formatLabel(playResumePosition);
}
}else{
if(playing) {
playProgress.setProgress(Math.random(),1);
- playProgress.label=formatTime(sndCh.position);
+ caption.text=formatLabel(sndCh.position);
} else {
playProgress.setProgress(snd.bytesLoaded,snd.bytesTotal);
- playProgress.label=formatTime(playResumePosition);
+ caption.text=formatLabel(playResumePosition);
}
}
}
@@ -330,11 +343,17 @@
</fx:Script>
<fx:Declarations>
- <s:Fade id="fadeEffect" target="{playProgress}" alphaFrom="1.0" alphaTo="0" duration="2000"/>
+ <s:Fade id="fadeEffect" targets="{fadeTargets}" alphaFrom="1.0" alphaTo="0"
+ duration="2000"/>
</fx:Declarations>
- <mx:ProgressBar width="100%" mode="manual"
- horizontalCenter="0" verticalCenter="0" labelPlacement="center"
- label="" id="playProgress" visible="{!hideBar}"
+ <mx:ProgressBar width="100%" height="100%" mode="manual"
+ labelPlacement="center" label="" id="playProgress"
+ visible="{!hideBar}"
+ />
+
+ <s:Label id="caption" width="100%" height="100%" verticalCenter="0"
+ paddingTop="2" fontWeight="bold" verticalAlign="middle" visible="{!hideBar}"
+ textAlign="{txtAlign}" paddingLeft="5"
/>
</s:Application>
diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf
index ef51a94cb1b..8d705340487 100644
--- a/Master/texmf-dist/doc/latex/media9/media9.pdf
+++ b/Master/texmf-dist/doc/latex/media9/media9.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/media9/media9.tex b/Master/texmf-dist/doc/latex/media9/media9.tex
index af7e936e45a..0bbd61553b5 100644
--- a/Master/texmf-dist/doc/latex/media9/media9.tex
+++ b/Master/texmf-dist/doc/latex/media9/media9.tex
@@ -497,7 +497,7 @@ jsaction=[<label key>:]{<JavaScript code>}
\end{verbatim}
The JavaScript code is executed in the context of the document's instance of the JavaScript engine (there is one instance of the JavaScript engine per open document in Adobe Reader). \verb+<JavaScript code>+ is required and must be enclosed in braces. Unlike media actions defined with options `\verb+mediacommand+' and `\verb+3Dgotoview+', the JavaScript action defined here is not targeted at a particular embedded media and can be used to run arbitrary code. Therefore, \verb+<label key>+ is optional. If provided, it must be separated from \verb+<JavaScript code>+ by a colon. However, it is recommended to provide a label key. It ensures that \verb+annotRM['<label key>']+ is a valid JavaScript reference to the \verb+AnnotRichMedia+ object. \verb+annotRM['<label key>']+ can be used to get access to the global context of the annotation's instance of the 3D JavaScript engine (there is one instance of the 3D JavaScript engine per activated RichMedia Annotation with 3D content). The 3D JavaScript context of a 3D model can be accessed as \verb+annotRM['<label key>'].context3D+. Refer to the Acrobat 3D JavaScript Reference~\cite{jscript3D} for details on built-in JavaScript objects that are available in the 3D context. The \verb+annotRM['<label key>'].callAS()+ method may be used as an alternative to the `\verb+mediacommand+` option in order run exposed ActionScript functions of an embedded Flash file. See~\cite{jscript} for details.
-%\clearpage
+\clearpage
\section[Embedding Flash, video and sound (with examples)]{Embedding Flash, video and sound}
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.
@@ -563,7 +563,7 @@ keys & action\\\hline\hline
\end{tabular}
\end{table}
-\begin{table}[p]
+\begin{table}[bp]
\centering
\caption{Parameters (ActionScript variables) for media players `VPlayer.swf' and `APlayer.swf' shipping with media9. Parameters are passed as a `{\tt\&}'-separated string using `{\tt flashvars}' option.}\label{playerparams}
\begin{tabular}[t]{p{0.4\linewidth}p{0.5\linewidth}}\hline
@@ -579,7 +579,7 @@ parameter & description\\\hline\hline
\end{tabular}
\end{table}
-\begin{table}[p]
+\begin{table}[bp]
\centering
\caption{Exposed ActionScript functions of media players `VPlayer.swf' and `APlayer.swf', that can be called from within media buttons (see Sect. \ref{mbtn}) or from JavaScript using the `{\tt callAS}' method of the `{\tt AnnotRichMedia}' JavaScript object (see~\cite{jscript} for further information).}\label{AVPlayerMethods}
\begin{tabular}[t]{lp{0.25\linewidth}p{0.5\linewidth}}\hline
@@ -597,7 +597,7 @@ function & argument &description\\\hline\hline
\end{tabular}
\end{table}
-\begin{table}[p]
+\begin{table}[bp]
\centering
\caption{Parameters (ActionScript variables) for `StrobeMediaPlayback.swf' shipping with media9. Parameters are passed as a `{\tt\&}'-separated string using `{\tt flashvars}' option.}\label{smpparams}
\begin{tabular}[t]{p{0.4\linewidth}p{0.5\linewidth}}\hline
@@ -619,7 +619,7 @@ parameter & description\\\hline\hline
\end{tabular}
\end{table}
-\begin{figure}[p]
+\begin{figure}[bp]
\centering
\begin{Verbatim}
\includemedia[
@@ -676,7 +676,7 @@ parameter & description\\\hline\hline
\caption{Example of playing back two different embedded MP4 video files in the same video player instance. The player, `VPlayer.swf', is also embedded in the PDF. Exposed ActionScript functions `{\tt playPause}' and `{\tt setSource}' of `VPlayer.swf' (Table~\ref{AVPlayerMethods}) are used to set-up media control buttons. Different button faces have been defined for the Play/Pause button.}\label{videoa}
\end{figure}
-\begin{figure}[p]
+\begin{figure}[bp]
\centering
\begin{Verbatim}
\includemedia[
@@ -706,6 +706,25 @@ parameter & description\\\hline\hline
%\flushright
\begin{Verbatim}
\includemedia[
+ addresource=bird.mp3,
+ flashvars={
+ source=bird.mp3
+ &autoPlay=true
+ },
+ transparent
+ ]{\color{blue}\framebox[0.4\linewidth][c]{Singing bird}}{APlayer.swf}
+\end{Verbatim}
+\makebox[\linewidth]{a)\hfill\includemedia[
+ addresource=bird.mp3,
+ flashvars={
+ source=bird.mp3
+ &autoPlay=true
+ },
+ transparent
+]{\color{blue}\framebox[0.5\linewidth][c]{Singing bird}}{APlayer.swf}
+\hfill}
+\vskip 4ex\begin{Verbatim}
+ \includemedia[
flashvars={
source=http://mp3.live.tv-radio.com/franceculture%
/all/franceculturehautdebit.mp3
@@ -717,7 +736,7 @@ parameter & description\\\hline\hline
contrib/media9/players/APlayer.swf%
}
\end{Verbatim}
-\makebox[\linewidth]{a)\hfill\includemedia[
+\makebox[\linewidth]{b)\hfill\includemedia[
flashvars={
source=http://mp3.live.tv-radio.com/franceculture/all/franceculturehautdebit.mp3
&autoPlay=true
@@ -736,16 +755,16 @@ http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/contrib/media9/players/
&autoPlay=true
},
transparent
- ]{\color{blue}\fbox{Listen to OpenBSD 4.9 release song.}}{APlayer.swf}
+ ]{\color{blue}\fbox{Listen to OpenBSD 4.9 release song}}{APlayer.swf}
\end{Verbatim}
-\makebox[\linewidth]{b)\hfill\includemedia[
+\makebox[\linewidth]{c)\hfill\includemedia[
flashvars={
source=http://www.openbsd.org/songs/song49.mp3
&autoPlay=true
},
transparent
-]{\color{blue}\fbox{Listen to OpenBSD 4.9 release song.}}{APlayer.swf}\hfill}
-\caption{Example of (a) streamed audio and (b) progressively downloaded MP3. In (a), the sound player, APlayer.swf, is loaded from a CTAN mirror upon activation.}\label{radio}
+]{\color{blue}\fbox{Listen to OpenBSD 4.9 release song}}{APlayer.swf}\hfill}
+\caption{Example of (a) embedded sound file, (b) streamed audio and (c) progressively downloaded MP3. ID3 tags `title', `artist' and `album' are displayed if contained in the MP3 stream or file. In (b), the sound player, APlayer.swf, is loaded from a CTAN mirror upon activation.}\label{radio}
\end{figure}
\clearpage