summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/media9
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-02-17 22:15:11 +0000
committerKarl Berry <karl@freefriends.org>2014-02-17 22:15:11 +0000
commitc8ed9f53a6a902409b383e37e4018be76fd5c4f7 (patch)
tree3028cda50aaaff7ec49e2636e31f306d281a7aa9 /Master/texmf-dist/doc/latex/media9
parentcb14b66aaec03fd9a0fce4e5b3f6d4c9dccb7f3a (diff)
media9 (16feb14)
git-svn-id: svn://tug.org/texlive/trunk@32992 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/media9')
-rw-r--r--Master/texmf-dist/doc/latex/media9/ChangeLog6
-rw-r--r--Master/texmf-dist/doc/latex/media9/README2
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml66
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml32
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.pdfbin3304633 -> 3306411 bytes
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.tex31
6 files changed, 100 insertions, 37 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/ChangeLog b/Master/texmf-dist/doc/latex/media9/ChangeLog
index ba4fd9ac6b7..6752af51885 100644
--- a/Master/texmf-dist/doc/latex/media9/ChangeLog
+++ b/Master/texmf-dist/doc/latex/media9/ChangeLog
@@ -1,3 +1,9 @@
+2014-02-17
+ * v0.40
+ * new: play button visible in AR only
+ * new: updated APlayer and VPlayer with new exposed ActionScript functions
+ `currentTime', `duration', `playing', `muted'
+
2014-02-06
* v0.39
* fix: improved compatibility with `animate' package
diff --git a/Master/texmf-dist/doc/latex/media9/README b/Master/texmf-dist/doc/latex/media9/README
index d1ec2276563..a699541f9a1 100644
--- a/Master/texmf-dist/doc/latex/media9/README
+++ b/Master/texmf-dist/doc/latex/media9/README
@@ -75,6 +75,6 @@ License:
This material is subject to the LaTeX Project Public License. See
- http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+ http://mirrors.ctan.org/help/Catalogue/licenses.lppl.html
for the details of that license.
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 ad13e304471..78503bc4695 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 20131114 -->
+<!-- version 20140211 -->
<!-- -->
<!-- -->
<!-- The free Apache Flex 4 SDK is required to compile -->
@@ -65,12 +65,12 @@
private var sndCh:SoundChannel;
private var sndTr:SoundTransform;
private var playResumePosition:Number = 0;
- private var playing:Boolean = false;
+ private var plyng:Boolean = false;
private var muted:Boolean = false;
private var lastVol:Number;
private var deltaSeek:Number;
- private var currentTime:Number;
+ private var curTime:Number;
private var keyPressed:Boolean=false;
private var mouseIsOver:Boolean=false;
@@ -134,14 +134,14 @@
}
if(!keyPressed){
deltaSeek=Math.max(100,snd.length/10000);
- if(playing)
- currentTime=sndCh.position;
+ if(plyng)
+ curTime=sndCh.position;
else
- currentTime=playResumePosition;
+ curTime=playResumePosition;
}
keyPressed=true;
- playResumePosition=Math.max(0,currentTime-deltaSeek);
- if(playing) seek(playResumePosition/1000);
+ playResumePosition=Math.max(0,curTime-deltaSeek);
+ if(plyng) seek(playResumePosition/1000);
deltaSeek*=1.1;
break;
case 39: //-->
@@ -154,14 +154,14 @@
}
if(!keyPressed){
deltaSeek=Math.max(100,snd.length/10000);
- if(playing)
- currentTime=sndCh.position;
+ if(plyng)
+ curTime=sndCh.position;
else
- currentTime=playResumePosition;
+ curTime=playResumePosition;
}
keyPressed=true;
- playResumePosition=Math.min(snd.length-10,currentTime+deltaSeek);
- seek(playResumePosition/1000);
+ playResumePosition=Math.min(snd.length-10,curTime+deltaSeek);
+ seek(playResumePosition/1000);
deltaSeek*=1.1;
break;
case 38:
@@ -234,29 +234,29 @@
private function loadPolicy(p:String):void {policy=p;}
private function play():void {
- if(playing) return;
+ if(plyng) return;
try{sndCh = snd.play(playResumePosition, 0, sndTr);}
catch(e:Error){Alert.show(e.message,'Error');}
sndCh.addEventListener(Event.SOUND_COMPLETE, onSoundComplete);
- playing = true;
+ plyng = true;
}
private function pause():void {
- if(!playing) return;
+ if(!plyng) return;
playResumePosition = sndCh.position;
sndCh.stop();
- playing = false;
+ plyng = false;
}
private function playPause():void {
- if(playing) pause(); else play();
+ if(plyng) pause(); else play();
}
private function seek(p:Number):void {
playResumePosition = p*1000;
- if(!playing) return;
+ if(!plyng) return;
sndCh.stop();
- playing = false;
+ plyng = false;
play();
}
@@ -287,6 +287,22 @@
sndCh.soundTransform=sndTr;
}
+ private function currentTime():Number {
+ return sndCh.position/1000;
+ }
+
+ private function playing():Boolean {
+ return plyng;
+ }
+
+ private function duration():Number {
+ return snd.length/1000;
+ }
+
+ private function ismuted():Boolean {
+ return muted;
+ }
+
private function initCallBacks():void {
ExternalInterface.addCallback("play", play);
ExternalInterface.addCallback("pause", pause);
@@ -298,10 +314,14 @@
ExternalInterface.addCallback("mute", mute);
ExternalInterface.addCallback("setSource", setSource);
ExternalInterface.addCallback("loadPolicy", loadPolicy);
+ ExternalInterface.addCallback("currentTime", currentTime);
+ ExternalInterface.addCallback("duration", duration);
+ ExternalInterface.addCallback("playing", playing);
+ ExternalInterface.addCallback("muted", ismuted);
}
private function onSoundComplete(e:Event):void {
- playing = false;
+ plyng = false;
playResumePosition = 0;
if(loop) play();
}
@@ -316,7 +336,7 @@
private function onEnterFrame(e:Event):void {
if(!playProgress.indeterminate) {
- if(playing) {
+ if(plyng) {
playProgress.setProgress(sndCh.position,snd.length);
caption.text=formatLabel(sndCh.position);
} else {
@@ -324,7 +344,7 @@
caption.text=formatLabel(playResumePosition);
}
}else{
- if(playing) {
+ if(plyng) {
playProgress.setProgress(Math.random(),1);
caption.text=formatLabel(sndCh.position);
} else {
diff --git a/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml b/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml
index a244fabc943..2c71e372b52 100644
--- a/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml
+++ b/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml
@@ -4,7 +4,7 @@
<!-- a FlashPlayer-10 compatible component for playing -->
<!-- FLV and MP4/H.264 video files and streams. -->
<!-- -->
-<!-- version 20131114 -->
+<!-- version 20140211 -->
<!-- -->
<!-- -->
<!-- The free Apache Flex 4 SDK is required to compile -->
@@ -53,7 +53,7 @@
[Bindable] private var stepping:Boolean=false;
private var vidComplete:Boolean=false;
private var deltaSeek:Number;
- private var currentTime:Number;
+ private var curTime:Number;
private var newPos:Number;
private var keyPressed:Boolean=false;
@@ -101,10 +101,10 @@
playProgress.visible=true;
if(!keyPressed){
deltaSeek=Math.max(1,vidDisp.duration/1000);
- currentTime=vidDisp.currentTime;
+ curTime=vidDisp.currentTime;
}
keyPressed=true;
- newPos=Math.max(0,currentTime-deltaSeek);
+ newPos=Math.max(0,curTime-deltaSeek);
playProgress.setProgress(newPos,vidDisp.duration);
playProgress.label=formatTime(newPos);
vidDisp.seek(newPos);
@@ -116,10 +116,10 @@
playProgress.visible=true;
if(!keyPressed){
deltaSeek=Math.max(1,vidDisp.duration/1000);
- currentTime=vidDisp.currentTime;
+ curTime=vidDisp.currentTime;
}
keyPressed=true;
- newPos=Math.min(vidDisp.duration-0.1,currentTime+deltaSeek);
+ newPos=Math.min(vidDisp.duration-0.1,curTime+deltaSeek);
playProgress.setProgress(newPos,vidDisp.duration);
playProgress.label=formatTime(newPos);
vidDisp.seek(newPos);
@@ -214,6 +214,22 @@
return fmtd;
}
+ private function currentTime():Number {
+ return vidDisp.currentTime;
+ }
+
+ private function playing():Boolean {
+ return vidDisp.playing;
+ }
+
+ private function duration():Number {
+ return vidDisp.duration;
+ }
+
+ private function muted():Boolean {
+ return vidDisp.muted;
+ }
+
private function init():void {
this.setFocus();
this.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
@@ -228,6 +244,10 @@
ExternalInterface.addCallback("mute", mute);
ExternalInterface.addCallback("setSource", setSource);
ExternalInterface.addCallback("stepping", step);
+ ExternalInterface.addCallback("currentTime", currentTime);
+ ExternalInterface.addCallback("duration", duration);
+ ExternalInterface.addCallback("playing", playing);
+ ExternalInterface.addCallback("muted", muted);
}
]]>
</fx:Script>
diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf
index c4da341629a..8b64de02420 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 9149ea8ed2d..155b0af9d44 100644
--- a/Master/texmf-dist/doc/latex/media9/media9.tex
+++ b/Master/texmf-dist/doc/latex/media9/media9.tex
@@ -27,6 +27,7 @@
\usepackage{tabls}
\usepackage{menukeys}
\usepackage{hyperref}
+\usepackage{hypcap}
\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,
@@ -59,11 +60,11 @@
\renewcommand{\topfraction}{1.0}
\renewcommand{\bottomfraction}{1.0}
-\ifpdf\else
- \makeatletter
- \@latex@error{Please use pdfLaTeX to compile this documentation}
- \makeatother
-\fi
+%\ifpdf\else
+% \makeatletter
+% \@latex@error{Please use pdfLaTeX to compile this documentation}
+% \makeatother
+%\fi
\def\parsedate#1/#2/#3\relax{
\def\year{#1}
@@ -482,6 +483,10 @@ downface=<mouse-button-down text or graphic>
\end{verbatim}
If specified, the media button changes its appearance when the mouse button is pressed while the pointer is over it. When pressed, the button is always slightly offset to appear as if it were being pushed below the surface of the page. An \verb+\includegraphics+ command may need to be enclosed in braces.
\begin{verbatim}
+tooltip=<tip text>
+\end{verbatim}
+A box with \verb+<tip text>+ is shown when the mouse pointer is moved over the button.
+\begin{verbatim}
3Dgotoview=<label text>[:<view specification>]
\end{verbatim}
Selects a view from the list of predefined views associated with a 3D media inclusion (see option `\verb+3Dviews+'). The target media is specified by \verb+<label text>+, as defined by the `\verb+label+' option of `\verb+\includemedia+'. \verb+<label text>+ alone without a view specification simply activates the 3D object if not yet activated. {\tt<view specification>} which is separated from the label by a colon (\verb+:+) can be one of the following: an integer specifying the zero-based index into the list of views in the 3D views file; one of `\verb+D+', `\verb+F+', `\verb+L+', `\verb+N+', `\verb+P+' indicating the default, first, last, next or previous view in the list of views; a string delimited by `\verb+(+' and `\verb+)+' matching the name of a view as specified by the `\verb+VIEW=...+' entry in the views file. The option can be given several times to simultaneously change the view in more than one 3D inclusion. However, it cannot be used to create an animation effect within the same 3D inclusion, because \verb+3Dgotoview+ actions are executed in parallel.
@@ -547,7 +552,15 @@ Like YouTube videos, media players are configured via ActionScript variables whi
Playback of embedded video files is shown in Fig.~\ref{videoa}. Besides embedded files, also video streamed from remote servers via HTTP and RTMP protocols is supported, as shown in Fig.~\ref{videob}.
-`VPlayer.swf' and `APlayer.swf' expose a number of ActionScript functions to the JavaScript engine of Adobe Reader, allowing for playback control of media through push buttons (see Sect. \ref{mbtn}) and various trigger events. The functions and their calling convention are listed in Table~\ref{AVPlayerMethods}. An example of playing and pausing a video clip and setting the video source via interactive push buttons is given in Fig.~\ref{videoa}.
+`VPlayer.swf' and `APlayer.swf' expose a number of ActionScript functions to the JavaScript engine of Adobe Reader, allowing for playback control of media through push buttons (see Sect. \ref{mbtn}) and various trigger events. The functions and their calling convention are listed in Table~\ref{AVPlayerMethods}. From within JavaScript, these functions can be called using the `\verb+callAS+' (=~call ActionScript) method of the \verb+AnnotRichMedia+ object. As an example, a call to the `\verb+seek+' function looks like
+\begin{verbatim}
+ annotRM.myvideo.callAS("seek", 12.3);
+\end{verbatim}
+and a call to the parameter-less function `\verb+pause+' like
+\begin{verbatim}
+ annotRM.myvideo.callAS("pause");
+\end{verbatim}
+Both functions calls are sent to the media inclusion that was labelled `\verb+myvideo+' using the `\verb+label+' option of \verb+\includemedia+. An example of playing and pausing a video clip and setting the video source via interactive push buttons is given in Fig.~\ref{videoa}.
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 remote MP3 sound file. In one of the sound examples, the player is loaded from a CTAN mirror during runtime because an internet connection is required anyway for streaming the audio. If a local sound file is to be embedded into the PDF this would have to be done in the same way as with the video file in one of the previous examples using the `\verb+addresource+' option.
%\clearpage
@@ -596,7 +609,11 @@ function & argument &description\\\hline\hline
{\tt rewind} & & rewind media to the beginning (without pausing it)\\
{\tt volume} & number between 0 and 1 & set volume level\\
{\tt balance} & number between $-1$ and $+1$ & (APlayer.swf only) set speaker balance\\
-{\tt mute} & & mute or unmute (toggle) the audio of the media\\\hline
+{\tt mute} & & mute or unmute (toggle) the audio of the media\\
+{\tt currentTime}& & returns current playhead position in seconds; only useful in JavaScript via `{\tt callAS}' method\\
+{\tt duration} & & returns duration of the media video/sound file currently loaded, only useful in JavaScript via `{\tt callAS}' method\\
+{\tt playing} & & returns boolean value `{\tt true}', if the media is currently playing, `{\tt true}' otherwise; only useful in JavaScript via `{\tt callAS}' method\\
+{\tt muted} & & returns boolean value `{\tt true}', if the sound is currently muted, `{\tt false}' otherwise; only useful in JavaScript via `{\tt callAS}' method\\\hline
\end{tabular}
\end{table}