diff options
author | Karl Berry <karl@freefriends.org> | 2013-06-28 22:27:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-06-28 22:27:04 +0000 |
commit | 8cc5831a7004aa1d5c74d29b5806491fafc27323 (patch) | |
tree | 22b30ec2612b7c56b96d8055b2c8cfb98715c112 /Master/texmf-dist | |
parent | 7b1f8729d0ff7cb92ac6b15eee622c02f855e1ea (diff) |
media9 (7jun13)
git-svn-id: svn://tug.org/texlive/trunk@31021 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/ChangeLog | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml | 93 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml | 28 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/media9.pdf | bin | 2703923 -> 2751983 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/media9.tex | 21 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/media9/media9.sty | 104 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/media9/players/APlayer.swf | bin | 342345 -> 343550 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/latex/media9/players/StrobeMediaPlayback.swf | bin | 275712 -> 275743 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/latex/media9/players/VPlayer.swf | bin | 453674 -> 501218 bytes |
9 files changed, 152 insertions, 103 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/ChangeLog b/Master/texmf-dist/doc/latex/media9/ChangeLog index c38154a7731..07751b993d9 100644 --- a/Master/texmf-dist/doc/latex/media9/ChangeLog +++ b/Master/texmf-dist/doc/latex/media9/ChangeLog @@ -1,3 +1,12 @@ +2013-06-06 + * fix: APlayer & VPlayer updated, all players recompiled using + ApacheFlexSDK-4.9.1 + +2013-06-03 + * v0.28 + * fix: updated APlayer.swf + * new: options `draft' and `final' for media bottons + 2013-03-27 * new: APlayer displays ID3 tags (artist, song, album), if available 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 09783ab38af..1822f9b82be 100644 --- a/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml +++ b/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml @@ -1,16 +1,16 @@ <?xml version="1.0"?> <!-- --> -<!-- Adobe Flex 4 source file of APlayer.swf, --> +<!-- Apache Flex 4 source file of APlayer.swf, --> <!-- a FlashPlayer-10 compatible component for playing --> <!-- MP3 audio files and streams. --> <!-- --> -<!-- version 20130320 --> +<!-- version 20130606 --> <!-- --> <!-- --> -<!-- The free Adobe Flex 4 SDK is required to compile --> +<!-- The free Apache Flex 4 SDK is required to compile --> <!-- this file. Get it from --> <!-- --> -<!-- http://www.adobe.com/products/flex/ --> +<!-- http://flex.apache.org/download-binaries.html --> <!-- --> <!-- and run --> <!-- --> @@ -19,7 +19,7 @@ <!-- on the command line. --> <!-- --> <!-- --> -<!-- Copyright (C) 2012 Alexander Grahn --> +<!-- Copyright (C) 2012-today Alexander Grahn --> <!-- --> <!-- This work may be distributed and/or modified under the --> <!-- conditions of the LaTeX Project Public License, either --> @@ -40,7 +40,7 @@ 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();" @@ -60,6 +60,7 @@ [Bindable] private var txtAlign:String; private var snd:Sound; + private var id3:ID3Info; private var sndCh:SoundChannel; private var sndTr:SoundTransform; private var playResumePosition:Number = 0; @@ -83,31 +84,30 @@ } import mx.controls.Alert; + private function initSound():void { - snd = new Sound(new URLRequest(source)); + snd = new Sound(); id3=null; sndTr = new SoundTransform(vol, pan); - - snd.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); - snd.addEventListener(ProgressEvent.PROGRESS, progressHandler); - snd.addEventListener(Event.COMPLETE, completeHandler); - + snd.addEventListener(Event.ID3, onID3Info); + snd.addEventListener(IOErrorEvent.IO_ERROR, onError); + snd.addEventListener(ProgressEvent.PROGRESS, onProgress); + snd.addEventListener(Event.COMPLETE, onComplete); + snd.load(new URLRequest(source), new SoundLoaderContext(1000, true)); if(autoPlay) play(); } - import flash.events.MouseEvent; - private function mouseOvrHnd(e:MouseEvent):void { + private function onMouseOver(e:MouseEvent):void { mouseIsOver=true; fadeEffect.end(); playProgress.alpha=caption.alpha=1.0; } - private function mouseOutHnd(e:MouseEvent):void { + private function onMouseOut(e:MouseEvent):void { mouseIsOver=false; fadeEffect.play(); } - import flash.events.KeyboardEvent; - private function keyDnHnd(e:KeyboardEvent):void { + private function onKeyDown(e:KeyboardEvent):void { switch(e.keyCode) { case 32: //space bar playPause(); @@ -179,7 +179,7 @@ } } - private function keyUpHnd(e:KeyboardEvent):void { + private function onKeyUp(e:KeyboardEvent):void { switch(e.keyCode) { case 37: //<-- case 39: //--> @@ -195,50 +195,43 @@ var hrs:Number = Math.floor(s / 3600); var min:Number = Math.floor(s / 60 % 60); var sec:Number = Math.floor(s % 60); - var fmtd:String=''; - if(hrs>0) fmtd = String(hrs)+':'; - if(hrs>0 && min <10) fmtd+='0'; fmtd += String(min)+':'; - 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"; - + txtAlign="center"; + try{ + if(id3.songName) + fmtd += ' '+ String.fromCharCode(0x2014) + ' ' + id3.songName; + if(id3.artist) fmtd += ' | ' + id3.artist; + if(id3.album) fmtd += ' | ' + id3.album; + if(id3) txtAlign="start"; + }catch(e:Object){} return fmtd; } - private function addeventlisteners():void { + private function addEventListeners():void { this.setFocus(); this.addEventListener(Event.ENTER_FRAME, onEnterFrame); - this.addEventListener(KeyboardEvent.KEY_DOWN, keyDnHnd); - this.addEventListener(KeyboardEvent.KEY_UP, keyUpHnd); - this.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHnd); - this.addEventListener(MouseEvent.MOUSE_OVER, mouseOvrHnd); + this.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); + this.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); + this.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); + this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); } private function setSource(src:String):void { pause(); - snd = new Sound(new URLRequest(src)); - if(autoPlay) play(); + source=src; + initSound(); } private function play():void { if(playing) return; try{sndCh = snd.play(playResumePosition, 0, sndTr);} - catch(err:Error){Alert.show(err.message,'Error');} - sndCh.addEventListener(Event.SOUND_COMPLETE, sndCompleteHandler); + catch(e:Error){Alert.show(e.message,'Error');} + sndCh.addEventListener(Event.SOUND_COMPLETE, onSoundComplete); playing = true; } @@ -300,22 +293,21 @@ ExternalInterface.addCallback("setSource", setSource); } - private function sndCompleteHandler(event:Event):void { + private function onSoundComplete(e:Event):void { playing = false; playResumePosition = 0; if(loop) play(); } - private function completeHandler(event:Event):void { + private function onComplete(e:Event):void { playProgress.indeterminate=false; } - import flash.events.ProgressEvent; - private function progressHandler(event:ProgressEvent):void { + private function onProgress(e:ProgressEvent):void { playProgress.indeterminate=true; } - private function onEnterFrame(event:Event):void { + private function onEnterFrame(e:Event):void { if(!playProgress.indeterminate) { if(playing) { playProgress.setProgress(sndCh.position,snd.length); @@ -335,9 +327,10 @@ } } - import flash.events.IOErrorEvent; - private function errorHandler(errorEvent:IOErrorEvent):void { - Alert.show(errorEvent.text + '\ncould not be loaded','Error'); + private function onID3Info(e:Event):void {id3 = e.target.id3;} + + private function onError(e:ErrorEvent):void { + Alert.show(e.type, e.text); } ]]> </fx:Script> 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 cc28466c8f2..6a18cd7f27c 100644 --- a/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml +++ b/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml @@ -1,16 +1,16 @@ <?xml version="1.0"?> <!-- --> -<!-- Adobe Flex 4 source file of VPlayer.swf, --> +<!-- Apache Flex 4 source file of VPlayer.swf, --> <!-- a FlashPlayer-10 compatible component for playing --> <!-- FLV and MP4/H.264 video files and streams. --> <!-- --> -<!-- version 20130301 --> +<!-- version 20130606 --> <!-- --> <!-- --> -<!-- The free Adobe Flex 4 SDK is required to compile --> +<!-- The free Apache Flex 4 SDK is required to compile --> <!-- this file. Get it from --> <!-- --> -<!-- http://www.adobe.com/products/flex/ --> +<!-- http://flex.apache.org/download-binaries.html --> <!-- --> <!-- and run --> <!-- --> @@ -19,7 +19,7 @@ <!-- on the command line. --> <!-- --> <!-- --> -<!-- Copyright (C) 2012 Alexander Grahn --> +<!-- Copyright (C) 2012-today Alexander Grahn --> <!-- --> <!-- This work may be distributed and/or modified under the --> <!-- conditions of the LaTeX Project Public License, either --> @@ -67,22 +67,20 @@ if(flashVars.stepping){stepping=flashVars.stepping} } - import flash.events.ProgressEvent; - private function progressHandler(event:ProgressEvent):void { + private function onProgress(event:ProgressEvent):void { if (event.bytesTotal) event.target.visible=true; else event.target.visible=false; } import org.osmf.events.MediaPlayerStateChangeEvent; import mx.controls.Alert; - private function stateChangeHandler(event:MediaPlayerStateChangeEvent):void { + private function onStateChange(event:MediaPlayerStateChangeEvent):void { vidComplete=false; if(event.state=='playbackError') Alert.show('Unable to play \''+event.target.source+'\'','Error'); } - import flash.events.KeyboardEvent; - private function keyDnHnd(e:KeyboardEvent):void { + private function onKeyDown(e:KeyboardEvent):void { switch(e.keyCode) { case 32: //space bar playPause(); @@ -140,7 +138,7 @@ } } - private function keyUpHnd(e:KeyboardEvent):void { + private function onKeyUp(e:KeyboardEvent):void { switch(e.keyCode) { case 37: //<-- case 39: //--> @@ -227,8 +225,8 @@ ExternalInterface.addCallback("setSource", setSource); ExternalInterface.addCallback("stepping", step); this.setFocus(); - this.addEventListener(KeyboardEvent.KEY_DOWN, keyDnHnd); - this.addEventListener(KeyboardEvent.KEY_UP, keyUpHnd); + this.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); + this.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); this.addEventListener(Event.ENTER_FRAME, onEnterFrame); } ]]> @@ -245,7 +243,7 @@ autoPlay="{autoPlay}" autoRewind="false" loop="{loop}" mouseDown="if(stepping){vidDisp.play();}else{vidDisp.pause();}this.setFocus();" mouseUp="if(vidComplete) vidDisp.seek(0);if(!stepping){vidDisp.play();}" - mediaPlayerStateChange="stateChangeHandler(event);" + mediaPlayerStateChange="onStateChange(event);" complete="vidComplete=true;" durationChange="if(vidDisp.autoPlay) vidDisp.play(); else vidDisp.seek(0);" /> @@ -254,7 +252,7 @@ horizontalCenter="0" bottom="0" labelPlacement="center" id="loadingProgress" alpha="0.5" complete="loadingProgress.visible=false;" - progress="progressHandler(event)" + progress="onProgress(event)" /> <mx:ProgressBar width="100%" mode="manual" horizontalCenter="0" bottom="0" labelPlacement="center" diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf Binary files differindex 8d705340487..f584cdd6867 100644 --- a/Master/texmf-dist/doc/latex/media9/media9.pdf +++ b/Master/texmf-dist/doc/latex/media9/media9.pdf diff --git a/Master/texmf-dist/doc/latex/media9/media9.tex b/Master/texmf-dist/doc/latex/media9/media9.tex index 0bbd61553b5..14059b30142 100644 --- a/Master/texmf-dist/doc/latex/media9/media9.tex +++ b/Master/texmf-dist/doc/latex/media9/media9.tex @@ -203,17 +203,14 @@ height=<height>, depth=<depth> \end{verbatim} Resize the media playback area, overriding the original dimensions of the {\tt<poster text>} argument. Option `\verb+depth+' specifies how far the playback area should extend below the base line of the running text. If only one of `\verb+width+' or `\verb+height+' is given, the other dimension is scaled to maintain the aspect ratio of \verb+<poster text>+. Any valid \TeX{} dimension is accepted as a parameter. In addition, the length commands \verb+\width+, \verb+\height+, \verb+\depth+ and \verb+\totalheight+ can be used to refer to the original dimensions of \verb+<poster text>+. - \begin{verbatim} label=<label key> \end{verbatim} The media annotation is given a label, \verb+<label key>+, which should be unique. Labelled media annotations can be targeted by the media actions of a control button (see description of the \verb+\mediabutton+ command in Sect. ~\ref{mbtn}). Moreover, a reference to the RichMedia Annotation object (of type `\verb+AnnotRichMedia+') is assigned to the JavaScript variable \verb+annotRM['<label key>']+ in order to facilitate its access in JavaScript. Note that the JavaScript reference is known only after the first opening of the page containing the media. - \begin{verbatim} scale=<factor> \end{verbatim} Scales the playback area by \verb+<factor>+. - \begin{verbatim} addresource=<local file>, addresource=<another local file>, @@ -244,6 +241,7 @@ Decides on how to activate the media annotation. `\verb+activate=onclick+' is de deactivate=onclick | pageclose | pageinvisible \end{verbatim} 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. +\hypertarget{draftfinal}{}% \begin{verbatim} draft final @@ -313,7 +311,6 @@ Mainly used during document authoring. Adds three entries, `\emph{\sffamily Gene `\emph{\sffamily Cross Section}' is a toggle switch to add or remove a cross section to or from the current view. If a part of the 3D scene was previously selected, the central rotating point of the section plane is put into the part's centre, otherwise into the target point of the camera. The section plane can be rotated around the vertical axis and tilted against its upright position using the arrow keys \keys{\arrowkeyleft}, \keys{\arrowkeyright}, \keys{\arrowkeyup} and \keys{\arrowkeydown}. Keys \keys{X}, \keys{\shift+X}, \keys{Y}, \keys{\shift+Y}, \keys{Z}, \keys{\shift+Z} move the section plane along the World axes. `\emph{\sffamily Get Current View}' writes camera settings, any part alterations, an optional cross section as well as part and scene rendering attributes of the current view into the JavaScript console. The output is a readily formatted \verb+VIEW+ section to be inserted into or appended to a file of predefined views. See option `\verb+3Dviews+'. All settings reachable via the `\emph{\sffamily Part Options}' and `\emph{\sffamily Viewing Options}' context menu items are written to the \verb+VIEW+ section. - \begin{verbatim} 3Dbg=<r> <g> <b> \end{verbatim} @@ -470,32 +467,32 @@ Things like animation, lighting, background of 3D objects etc. may also be scrip \mediabutton[<options>]{<normal button text or graphic>} \end{verbatim} This command inserts a clickable button for media control. Actions to be performed are specified through options `\verb+mediacommand+', `\verb+3Dgotoview+' and `\verb+jsaction+'. By using these options repeatedly and in any combination, several actions can be bound to one media button, and one media button can be used to control several media at the same time. Media actions are started in the given order but performed in parallel, because they do not wait for each other to finish. The target of an action is specified via the label key that was also given to a particular media by the `\verb+label+' option of `\verb+\includemedia+'. Individual button faces can be defined for the `mouse-over' and `mouse-button-down' events using the `\verb+overface+' and `\verb+downface+' options. Without options, the button produced does nothing. The options provided are as follows: - \begin{verbatim} overface=<mouse-over text or graphic> \end{verbatim} If specified, the media button changes its appearance when the mouse pointer is moved over it. Without this option, the button appearance does not change. An \verb+\includegraphics+ command may need to be enclosed in braces. - \begin{verbatim} 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. Without this option, the pressed button is visualized by colour inversion of the normal button appearance. An \verb+\includegraphics+ command may need to be enclosed in braces. - \begin{verbatim} 3Dgotoview=<label key>[:<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 key>+, as defined by the `\verb+label+' option of `\verb+\includemedia+'. \verb+<label key>+ alone without a view specification simply activates the 3D object if not yet activated. {\tt<view specification>} which is separated from the label key 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. %For this, one may implement a 3D JavaScript function that is associated with the media button using the `\verb+mediacommand+' option. - \begin{verbatim} mediacommand=<label key>[:<command> [<arg1> <arg2> ...]] \end{verbatim} A media command \verb+<command>+, with arguments if required, is sent to a media inclusion identified by \verb+<label key>+, as defined by the `\verb+label+' option of `\verb+\includemedia+'. \verb+<label key>+ alone without a command specification simply activates the media, if not yet activated. The option can be multiply used within the same button to target different media inclusions at the same time or to execute several commands for the same media. Depending on the type of the target media (3D or Flash), \verb+<command>+ is either the name of a JavaScript function defined in a 3D JavaScript file associated with the 3D media (see option `\verb+add3Djscript+') or the name of an ActionScript function that was exposed by the embedded Flash file. ActionScript functions are exposed to the scripting context of the hosting document by using the \verb+ExternalInterface+ call within the Flash file. Arguments to be passed to \verb+<command>+ must be separated by spaces and the whole list be enclosed in `\verb+[+' and `\verb+]+'. Arguments can be of Boolean type (\verb+true+, \verb+false+), numbers (integer, reals) and strings. String arguments must be passed as \verb+(string arg)+, i.\,e. enclosed in parentheses, while numbers and Booleans are passed as they are. Of course, the number of arguments and their types must match the definition of the function to be called. Media players VPlayer.swf and APlayer.swf shipping with media9 expose a number of ActionScript functions that can be used with this option (see Tab. \ref{AVPlayerMethods}). \verb+<command> [<arg1> <arg2> ...]+ must be enclosed in braces if there are embedded equals signs or commas. - \begin{verbatim} 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. +\begin{verbatim} +draft +final +\end{verbatim} +See \hyperlink{draftfinal}{above}. \clearpage \section[Embedding Flash, video and sound (with examples)]{Embedding Flash, video and sound} @@ -529,7 +526,7 @@ A YouTube video clip, as shown in Fig.~\ref{alien}, may serve as a basic example \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. 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 graphical user controls. Nevertheless, interactivity is provided through the keyboard, as summarized in Table \ref{kbcontrol}, and through left mouse button press and release for playing, pausing and resuming media. `VPlayer.swf' and `APlayer.swf' were compiled, using the free Adobe Flex SDK~\cite{flex}, from XML source 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. +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 graphical user controls. Nevertheless, interactivity is provided through the keyboard, as summarized in Table \ref{kbcontrol}, and through left mouse button press and release for playing, pausing and resuming media. `VPlayer.swf' and `APlayer.swf' were compiled, using the open-source Apache Flex SDK~\cite{flex}, from XML source 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 improvements of `StrobeMediaPlayback.swf' in comparision to the original version on SourceForge.net are \begin{itemize} @@ -628,6 +625,7 @@ parameter & description\\\hline\hline activate=pageopen, addresource=random.mp4, %two video files addresource=cube.mp4, + transparent, flashvars={ source=random.mp4 &loop=true % loop video @@ -654,6 +652,7 @@ parameter & description\\\hline\hline activate=pageopen, addresource=random.mp4, addresource=cube.mp4, + transparent, flashvars={ source=random.mp4 &loop=true @@ -1038,7 +1037,7 @@ This package was written using the new \LaTeX3 syntax which was a lot of fun. Ma \bibitem{jscript} Adobe Systems Inc.: \emph{JavaScript for Acrobat API Reference}, available at \url{http://livedocs.adobe.com/acrobat_sdk/10/Acrobat10_HTMLHelp/JS_API_AcroJSPreface.87.1.html} - \bibitem{flex} Adobe Systems Inc.: \emph{Adobe Flex SDK}, available at \url{http://www.adobe.com/products/flex.html} + \bibitem{flex} The Apache Software Foundation: \emph{Apache Flex SDK}, available at \url{http://flex.apache.org} \bibitem{u3d} ECMA International: \emph{Universal 3D File Format (ECMA-363), 4th Edition}, 2007, available at \url{http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-363\%204th\%20Edition.pdf} diff --git a/Master/texmf-dist/tex/latex/media9/media9.sty b/Master/texmf-dist/tex/latex/media9/media9.sty index 729754eca5b..557376460d6 100644 --- a/Master/texmf-dist/tex/latex/media9/media9.sty +++ b/Master/texmf-dist/tex/latex/media9/media9.sty @@ -4,7 +4,7 @@ % % multimedia inclusion package % -% Copyright 2012 Alexander Grahn +% Copyright 2012--\today Alexander Grahn % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -41,8 +41,8 @@ \RequirePackage{ifpdf} \RequirePackage{atbegshi} -\def\g@mix@date@tl{2013/03/27} -\def\g@mix@version@tl{0.27} +\def\g@mix@date@tl{2013/06/03} +\def\g@mix@version@tl{0.28} \def\g@mix@liiikerneldate{2012/07/16} \def\g@mix@liiipkgdate{2012/07/16} @@ -434,6 +434,32 @@ as~image~resources. } +%excessive DVI resolution message +\group_begin: +\char_set_catcode_active:N\+\let+\space +\tl_gset:Nx\g_mix_dpiwarning_tl{ + {Resolution~1200~gt~VResolution~1200~gt~or~product~(Ghostscript) + search~{pop~pop~pop~true}{pop~false}ifelse~and~{ + (@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\token_to_str:N\n + @@++++Warning:+DVI+resolution+greater+than+1200+dpi!+++++@@\token_to_str:N\n + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\token_to_str:N\n + @@+++++++++++++++++++++++++++++++++++++++++++++++++++++++@@\token_to_str:N\n + @@+Media+poster+and+button+faces+may+be+distorted+or+++++@@\token_to_str:N\n + @@+invisible.++++++++++++++++++++++++++++++++++++++++++++@@\token_to_str:N\n + @@+++++++++++++++++++++++++++++++++++++++++++++++++++++++@@\token_to_str:N\n + @@+Dvips+should+be+called+either+without+option+`-Ppdf':+@@\token_to_str:N\n + @@+++++++++++++++++++++++++++++++++++++++++++++++++++++++@@\token_to_str:N\n + @@+++dvips+\c_job_name_tl\token_to_str:N\n + @@+++++++++++++++++++++++++++++++++++++++++++++++++++++++@@\token_to_str:N\n + @@+or+with+a+different+resolution+setting:+++++++++++++++@@\token_to_str:N\n + @@+++++++++++++++++++++++++++++++++++++++++++++++++++++++@@\token_to_str:N\n + @@+++dvips+-Ppdf+-D1200+\c_job_name_tl\token_to_str:N\n + @@+++++++++++++++++++++++++++++++++++++++++++++++++++++++@@\token_to_str:N\n + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\token_to_str:N\n) + print}~if}~?pdfmark +} +\group_end: + %commands for creating PDF objects, annots etc. \bool_if:NTF\g_mix_pdfoutput_bool{ %helper func to remove `0 R' part from pdf obj reference @@ -612,6 +638,9 @@ } } + %determine DVI resolution and output warning message if too big + \AtBeginDocument{\special{ps:\g_mix_dpiwarning_tl}} + \cs_new:Nn\mix_pdfobj:nnn{ % #1:objref; if empty, a new object number will be reserved % #2:type of object (dict|array|stream|fstream) @@ -2183,7 +2212,24 @@ \cs_generate_variant:Nn\regex_match:nnTF{nV} \cs_generate_variant:Nn\tl_if_blank:nF{c} +\bool_new:N\g_mix_btndraft_bool +\keys_define:nn{media9/mbtndraft}{ + draft .choice:, + draft / true .code:n = {\bool_gset_true:N\g_mix_btndraft_bool}, + draft / false .code:n = {\bool_gset_false:N\g_mix_btndraft_bool}, + draft .default:n = {true}, + + final .choice:, + final / true .code:n = {\bool_gset_false:N\g_mix_btndraft_bool}, + final / false .code:n = {\bool_gset_true:N\g_mix_btndraft_bool}, + final .default:n = {true}, + + unknown .code:n = {} +} \keys_define:nn{media9/mbtn}{ + draft .code:n = {}, + final .code:n = {}, + overface .code:n = { \hbox_set:Nn\l_mix_poster_box{#1} \mix_pdfxform:n{\l_mix_poster_box} @@ -2364,37 +2410,41 @@ \tl_gclear:N\g_mix_downbtn_tl \tl_gclear:N\g_mix_btnactions_tl %process options + \bool_gset_eq:NN\g_mix_btndraft_bool\g_mix_pkgdraft_bool \mix_uribegin: %treat URI characters correctly - \keys_set:nn{media9/mbtn}{#1} + \keys_set:nn{media9/mbtndraft}{#1} %detect draft/final on first pass + \bool_if:NF\g_mix_btndraft_bool{\keys_set:nn{media9/mbtn}{#1}} \mix_uriend: %normal button appearance \hbox_set:Nn\l_mix_poster_box{#2} \tl_set:Nx\width {\dim_use:N\box_wd:N\l_mix_poster_box} \tl_set:Nx\height{\dim_use:N\box_ht:N\l_mix_poster_box} \tl_set:Nx\depth {\dim_use:N\box_dp:N\l_mix_poster_box} - \mix_pdfxform:n{\l_mix_poster_box} - \tl_set:Nx\g_mix_normalbtn_tl{\g_mix_pdflastxform_tl} - %insert widget annotation - \mix_pdfannot:nnnn{\width}{\height}{\depth}{ - /Subtype/Widget - /T~(mbtn@\int_use:N\g_mix_mbtncnt_int) - /FT/Btn/Ff~65536 - /H/P - \tl_if_empty:NTF\g_mix_downbtn_tl{/H/I}{/H/P} - /AP~<< - /N~\g_mix_normalbtn_tl - \tl_if_empty:NF\g_mix_overbtn_tl{/R~\g_mix_overbtn_tl} - \tl_if_empty:NF\g_mix_downbtn_tl{/D~\g_mix_downbtn_tl} - >> - /A~<< - /S/JavaScript/JS~(app.focusRect=false;) - %sequence of actions to perform - \tl_if_empty:NF\g_mix_btnactions_tl{/Next~[\g_mix_btnactions_tl]} - >> - } - \hbox_to_wd:nn{\width}{ - \vrule~width~\c_zero_dim~height~\height~depth~\depth\hss + \bool_if:NTF\g_mix_btndraft_bool{\box_use:N\l_mix_poster_box}{ + \mix_pdfxform:n{\l_mix_poster_box} + \tl_set:Nx\g_mix_normalbtn_tl{\g_mix_pdflastxform_tl} + %insert widget annotation + \mix_pdfannot:nnnn{\width}{\height}{\depth}{ + /Subtype/Widget + /T~(mbtn@\int_use:N\g_mix_mbtncnt_int) + /FT/Btn/Ff~65536 + /H/P + \tl_if_empty:NTF\g_mix_downbtn_tl{/H/I}{/H/P} + /AP~<< + /N~\g_mix_normalbtn_tl + \tl_if_empty:NF\g_mix_overbtn_tl{/R~\g_mix_overbtn_tl} + \tl_if_empty:NF\g_mix_downbtn_tl{/D~\g_mix_downbtn_tl} + >> + /A~<< + /S/JavaScript/JS~(app.focusRect=false;) + %sequence of actions to perform + \tl_if_empty:NF\g_mix_btnactions_tl{/Next~[\g_mix_btnactions_tl]} + >> + } + \hbox_to_wd:nn{\width}{ + \vrule~width~\c_zero_dim~height~\height~depth~\depth\hss + } + \int_gincr:N\g_mix_mbtncnt_int } - \int_gincr:N\g_mix_mbtncnt_int \group_end: } diff --git a/Master/texmf-dist/tex/latex/media9/players/APlayer.swf b/Master/texmf-dist/tex/latex/media9/players/APlayer.swf Binary files differindex a4c1268e38d..3814a057907 100644 --- a/Master/texmf-dist/tex/latex/media9/players/APlayer.swf +++ b/Master/texmf-dist/tex/latex/media9/players/APlayer.swf diff --git a/Master/texmf-dist/tex/latex/media9/players/StrobeMediaPlayback.swf b/Master/texmf-dist/tex/latex/media9/players/StrobeMediaPlayback.swf Binary files differindex fa81f53e21f..afc235629f1 100644 --- a/Master/texmf-dist/tex/latex/media9/players/StrobeMediaPlayback.swf +++ b/Master/texmf-dist/tex/latex/media9/players/StrobeMediaPlayback.swf diff --git a/Master/texmf-dist/tex/latex/media9/players/VPlayer.swf b/Master/texmf-dist/tex/latex/media9/players/VPlayer.swf Binary files differindex 96730f81f6a..6ecea88f358 100644 --- a/Master/texmf-dist/tex/latex/media9/players/VPlayer.swf +++ b/Master/texmf-dist/tex/latex/media9/players/VPlayer.swf |