From 02aa64ea1b6cd28f8217d06507a941c70d39dd9a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 27 Mar 2013 21:42:31 +0000 Subject: media9 (27mar13) git-svn-id: svn://tug.org/texlive/trunk@29530 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/media9/ChangeLog | 3 ++ Master/texmf-dist/doc/latex/media9/README | 12 +++--- Master/texmf-dist/doc/latex/media9/files/bird.mp3 | Bin 0 -> 735130 bytes .../texmf-dist/doc/latex/media9/files/boutona.pdf | Bin 0 -> 2363 bytes .../texmf-dist/doc/latex/media9/files/boutonb.pdf | Bin 0 -> 2203 bytes .../texmf-dist/doc/latex/media9/files/boutonc.pdf | Bin 0 -> 2364 bytes .../texmf-dist/doc/latex/media9/files/boutond.pdf | Bin 0 -> 2199 bytes .../texmf-dist/doc/latex/media9/files/boutone.pdf | Bin 0 -> 2236 bytes .../texmf-dist/doc/latex/media9/files/boutonf.pdf | Bin 0 -> 2208 bytes Master/texmf-dist/doc/latex/media9/files/malte.js | 42 ++++++++++++++++++ Master/texmf-dist/doc/latex/media9/files/malte.u3d | Bin 0 -> 105696 bytes .../doc/latex/media9/files/players/APlayer.mxml | 47 +++++++++++++++------ Master/texmf-dist/doc/latex/media9/media9.pdf | Bin 1965301 -> 2703923 bytes Master/texmf-dist/doc/latex/media9/media9.tex | 41 +++++++++++++----- Master/texmf-dist/tex/latex/media9/media9.sty | 2 +- .../tex/latex/media9/players/APlayer.swf | Bin 334500 -> 342345 bytes 16 files changed, 114 insertions(+), 33 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/media9/files/bird.mp3 create mode 100644 Master/texmf-dist/doc/latex/media9/files/boutona.pdf create mode 100644 Master/texmf-dist/doc/latex/media9/files/boutonb.pdf create mode 100644 Master/texmf-dist/doc/latex/media9/files/boutonc.pdf create mode 100644 Master/texmf-dist/doc/latex/media9/files/boutond.pdf create mode 100644 Master/texmf-dist/doc/latex/media9/files/boutone.pdf create mode 100644 Master/texmf-dist/doc/latex/media9/files/boutonf.pdf create mode 100644 Master/texmf-dist/doc/latex/media9/files/malte.js create mode 100644 Master/texmf-dist/doc/latex/media9/files/malte.u3d 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 Binary files /dev/null and b/Master/texmf-dist/doc/latex/media9/files/bird.mp3 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 Binary files /dev/null and b/Master/texmf-dist/doc/latex/media9/files/boutona.pdf 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 Binary files /dev/null and b/Master/texmf-dist/doc/latex/media9/files/boutonb.pdf 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 Binary files /dev/null and b/Master/texmf-dist/doc/latex/media9/files/boutonc.pdf 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 Binary files /dev/null and b/Master/texmf-dist/doc/latex/media9/files/boutond.pdf 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 Binary files /dev/null and b/Master/texmf-dist/doc/latex/media9/files/boutone.pdf 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 Binary files /dev/null and b/Master/texmf-dist/doc/latex/media9/files/boutonf.pdf 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 Binary files /dev/null and b/Master/texmf-dist/doc/latex/media9/files/malte.u3d 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 @@ - + @@ -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 @@ - + - + + diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf index ef51a94cb1b..8d705340487 100644 Binary files a/Master/texmf-dist/doc/latex/media9/media9.pdf and b/Master/texmf-dist/doc/latex/media9/media9.pdf 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=[