diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/media9')
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/ChangeLog | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/files/bird.mp3 | bin | 0 -> 735130 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml | 393 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/files/players/APlayer9.mxml | 380 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/files/players/BSD-License | 32 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/files/players/SMPfixes.patch | 158 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/files/players/StrobeMediaPlayback-license | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml | 303 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/files/players/VPlayer9.mxml | 294 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/media9.pdf | bin | 3281076 -> 3281492 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/media9/media9.tex | 1 |
11 files changed, 4 insertions, 1566 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/ChangeLog b/Master/texmf-dist/doc/latex/media9/ChangeLog index defb05a9812..ae62c8eed9f 100644 --- a/Master/texmf-dist/doc/latex/media9/ChangeLog +++ b/Master/texmf-dist/doc/latex/media9/ChangeLog @@ -1,3 +1,7 @@ +2015-01-21 + * v0.49 + * Fix: some more OCG related code changes + 2014-10-20 * v0.48 * fix: minor code change related to AcroForm and OCProperties catalog entries diff --git a/Master/texmf-dist/doc/latex/media9/files/bird.mp3 b/Master/texmf-dist/doc/latex/media9/files/bird.mp3 Binary files differnew file mode 100644 index 00000000000..c9bee679cd6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/media9/files/bird.mp3 diff --git a/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml b/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml deleted file mode 100644 index 30ae5de9229..00000000000 --- a/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml +++ /dev/null @@ -1,393 +0,0 @@ -<?xml version="1.0"?> -<!-- --> -<!-- Apache Flex 4 source file of APlayer.swf, --> -<!-- a FlashPlayer-10 compatible component for playing --> -<!-- MP3 audio files and streams. --> -<!-- --> -<!-- version 20140625 --> -<!-- --> -<!-- --> -<!-- The free Apache Flex 4 SDK is required to compile --> -<!-- this file. Get it from --> -<!-- --> -<!-- http://flex.apache.org/download-binaries.html --> -<!-- --> -<!-- and run --> -<!-- --> -<!-- mxmlc -static-link-runtime-shared-libraries APlayer.mxml --> -<!-- --> -<!-- on the command line. --> -<!-- --> -<!-- --> -<!-- Copyright (C) 2012-today Alexander Grahn --> -<!-- --> -<!-- This work may be distributed and/or modified under the --> -<!-- conditions of the LaTeX Project Public License, either --> -<!-- version 1.3 of this license or (at your option) any later --> -<!-- version. --> -<!-- --> -<!-- The latest version of this license is in --> -<!-- http://www.latex-project.org/lppl.txt --> -<!-- and version 1.3 or later is part of all distributions of --> -<!-- LaTeX version 2005/12/01 or later. --> -<!-- --> -<!-- This work has the LPPL maintenance status `maintained'. --> -<!-- --> -<!-- The current maintainer of this work is A. Grahn. --> -<!-- --> - -<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" - xmlns:s="library://ns.adobe.com/flex/spark" - xmlns:mx="library://ns.adobe.com/flex/mx" - preinitialize="initialise(FlexGlobals.topLevelApplication.parameters);" - applicationComplete="initSound();addEventListeners(); - fadeTargets=new Array(playProgress, caption);" - creationComplete="initCallBacks();" - mouseDown="pause();setFocus();" - mouseUp="play();" - backgroundAlpha="0" -> - - <fx:Script> - <![CDATA[ - [Bindable] private var source:String; - [Bindable] private var policy:String=null; - [Bindable] private var autoPlay:Boolean=false; - [Bindable] private var loop:Boolean=false; - [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 id3:ID3Info; - private var sndCh:SoundChannel; - private var sndTr:SoundTransform; - private var playResumePos:Number = 0; - private var pauseAtPos:Number = -1; - private var toBePaused:Boolean = false; - private var plyng:Boolean = false; - private var muted:Boolean = false; - private var lastVol:Number; - - private var deltaSeek:Number; - private var curTime:Number; - private var keyPressed:Boolean=false; - private var mouseIsOver:Boolean=false; - - import mx.core.FlexGlobals; - private function initialise(flashVars:Object):void { - source=flashVars.source; - if(flashVars.policy) policy=flashVars.policy; - if(flashVars.autoPlay=='true') autoPlay=true; - if(flashVars.loop=='true') loop=true; - if(flashVars.volume) vol=Number(flashVars.volume); - if(flashVars.balance) pan=Number(flashVars.balance); - if(flashVars.hideBar=='true') hideBar=true; - } - - import mx.controls.Alert; - - private function initSound():void { - snd = new Sound(); id3=null; - sndTr = new SoundTransform(vol, pan); - snd.addEventListener(Event.ID3, onID3Info); - snd.addEventListener(IOErrorEvent.IO_ERROR, onError); - snd.addEventListener(ProgressEvent.PROGRESS, onProgress); - snd.addEventListener(Event.COMPLETE, onComplete); - if(policy) Security.loadPolicyFile(policy); - snd.load(new URLRequest(source), new SoundLoaderContext(1000, true)); - if(autoPlay) play(); - } - - private function onMouseOver(e:MouseEvent):void { - mouseIsOver=true; - fadeEffect.end(); - playProgress.alpha=caption.alpha=1.0; - } - - private function onMouseOut(e:MouseEvent):void { - mouseIsOver=false; - fadeEffect.play(); - } - - private function onKeyDown(e:KeyboardEvent):void { - switch(e.keyCode) { - case 32: //space bar - playPause(); - break; - case 36: //home - pause(); - playResumePos=(0); - break; - case 35: //end - if(playProgress.indeterminate) break; - pause(); - playResumePos=(snd.length); - break; - case 37: //<-- - fadeEffect.end(); - playProgress.alpha=caption.alpha=1.0; - if(e.ctrlKey){ - pan=Math.max(-1,pan-0.025); - balance(pan); - break; - } - if(!keyPressed){ - deltaSeek=Math.max(100,snd.length/10000); - if(plyng) - curTime=sndCh.position; - else - curTime=playResumePos; - } - keyPressed=true; - playResumePos=Math.max(0,curTime-deltaSeek); - if(plyng) seek(playResumePos/1000); - deltaSeek*=1.1; - break; - case 39: //--> - fadeEffect.end(); - playProgress.alpha=caption.alpha=1.0; - if(e.ctrlKey){ - pan=Math.min(1,pan+0.025); - balance(pan); - break; - } - if(!keyPressed){ - deltaSeek=Math.max(100,snd.length/10000); - if(plyng) - curTime=sndCh.position; - else - curTime=playResumePos; - } - keyPressed=true; - playResumePos=Math.min(snd.length-10,curTime+deltaSeek); - seek(playResumePos/1000); - deltaSeek*=1.1; - break; - case 38: - vol=Math.min(1,vol+0.025); - volume(vol); - break; - case 40: - if(e.ctrlKey){ - pan=0; - balance(pan); - break; - } - vol=Math.max(0,vol-0.025); - volume(vol); - break; - default: - if(e.charCode==109) mute(); //`m' - } - } - - private function onKeyUp(e:KeyboardEvent):void { - switch(e.keyCode) { - case 37: //<-- - case 39: //--> - deltaSeek=Math.max(100,snd.length/10000); - keyPressed=false; - if (!mouseIsOver) fadeEffect.play(); - break; - } - } - - private function formatLabel(s:Number):String { - s/=1000; - 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); - 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 { - this.setFocus(); - this.addEventListener(Event.ENTER_FRAME, onEnterFrame); - 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(s:String):void { - pause(); - source=s; - initSound(); - pause();seek(0); - } - - private function loadPolicy(p:String):void {policy=p;} - - private function play(p:Number=-1):void { - if(p>=0) seek(p); - if(plyng) return; - try{sndCh = snd.play(playResumePos, 0, sndTr);} - catch(e:Error){Alert.show(e.message,'Error');} - sndCh.addEventListener(Event.SOUND_COMPLETE, onSoundComplete); - plyng = true; - } - - private function pause(p:Number=-1):void { - if(p>=0){pauseAtPos=p*1000;return;} - if(!plyng) return; - playResumePos = sndCh.position; - sndCh.stop(); - plyng = false; - } - - private function playPause():void { - if(plyng) pause(); else play(); - } - - private function seek(p:Number):void { - playResumePos = p*1000; - if(!plyng) return; - sndCh.stop(); - plyng = false; - play(); - } - - private function rewind():void { - seek(0); - } - - private function volume(v:Number):void { - sndTr.volume = v; - sndCh.soundTransform=sndTr; - } - - private function mute():void { - if(muted) { - if(lastVol==0) lastVol=0.75; - volume(lastVol); - muted=false; - } - else { - lastVol = sndTr.volume - volume(0); - muted=true; - } - } - - private function balance(p:Number):void { - sndTr.pan = p; - 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); - ExternalInterface.addCallback("playPause", playPause); - ExternalInterface.addCallback("seek", seek); - ExternalInterface.addCallback("rewind", rewind); - ExternalInterface.addCallback("volume", volume); - ExternalInterface.addCallback("balance", balance); - 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 { - plyng = false; - playResumePos = 0; - if(loop) play(); - } - - private function onComplete(e:Event):void { - playProgress.indeterminate=false; - } - - private function onProgress(e:ProgressEvent):void { - playProgress.indeterminate=true; - } - - private function onEnterFrame(e:Event):void { - if(!playProgress.indeterminate) { - if(plyng) { - playProgress.setProgress(sndCh.position,snd.length); - caption.text=formatLabel(sndCh.position); - } else { - playProgress.setProgress(playResumePos,snd.length); - caption.text=formatLabel(playResumePos); - } - }else{ - if(plyng) { - playProgress.setProgress(Math.random(),1); - caption.text=formatLabel(sndCh.position); - } else { - playProgress.setProgress(snd.bytesLoaded,snd.bytesTotal); - caption.text=formatLabel(playResumePos); - } - } - if(plyng&&pauseAtPos>=0&&sndCh.position<pauseAtPos) - toBePaused=true; - if( - plyng&&pauseAtPos>=0&& - sndCh.position>=pauseAtPos&&toBePaused - ){ - pause(); - pauseAtPos=-1; - toBePaused=false; - } - } - - private function onID3Info(e:Event):void {id3 = e.target.id3;} - - private function onError(e:ErrorEvent):void { - Alert.show(e.type, e.text); - } - ]]> - </fx:Script> - - <fx:Declarations> - <s:Fade id="fadeEffect" targets="{fadeTargets}" alphaFrom="1.0" alphaTo="0" - duration="2000"/> - </fx:Declarations> - - <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/files/players/APlayer9.mxml b/Master/texmf-dist/doc/latex/media9/files/players/APlayer9.mxml deleted file mode 100644 index 1a80f98c921..00000000000 --- a/Master/texmf-dist/doc/latex/media9/files/players/APlayer9.mxml +++ /dev/null @@ -1,380 +0,0 @@ -<?xml version="1.0"?> -<!-- --> -<!-- Adobe Flex 3 source file of APlayer9.swf, --> -<!-- a FlashPlayer-9 compatible component for playing --> -<!-- MP3 audio files and streams. --> -<!-- --> -<!-- version 20140625 --> -<!-- --> -<!-- Copyright (C) 2012-today Alexander Grahn --> -<!-- --> -<!-- This work may be distributed and/or modified under the --> -<!-- conditions of the LaTeX Project Public License, either --> -<!-- version 1.3 of this license or (at your option) any later --> -<!-- version. --> -<!-- --> -<!-- The latest version of this license is in --> -<!-- http://www.latex-project.org/lppl.txt --> -<!-- and version 1.3 or later is part of all distributions of --> -<!-- LaTeX version 2005/12/01 or later. --> -<!-- --> -<!-- This work has the LPPL maintenance status `maintained'. --> -<!-- --> -<!-- The current maintainer of this work is A. Grahn. --> -<!-- --> - -<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" - preinitialize="initialise(Application.application.parameters);" - applicationComplete="initSound();addEventListeners();" - creationComplete="initCallBacks();" - mouseDown="pause();setFocus();" - mouseUp="play();" - backgroundAlpha="0" - paddingTop="0" paddingBottom="0" - paddingLeft="0" paddingRight="0" - layout="absolute" clipContent="false" -> - - <mx:Script> - <![CDATA[ - [Bindable] private var source:String; - [Bindable] private var policy:String=null; - [Bindable] private var autoPlay:Boolean=false; - [Bindable] private var loop:Boolean=false; - [Bindable] private var vol:Number=0.75; - [Bindable] private var pan:Number=0; - [Bindable] private var hideBar:Boolean=false; - [Bindable] private var txtAlign:String; - - private var snd:Sound; - private var id3:ID3Info; - private var sndCh:SoundChannel; - private var sndTr:SoundTransform; - private var playResumePos:Number = 0; - private var pauseAtPos:Number = -1; - private var toBePaused:Boolean = false; - private var plyng:Boolean = false; - private var muted:Boolean = false; - private var lastVol:Number; - - private var deltaSeek:Number; - private var curTime:Number; - private var keyPressed:Boolean=false; - private var mouseIsOver:Boolean=false; - - import flash.external.*; - private function initialise(flashVars:Object):void { - source=flashVars.source; - if(flashVars.policy) policy=flashVars.policy; - if(flashVars.autoPlay=='true') autoPlay=true; - if(flashVars.loop=='true') loop=true; - if(flashVars.volume) vol=Number(flashVars.volume); - if(flashVars.balance) pan=Number(flashVars.balance); - if(flashVars.hideBar=='true') hideBar=true; - } - - import mx.controls.Alert; - - private function initSound():void { - snd = new Sound(); id3=null; - sndTr = new SoundTransform(vol, pan); - snd.addEventListener(Event.ID3, onID3Info); - snd.addEventListener(IOErrorEvent.IO_ERROR, onError); - snd.addEventListener(ProgressEvent.PROGRESS, onProgress); - snd.addEventListener(Event.COMPLETE, onComplete); - if(policy) Security.loadPolicyFile(policy); - snd.load(new URLRequest(source), new SoundLoaderContext(1000, true)); - if(autoPlay) play(); - } - - private function onMouseOver(e:MouseEvent):void { - mouseIsOver=true; - fadeEffect.end(); - playProgress.alpha=caption.alpha=1.0; - caption.visible=!hideBar; - } - - private function onMouseOut(e:MouseEvent):void { - mouseIsOver=false; - fadeEffect.play(); - } - - private function onKeyDown(e:KeyboardEvent):void { - switch(e.keyCode) { - case 32: //space bar - playPause(); - break; - case 36: //home - pause(); - playResumePos=(0); - break; - case 35: //end - if(playProgress.indeterminate) break; - pause(); - playResumePos=(snd.length); - break; - case 37: //<-- - fadeEffect.end(); - playProgress.alpha=caption.alpha=1.0; - caption.visible=!hideBar; - if(e.ctrlKey){ - pan=Math.max(-1,pan-0.025); - balance(pan); - break; - } - if(!keyPressed){ - deltaSeek=Math.max(100,snd.length/10000); - if(plyng) - curTime=sndCh.position; - else - curTime=playResumePos; - } - keyPressed=true; - playResumePos=Math.max(0,curTime-deltaSeek); - if(plyng) seek(playResumePos/1000); - deltaSeek*=1.1; - break; - case 39: //--> - fadeEffect.end(); - playProgress.alpha=caption.alpha=1.0; - caption.visible=!hideBar; - if(e.ctrlKey){ - pan=Math.min(1,pan+0.025); - balance(pan); - break; - } - if(!keyPressed){ - deltaSeek=Math.max(100,snd.length/10000); - if(plyng) - curTime=sndCh.position; - else - curTime=playResumePos; - } - keyPressed=true; - playResumePos=Math.min(snd.length-10,curTime+deltaSeek); - seek(playResumePos/1000); - deltaSeek*=1.1; - break; - case 38: - vol=Math.min(1,vol+0.025); - volume(vol); - break; - case 40: - if(e.ctrlKey){ - pan=0; - balance(pan); - break; - } - vol=Math.max(0,vol-0.025); - volume(vol); - break; - default: - if(e.charCode==109) mute(); //`m' - } - } - - private function onKeyUp(e:KeyboardEvent):void { - switch(e.keyCode) { - case 37: //<-- - case 39: //--> - deltaSeek=Math.max(100,snd.length/10000); - keyPressed=false; - if (!mouseIsOver) fadeEffect.play(); - break; - } - } - - private function formatLabel(s:Number):String { - s/=1000; - 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); - 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 { - this.setFocus(); - this.addEventListener(Event.ENTER_FRAME, onEnterFrame); - 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(s:String):void { - pause(); - source=s; - initSound(); - pause();seek(0); - } - - private function loadPolicy(p:String):void {policy=p;} - - private function play(p:Number=-1):void { - if(p>=0) seek(p); - if(plyng) return; - try{sndCh = snd.play(playResumePos, 0, sndTr);} - catch(e:Error){Alert.show(e.message,'Error');} - sndCh.addEventListener(Event.SOUND_COMPLETE, onSoundComplete); - plyng = true; - } - - private function pause(p:Number=-1):void { - if(p>=0){pauseAtPos=p*1000;return;} - if(!plyng) return; - playResumePos = sndCh.position; - sndCh.stop(); - plyng = false; - } - - private function playPause():void { - if(plyng) pause(); else play(); - } - - private function seek(p:Number):void { - playResumePos = p*1000; - if(!plyng) return; - sndCh.stop(); - plyng = false; - play(); - } - - private function rewind():void { - seek(0); - } - - private function volume(v:Number):void { - sndTr.volume = v; - sndCh.soundTransform=sndTr; - } - - private function mute():void { - if(muted) { - if(lastVol==0) lastVol=0.75; - volume(lastVol); - muted=false; - } - else { - lastVol = sndTr.volume - volume(0); - muted=true; - } - } - - private function balance(p:Number):void { - sndTr.pan = p; - 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); - ExternalInterface.addCallback("playPause", playPause); - ExternalInterface.addCallback("seek", seek); - ExternalInterface.addCallback("rewind", rewind); - ExternalInterface.addCallback("volume", volume); - ExternalInterface.addCallback("balance", balance); - 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 { - plyng = false; - playResumePos = 0; - if(loop) play(); - } - - private function onComplete(e:Event):void { - playProgress.indeterminate=false; - } - - private function onProgress(e:ProgressEvent):void { - playProgress.indeterminate=true; - } - - private function onEnterFrame(e:Event):void { - if(!playProgress.indeterminate) { - if(plyng) { - playProgress.setProgress(sndCh.position,snd.length); - caption.text=formatLabel(sndCh.position); - } else { - playProgress.setProgress(playResumePos,snd.length); - caption.text=formatLabel(playResumePos); - } - }else{ - if(plyng) { - playProgress.setProgress(Math.random(),1); - caption.text=formatLabel(sndCh.position); - } else { - playProgress.setProgress(snd.bytesLoaded,snd.bytesTotal); - caption.text=formatLabel(playResumePos); - } - } - if(plyng&&pauseAtPos>=0&&sndCh.position<pauseAtPos) - toBePaused=true; - if( - plyng&&pauseAtPos>=0&& - sndCh.position>=pauseAtPos&&toBePaused - ){ - pause(); - pauseAtPos=-1; - toBePaused=false; - } - } - - private function onID3Info(e:Event):void {id3 = e.target.id3;} - - private function onError(e:ErrorEvent):void { - Alert.show(e.type, e.text); - } - ]]> - </mx:Script> - - <mx:Fade id="fadeEffect" target="{playProgress}" alphaFrom="1.0" alphaTo="0" - effectEnd="caption.visible=false" duration="2000"/> - - <mx:ProgressBar width="100%" height="100%" mode="manual" - labelPlacement="center" label="" id="playProgress" - visible="{!hideBar}" - /> - - <mx:Label id="caption" width="100%" verticalCenter="0" - paddingTop="2" fontWeight="bold" visible="{!hideBar}" - textAlign="{txtAlign}" paddingLeft="5" - /> -</mx:Application> diff --git a/Master/texmf-dist/doc/latex/media9/files/players/BSD-License b/Master/texmf-dist/doc/latex/media9/files/players/BSD-License deleted file mode 100644 index 67b0fe71645..00000000000 --- a/Master/texmf-dist/doc/latex/media9/files/players/BSD-License +++ /dev/null @@ -1,32 +0,0 @@ -The BSD License - -Copyright (c) 2010, Adobe Systems Incorporated -All rights reserved. - -Redistribution and use in source and binary forms, with or -without modification, are permitted provided that the following -conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -* Neither the name of Adobe Systems Incorporated, nor the names of its -contributors may be used to endorse or promote products derived from this -software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/Master/texmf-dist/doc/latex/media9/files/players/SMPfixes.patch b/Master/texmf-dist/doc/latex/media9/files/players/SMPfixes.patch deleted file mode 100644 index 04e48f41281..00000000000 --- a/Master/texmf-dist/doc/latex/media9/files/players/SMPfixes.patch +++ /dev/null @@ -1,158 +0,0 @@ ---- ./player/StrobeMediaPlayback/src/org/osmf/player/chrome/widgets/PlayButtonOverlay.as.orig 2012-11-14 15:48:22.000000000 +0100 -+++ ./player/StrobeMediaPlayback/src/org/osmf/player/chrome/widgets/PlayButtonOverlay.as 2012-11-20 15:14:02.000000000 +0100 -@@ -98,6 +98,11 @@ - override protected function onMouseClick(event:MouseEvent):void - { - var playable:PlayTrait = media.getTrait(MediaTraitType.PLAY) as PlayTrait; -+ var seekable:SeekTrait = media.getTrait(MediaTraitType.SEEK) as SeekTrait; -+ if(playable.playState == PlayState.STOPPED) -+ { -+ try{seekable.seek(0);}catch(e:Object){} -+ } - playable.play(); - } - -@@ -134,4 +139,4 @@ - /* static */ - private static const VISIBILITY_DELAY:int = 500; - } --} -\ No newline at end of file -+} ---- ./player/StrobeMediaPlayback/src/org/osmf/player/chrome/widgets/Slider.as.orig 2012-11-14 15:48:22.000000000 +0100 -+++ ./player/StrobeMediaPlayback/src/org/osmf/player/chrome/widgets/Slider.as 2012-11-14 15:42:53.000000000 +0100 -@@ -106,7 +106,7 @@ - if (_enabled && _sliding == false) - { - _sliding = true; -- stage.addEventListener(MouseEvent.MOUSE_UP, onStageExitDrag); -+ stage.addEventListener(MouseEvent.MOUSE_UP, onStageExitDrag, true); - updateFace(down); - scrubTimer.start(); - dispatchEvent(new ScrubberEvent(ScrubberEvent.SCRUB_START)); ---- ./player/StrobeMediaPlayback/src/org/osmf/player/chrome/widgets/PlayButton.as.orig 2012-11-14 15:48:22.000000000 +0100 -+++ ./player/StrobeMediaPlayback/src/org/osmf/player/chrome/widgets/PlayButton.as 2012-11-14 15:42:53.000000000 +0100 -@@ -26,6 +26,7 @@ - import org.osmf.traits.MediaTraitType; - import org.osmf.traits.PlayState; - import org.osmf.traits.PlayTrait; -+ import org.osmf.traits.SeekTrait; - - public class PlayButton extends PlayableButton - { -@@ -44,6 +45,11 @@ - override protected function onMouseClick(event:MouseEvent):void - { - var playable:PlayTrait = media.getTrait(MediaTraitType.PLAY) as PlayTrait; -+ var seekable:SeekTrait = media.getTrait(MediaTraitType.SEEK) as SeekTrait; -+ if(playable.playState == PlayState.STOPPED) -+ { -+ try{seekable.seek(0);}catch(e:Object){} -+ } - playable.play(); - event.stopImmediatePropagation(); - } -@@ -58,4 +64,4 @@ - } - } - } --} -\ No newline at end of file -+} ---- ./player/StrobeMediaPlayback/src/StrobeMediaPlayback.as.orig 2012-11-14 15:48:22.000000000 +0100 -+++ ./player/StrobeMediaPlayback/src/StrobeMediaPlayback.as 2012-11-14 15:42:54.000000000 +0100 -@@ -52,6 +52,7 @@ - import org.osmf.traits.MediaTraitType; - import org.osmf.traits.PlayState; - import org.osmf.traits.PlayTrait; -+ import org.osmf.traits.SeekTrait; - import org.osmf.utils.OSMFSettings; - import org.osmf.utils.OSMFStrings; - -@@ -152,6 +153,7 @@ - - player.addEventListener(TimeEvent.COMPLETE, onComplete); - player.addEventListener(MediaErrorEvent.MEDIA_ERROR, onMediaError); -+ player.addEventListener(MediaPlayerCapabilityChangeEvent.CAN_PLAY_CHANGE, onCanPlayChange); - - // Add DRM error handler - var drmManager:DRMManager = DRMManager.getDRMManager(); -@@ -338,6 +340,8 @@ - mainContainer.backgroundAlpha = 0; - mainContainer.addEventListener(MouseEvent.DOUBLE_CLICK, onFullScreenRequest); - mainContainer.addEventListener(MouseEvent.CLICK, onMainClick, false); -+ mainContainer.addEventListener(MouseEvent.MOUSE_DOWN, onMainDown, false); -+ mainContainer.addEventListener(MouseEvent.MOUSE_UP, onMainUp, false); - mainContainer.doubleClickEnabled = true; - - addChild(mainContainer); -@@ -415,6 +419,9 @@ - } - - player.addEventListener(PlayEvent.PLAY_STATE_CHANGE, onSetAutoHide); -+ -+ controlBarContainer.addEventListener(MouseEvent.MOUSE_DOWN, onControlBarAny, false); -+ controlBarContainer.addEventListener(MouseEvent.MOUSE_UP, onControlBarAny, false); - - layout(); - -@@ -757,6 +764,38 @@ - } - } - -+ private function onMainDown(event:MouseEvent):void -+ { -+ var playable:PlayTrait = player.media.getTrait(MediaTraitType.PLAY) as PlayTrait; -+ if (playable.playState == PlayState.PLAYING) -+ { -+ playable.pause(); -+ } -+ } -+ -+ private function onMainUp(event:MouseEvent):void -+ { -+ var playable:PlayTrait = player.media.getTrait(MediaTraitType.PLAY) as PlayTrait; -+ var seekable:SeekTrait = player.media.getTrait(MediaTraitType.SEEK) as SeekTrait; -+ if(playable.playState == PlayState.STOPPED) -+ { -+ if(player.canSeek){seekable.seek(0);} -+ playable.play(); -+ } -+ else if(playable.playState == PlayState.PAUSED) -+ { -+ playable.play(); -+ } -+ } -+ -+ private function onControlBarAny(event:MouseEvent):void -+ { -+ if(event.eventPhase == EventPhase.BUBBLING_PHASE) -+ { -+ event.stopImmediatePropagation(); -+ } -+ } -+ - /** - * Toggles full screen state. - */ -@@ -1036,12 +1075,20 @@ - && configuration.endOfVideoOverlay != "" - && player.loop == false - && player.playing == false -+ && player.autoRewind == true - ) - { - processPoster(configuration.endOfVideoOverlay); - } - } - -+ private function onCanPlayChange(event:MediaPlayerCapabilityChangeEvent):void -+ { -+ // Make sure this event gets handled only once: -+ player.removeEventListener(event.type, arguments.callee); -+ player.play(); player.stop(); -+ } -+ - private function onMediaError(event:MediaErrorEvent):void - { - // Make sure this event gets handled only once: diff --git a/Master/texmf-dist/doc/latex/media9/files/players/StrobeMediaPlayback-license b/Master/texmf-dist/doc/latex/media9/files/players/StrobeMediaPlayback-license deleted file mode 100644 index 4a3d2ec8c0d..00000000000 --- a/Master/texmf-dist/doc/latex/media9/files/players/StrobeMediaPlayback-license +++ /dev/null @@ -1,5 +0,0 @@ -Strobe Media Playback is covered under the BSD Licence. See file BSD-License - -OSMF and NetMocker are covered under version 1.1 of the MPL Licence. You may obtain a copy of the License at http://www.mozilla.org/MPL/ - -The font we used by the player, Playback Sans, is released under the SIL Open Font License - see file player/StrobeMediaPlayback/assets/font/PlaybackSansEULA.txt diff --git a/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml b/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml deleted file mode 100644 index 7d73ce43b7d..00000000000 --- a/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml +++ /dev/null @@ -1,303 +0,0 @@ -<?xml version="1.0"?> -<!-- --> -<!-- 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 20140625 --> -<!-- --> -<!-- --> -<!-- The free Apache Flex 4 SDK is required to compile --> -<!-- this file. Get it from --> -<!-- --> -<!-- http://flex.apache.org/download-binaries.html --> -<!-- --> -<!-- and run --> -<!-- --> -<!-- mxmlc -static-link-runtime-shared-libraries VPlayer.mxml --> -<!-- --> -<!-- on the command line. --> -<!-- --> -<!-- --> -<!-- Copyright (C) 2012-today Alexander Grahn --> -<!-- --> -<!-- This work may be distributed and/or modified under the --> -<!-- conditions of the LaTeX Project Public License, either --> -<!-- version 1.3 of this license or (at your option) any later --> -<!-- version. --> -<!-- --> -<!-- The latest version of this license is in --> -<!-- http://www.latex-project.org/lppl.txt --> -<!-- and version 1.3 or later is part of all distributions of --> -<!-- LaTeX version 2005/12/01 or later. --> -<!-- --> -<!-- This work has the LPPL maintenance status `maintained'. --> -<!-- --> -<!-- The current maintainer of this work is A. Grahn. --> -<!-- --> - -<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" - xmlns:s="library://ns.adobe.com/flex/spark" - xmlns:mx="library://ns.adobe.com/flex/mx" - preinitialize="initialise(FlexGlobals.topLevelApplication.parameters);" - creationComplete="init();" - backgroundAlpha="0" -> - <fx:Script> - <![CDATA[ - [Bindable] private var scaleMode:String='stretch'; - [Bindable] private var source:String; - [Bindable] private var autoPlay:Boolean=false; - [Bindable] private var autoRewind:Boolean=false; - [Bindable] private var loop:Boolean=false; - [Bindable] private var vol:Number=0.75; - [Bindable] private var stepping:Boolean=false; - private var vidComplete:Boolean=false; - private var deltaSeek:Number; - private var curTime:Number; - private var newPos:Number; - private var keyPressed:Boolean=false; - private var pauseAtPos:Number = -1; - private var toBePaused:Boolean = false; - - import mx.core.FlexGlobals; - private function initialise(flashVars:Object):void { - source=flashVars.source; - if(flashVars.autoPlay=='true'){autoPlay=true} - if(flashVars.autoRewind=='true'){autoRewind=true} - if(flashVars.loop=='true'){loop=true} - if(flashVars.volume){vol=Number(flashVars.volume)} - if(flashVars.scaleMode){scaleMode=flashVars.scaleMode} - if(flashVars.stepping){stepping=flashVars.stepping} - } - - 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 onStateChange(event:MediaPlayerStateChangeEvent):void { - vidComplete=false; - if(event.state=='playbackError') - Alert.show('Unable to play \''+event.target.source+'\'','Error'); - } - - private function onKeyDown(e:KeyboardEvent):void { - switch(e.keyCode) { - case 32: //space bar - playPause(); - break; - case 36: //home - vidDisp.pause(); - vidDisp.seek(0); - break; - case 35: //end - if(vidDisp.bytesTotal){ - vidDisp.pause(); - vidDisp.seek(vidDisp.duration-0.1); - } - break; - case 37: //<-- - fadeEffect.end(); - playProgress.alpha=0.5; - playProgress.visible=true; - if(!keyPressed){ - deltaSeek=Math.max(1,vidDisp.duration/1000); - curTime=vidDisp.currentTime; - } - keyPressed=true; - newPos=Math.max(0,curTime-deltaSeek); - playProgress.setProgress(newPos,vidDisp.duration); - playProgress.label=formatTime(newPos); - vidDisp.seek(newPos); - deltaSeek*=1.1; - break; - case 39: //--> - fadeEffect.end(); - playProgress.alpha=0.5; - playProgress.visible=true; - if(!keyPressed){ - deltaSeek=Math.max(1,vidDisp.duration/1000); - curTime=vidDisp.currentTime; - } - keyPressed=true; - newPos=Math.min(vidDisp.duration-0.1,curTime+deltaSeek); - playProgress.setProgress(newPos,vidDisp.duration); - playProgress.label=formatTime(newPos); - vidDisp.seek(newPos); - deltaSeek*=1.1; - break; - case 38: - vol=Math.min(1,vol+0.025); - volume(vol); - break; - case 40: - vol=Math.max(0,vol-0.025); - volume(vol); - break; - default: - if(e.charCode==109) mute(); //`m' - } - } - - private function onKeyUp(e:KeyboardEvent):void { - switch(e.keyCode) { - case 37: //<-- - case 39: //--> - deltaSeek=Math.max(1,vidDisp.duration/1000); - keyPressed=false; - fadeEffect.play(); - break; - } - } - - private function onEnterFrame(e:Event):void { - if(stepping&&vidDisp.playing){vidDisp.pause();} - } - - private function onCurrentTimeChange(e:Event):void { - if(vidDisp.playing&&pauseAtPos>=0&&vidDisp.currentTime<pauseAtPos) - toBePaused=true; - if( - vidDisp.playing&&pauseAtPos>=0&& - vidDisp.currentTime>=pauseAtPos&&toBePaused - ){ - pause(); - pauseAtPos=-1; - toBePaused=false; - } - } - - private function play(p:Number=-1):void { - if(p>=0) seek(p); - if(vidComplete){seek(0);}vidDisp.play(); - } - - private function pause(p:Number=-1):void { - if(p>=0){pauseAtPos=p;return;} - vidDisp.pause(); - } - - private function playPause():void { - if(vidDisp.playing) vidDisp.pause(); else vidDisp.play(); - } - - private function seek(p:Number):void { - vidDisp.seek(p); - } - - private function step():void { - if(stepping){stepping=false;}else{stepping=true;} - } - - private function rewind():void { - vidDisp.seek(0); - } - - private function volume(v:Number):void { - vidDisp.muted=false; - vidDisp.volume = v; - } - - private function mute():void { - if(vidDisp.muted) { - vidDisp.muted=false; - if (vidDisp.volume==0) volume(0.75); - } - else { - vidDisp.muted=true; - } - } - - private function setSource(s:Object):void { - vidDisp.source = s; - } - - private function formatTime(s:Number):String { - 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); - - 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); - this.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); - this.addEventListener(Event.ENTER_FRAME, onEnterFrame); - ExternalInterface.addCallback("play", play); - ExternalInterface.addCallback("pause", pause); - ExternalInterface.addCallback("playPause", playPause); - ExternalInterface.addCallback("seek", seek); - ExternalInterface.addCallback("rewind", rewind); - ExternalInterface.addCallback("volume", volume); - 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> - - <fx:Declarations> - <s:Fade id="fadeEffect" target="{playProgress}" alphaFrom="0.5" alphaTo="0" duration="2000"/> - </fx:Declarations> - - <s:VideoDisplay - id="vidDisp" - width="100%" height="100%" scaleMode="{scaleMode}" - source="{source}" volume="{vol}" - autoPlay="{autoPlay}" autoRewind="{autoRewind}" loop="{loop}" - mouseDown="if(stepping){vidDisp.play();}else{vidDisp.pause();}this.setFocus();" - mouseUp="if(vidComplete) vidDisp.seek(0);if(!stepping){vidDisp.play();}" - mediaPlayerStateChange="onStateChange(event);" - complete="vidComplete=true;" - durationChange="vidDisp.seek(0);" - currentTimeChange="onCurrentTimeChange(event);" - /> - - <mx:ProgressBar width="100%" mode="polled" source="vidDisp" - horizontalCenter="0" bottom="0" labelPlacement="center" - id="loadingProgress" alpha="0.5" - complete="loadingProgress.visible=false;" - progress="onProgress(event)" - /> - - <mx:ProgressBar width="100%" mode="manual" - horizontalCenter="0" bottom="0" labelPlacement="center" - id="playProgress" alpha="0.5" - visible="false" - /> -</s:Application> diff --git a/Master/texmf-dist/doc/latex/media9/files/players/VPlayer9.mxml b/Master/texmf-dist/doc/latex/media9/files/players/VPlayer9.mxml deleted file mode 100644 index 02c684ffe32..00000000000 --- a/Master/texmf-dist/doc/latex/media9/files/players/VPlayer9.mxml +++ /dev/null @@ -1,294 +0,0 @@ -<?xml version="1.0"?> -<!-- --> -<!-- Adobe Flex 3 source file of VPlayer9.swf, --> -<!-- a FlashPlayer-9 compatible component for playing --> -<!-- FLV and MP4/H.264 video files and streams. --> -<!-- --> -<!-- version 20140625 --> -<!-- --> -<!-- Copyright (C) 2012-today Alexander Grahn --> -<!-- --> -<!-- This work may be distributed and/or modified under the --> -<!-- conditions of the LaTeX Project Public License, either --> -<!-- version 1.3 of this license or (at your option) any later --> -<!-- version. --> -<!-- --> -<!-- The latest version of this license is in --> -<!-- http://www.latex-project.org/lppl.txt --> -<!-- and version 1.3 or later is part of all distributions of --> -<!-- LaTeX version 2005/12/01 or later. --> -<!-- --> -<!-- This work has the LPPL maintenance status `maintained'. --> -<!-- --> -<!-- The current maintainer of this work is A. Grahn. --> -<!-- --> - -<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" - preinitialize="initialise(Application.application.parameters);" - creationComplete="init();" - backgroundAlpha="0" - paddingTop="0" paddingBottom="0" - paddingLeft="0" paddingRight="0" - layout="absolute" clipContent="false" -> - <mx:Script> - <![CDATA[ - [Bindable] private var source:String; - [Bindable] private var autoPlay:Boolean=false; - [Bindable] private var loop:Boolean=false; - [Bindable] private var vol:Number=0.75; - [Bindable] private var stepping:Boolean=false; - [Bindable] private var letterbox:Boolean=false; - private var vidComplete:Boolean=false; - private var deltaSeek:Number; - private var playheadTime:Number; - private var newPos:Number; - private var keyPressed:Boolean=false; - private var muted:Boolean=false; - private var lastVolume:Number; - private var pauseAtPos:Number = -1; - private var toBePaused:Boolean = false; - - import flash.external.*; - private function initialise(flashVars:Object):void { - source=flashVars.source; - if(flashVars.autoPlay=='true'){autoPlay=true} - if(flashVars.loop=='true'){loop=true} - if(flashVars.volume){vol=Number(flashVars.volume)} - if(flashVars.stepping){stepping=flashVars.stepping} - if(flashVars.scaleMode=='letterbox'){letterbox=true} - } - - private function onProgress(event:ProgressEvent):void { - if (event.bytesTotal) event.target.visible=true; - else event.target.visible=false; - } - - import mx.events.VideoEvent; - import mx.controls.Alert; - private function onStateChange(event:VideoEvent):void { - vidComplete=false; - if(event.state=='connectionError') - Alert.show('Unable to play \''+event.target.source+'\'','Error'); - } - - private function onKeyDown(e:KeyboardEvent):void { - switch(e.keyCode) { - case 32: //space bar - playPause(); - break; - case 36: //home - vidDisp.pause(); - vidDisp.playheadTime=0; - break; - case 35: //end - if(vidDisp.bytesTotal){ - vidDisp.pause(); - vidDisp.playheadTime=vidDisp.totalTime-0.1; - } - break; - case 37: //<-- - fadeEffect.end(); - playProgress.alpha=0.5; - playProgress.visible=true; - if(!keyPressed){ - deltaSeek=Math.max(1,vidDisp.totalTime/1000); - playheadTime=vidDisp.playheadTime; - } - keyPressed=true; - newPos=Math.max(0,playheadTime-deltaSeek); - playProgress.setProgress(newPos,vidDisp.totalTime); - playProgress.label=formatTime(newPos); - vidDisp.playheadTime=newPos; - deltaSeek*=1.1; - break; - case 39: //--> - fadeEffect.end(); - playProgress.alpha=0.5; - playProgress.visible=true; - if(!keyPressed){ - deltaSeek=Math.max(1,vidDisp.totalTime/1000); - playheadTime=vidDisp.playheadTime; - } - keyPressed=true; - newPos=Math.min(vidDisp.totalTime-0.1,playheadTime+deltaSeek); - playProgress.setProgress(newPos,vidDisp.totalTime); - playProgress.label=formatTime(newPos); - vidDisp.playheadTime=newPos; - deltaSeek*=1.1; - break; - case 38: - vol=Math.min(1,vol+0.025); - volume(vol); - break; - case 40: - vol=Math.max(0,vol-0.025); - volume(vol); - break; - default: - if(e.charCode==109) mute(); //`m' - } - } - - private function onKeyUp(e:KeyboardEvent):void { - switch(e.keyCode) { - case 37: //<-- - case 39: //--> - deltaSeek=Math.max(1,vidDisp.totalTime/1000); - keyPressed=false; - fadeEffect.play(); - break; - } - } - - private function onEnterFrame(e:Event):void { - if(stepping&&vidDisp.playing){vidDisp.pause();} - } - - private function onPlayheadUpdate(e:Event):void { - if(vidDisp.playing&&pauseAtPos>=0&&vidDisp.playheadTime<pauseAtPos) - toBePaused=true; - if( - vidDisp.playing&&pauseAtPos>=0&& - vidDisp.playheadTime>=pauseAtPos&&toBePaused - ){ - pause(); - pauseAtPos=-1; - toBePaused=false; - } - } - - private function play(p:Number=-1):void { - if(p>=0) seek(p); - if(vidComplete){seek(0);}vidDisp.play(); - } - - private function pause(p:Number=-1):void { - if(p>=0){pauseAtPos=p;return;} - vidDisp.pause(); - } - - private function playPause():void { - if(vidDisp.playing) vidDisp.pause(); else vidDisp.play(); - } - - private function seek(p:Number):void { - vidDisp.playheadTime=p; - } - - private function step():void { - if(stepping){stepping=false;}else{stepping=true;} - } - - private function rewind():void { - vidDisp.playheadTime=0; - } - - private function volume(v:Number):void { - muted=false; - vidDisp.volume = v; - } - - private function mute():void { - if(muted) { - if (lastVolume==0) volume(0.75); - else volume(lastVolume); - } - else { - muted=true;lastVolume=vidDisp.volume;vidDisp.volume=0; - } - } - - private function setSource(s:String):void { - vidDisp.pause();vidDisp.source = s; - vidDisp.play();vidDisp.pause(); - vidDisp.playheadTime=0; - } - - private function formatTime(s:Number):String { - 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); - - return fmtd; - } - - private function currentTime():Number { - return vidDisp.playheadTime; - } - - private function playing():Boolean { - return vidDisp.playing; - } - - private function duration():Number { - return vidDisp.totalTime; - } - - private function ismuted():Boolean { - return muted; - } - - private function init():void { - this.setFocus(); - this.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); - this.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); - this.addEventListener(Event.ENTER_FRAME, onEnterFrame); - ExternalInterface.addCallback("play", play); - ExternalInterface.addCallback("pause", pause); - ExternalInterface.addCallback("playPause", playPause); - ExternalInterface.addCallback("seek", seek); - ExternalInterface.addCallback("rewind", rewind); - ExternalInterface.addCallback("volume", volume); - 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", ismuted); - } - ]]> - </mx:Script> - - <mx:Fade id="fadeEffect" target="{playProgress}" alphaFrom="0.5" alphaTo="0" duration="2000" - effectEnd="playProgress.label=''" - /> - - <mx:VideoDisplay - id="vidDisp" - width="100%" height="100%" maintainAspectRatio="{letterbox}" - backgroundAlpha="0" borderThickness="0" - source="{source}" volume="{vol}" - autoPlay="{autoPlay}" autoRewind="{loop}" - mouseDown="if(stepping){vidDisp.play();}else{vidDisp.pause();}this.setFocus();" - mouseUp="if(vidComplete) vidDisp.playheadTime=0;if(!stepping){vidDisp.play();}" - stateChange="onStateChange(event);" - complete="vidComplete=true;" - rewind="vidDisp.play();" - playheadUpdate="onPlayheadUpdate(event);" - /> - - <mx:ProgressBar width="100%" mode="polled" source="vidDisp" - horizontalCenter="0" bottom="0" labelPlacement="center" - id="loadingProgress" alpha="0.5" - complete="loadingProgress.visible=false;" - progress="onProgress(event)" - /> - - <mx:ProgressBar width="100%" mode="manual" - horizontalCenter="0" bottom="0" labelPlacement="center" - id="playProgress" alpha="0.5" - visible="false" - /> -</mx:Application> diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf Binary files differindex a126b94e636..d802fae1557 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 0b86f6c74cd..cd41fbdc650 100644 --- a/Master/texmf-dist/doc/latex/media9/media9.tex +++ b/Master/texmf-dist/doc/latex/media9/media9.tex @@ -13,7 +13,6 @@ %\usepackage[draft]{media9} \usepackage{animate} \usepackage{fancyvrb} - \usepackage{float} \usepackage{amssymb} \usepackage[UKenglish]{babel} |