summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/media9/files
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-04-03 23:40:51 +0000
committerKarl Berry <karl@freefriends.org>2012-04-03 23:40:51 +0000
commit538bf9cb8c628873e9682c8573fe6af45a6304bc (patch)
treea51362f7976c12f1470a977d2bd1ac12f24e3f14 /Master/texmf-dist/doc/latex/media9/files
parent65dea7bb3a3dfc2b4443ab2175f9e813daeafbcc (diff)
media9 (3apr12)
git-svn-id: svn://tug.org/texlive/trunk@25842 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/media9/files')
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml143
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/players/BSD-License32
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/players/SMPfixes.patch156
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/players/StrobeMediaPlayback-license5
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml93
5 files changed, 429 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml b/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml
new file mode 100644
index 00000000000..67375fb6a06
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml
@@ -0,0 +1,143 @@
+<?xml version="1.0"?>
+<!-- -->
+<!-- Adobe Flex 4 source file of APlayer.swf, -->
+<!-- a FlashPlayer-10 compatible component for playing -->
+<!-- MP3 audio files and streams. -->
+<!-- -->
+<!-- version 20120301 -->
+<!-- -->
+<!-- -->
+<!-- The free Adobe Flex 4 SDK is required to compile -->
+<!-- this file. Get it from -->
+<!-- -->
+<!-- http://www.adobe.com/products/flex/ -->
+<!-- -->
+<!-- and run -->
+<!-- -->
+<!-- mxmlc -static-link-runtime-shared-libraries APlayer.mxml -->
+<!-- -->
+<!-- on the command line. -->
+<!-- -->
+<!-- -->
+<!-- Copyright (C) 2012 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();addEventListener(Event.ENTER_FRAME, onEnterFrame);"
+ mouseDown="pause();"
+ mouseUp="play();"
+>
+
+ <fx:Script>
+ <![CDATA[
+ [Bindable] private var source:String;
+ [Bindable] private var autoPlay:Boolean=false;
+ [Bindable] private var loop:Boolean=false;
+ [Bindable] private var volume:Number=0.75;
+ [Bindable] private var balance:Number=0;
+
+ private var snd:Sound;
+ private var sndCh:SoundChannel;
+ private var sndTr:SoundTransform;
+ private var playResumePosition:Number = 0;
+ private var playing:Boolean = false;
+
+ import mx.core.FlexGlobals;
+ private function initialise(flashVars:Object):void{
+ source=flashVars.source;
+ if(flashVars.autoPlay){autoPlay=(flashVars.autoPlay=='true')}
+ if(flashVars.loop){loop=(flashVars.loop=='true')}
+ if(flashVars.volume){volume=Number(flashVars.volume)}
+ if(flashVars.balance){balance=Number(flashVars.balance)}
+ }
+
+ import mx.controls.Alert;
+ private function initSound():void
+ {
+ snd = new Sound(new URLRequest(source));
+ sndTr = new SoundTransform(volume, balance);
+
+ snd.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
+ snd.addEventListener(ProgressEvent.PROGRESS, progressHandler);
+ snd.addEventListener(Event.COMPLETE, completeHandler);
+
+ if(autoPlay) play();
+ }
+
+ private function play():void
+ {
+ if (!playing)
+ {
+ try{sndCh = snd.play(playResumePosition, 0, sndTr);}
+ catch(err:Error){Alert.show(err.message,'Error');}
+ sndCh.addEventListener(Event.SOUND_COMPLETE, sndCompleteHandler);
+ playing = true;
+ }
+ }
+
+ private function pause():void
+ {
+ if (playing)
+ {
+ playResumePosition = sndCh.position;
+ sndCh.stop();
+ playing = false;
+ }
+ }
+
+ private function sndCompleteHandler(event:Event):void
+ {
+ playing = false;
+ playResumePosition = 0;
+ if(loop) play();
+ }
+
+ private function completeHandler(event:Event):void
+ {
+ playProgress.indeterminate=false;
+ }
+
+ import flash.events.ProgressEvent;
+ private function progressHandler(event:ProgressEvent):void{
+ playProgress.indeterminate=true;
+ if(playing){
+ playProgress.setProgress(0.5,1);
+ }
+ }
+
+ private function onEnterFrame(event:Event):void{
+ if(playProgress.indeterminate==false && playing){
+ playProgress.setProgress(sndCh.position,snd.length);
+ }
+ }
+
+ import flash.events.IOErrorEvent;
+ private function errorHandler(errorEvent:IOErrorEvent):void{
+ Alert.show(errorEvent.text + '\ncould not be loaded','Error');
+ }
+
+ ]]>
+ </fx:Script>
+
+ <mx:ProgressBar width="100%" mode="manual"
+ horizontalCenter="0" verticalCenter="0" labelPlacement="center"
+ label="" id="playProgress"
+ />
+</s: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
new file mode 100644
index 00000000000..67b0fe71645
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/media9/files/players/BSD-License
@@ -0,0 +1,32 @@
+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
new file mode 100644
index 00000000000..f5581f51f9d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/media9/files/players/SMPfixes.patch
@@ -0,0 +1,156 @@
+######################################################################################################
+#
+# SMPfixes.patch, 20120330, Alexander Grahn
+#
+# Patch for StrobeMediaPlayback version 1.6.328 sources
+# http://sourceforge.net/projects/smp.adobe/files/
+#
+######################################################################################################
+# fix: video could not be restarted after having ended if AS variable `autoRewind' was set to `false'
+# new: show first frame of video as default poster instead of black stage
+# new: play/pause video by clicking on the stage
+######################################################################################################
+--- ./player/StrobeMediaPlayback/src/org/osmf/player/chrome/widgets/PlayButtonOverlay.as.orig 2012-03-23 16:04:41.000000000 +0100
++++ ./player/StrobeMediaPlayback/src/org/osmf/player/chrome/widgets/PlayButtonOverlay.as 2012-03-26 13:23:52.000000000 +0200
+@@ -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();
+ }
+
+--- ./player/StrobeMediaPlayback/src/org/osmf/player/chrome/widgets/PlayButton.as.orig 2012-03-26 13:22:33.000000000 +0200
++++ ./player/StrobeMediaPlayback/src/org/osmf/player/chrome/widgets/PlayButton.as 2012-03-26 16:03:07.000000000 +0200
+@@ -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();
+ }
+--- ./player/StrobeMediaPlayback/src/org/osmf/player/chrome/widgets/Slider.as.orig 2012-03-29 16:54:07.000000000 +0200
++++ ./player/StrobeMediaPlayback/src/org/osmf/player/chrome/widgets/Slider.as 2012-03-29 16:54:15.000000000 +0200
+@@ -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/StrobeMediaPlayback.as.orig 2012-03-23 15:44:09.000000000 +0100
++++ ./player/StrobeMediaPlayback/src/StrobeMediaPlayback.as 2012-03-30 15:00:42.000000000 +0200
+@@ -51,6 +51,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;
+
+@@ -151,6 +152,7 @@
+
+ player.addEventListener(TimeEvent.COMPLETE, onComplete);
+ player.addEventListener(MediaErrorEvent.MEDIA_ERROR, onMediaError);
++ player.addEventListener(MediaPlayerCapabilityChangeEvent.CAN_PLAY_CHANGE, onCanPlayChange);
+
+ // this is used for DVR rolling window
+ // TODO: Add this event only when the resource is DVR rolling window not all the time
+@@ -266,6 +268,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);
+@@ -343,6 +347,9 @@
+ }
+
+ player.addEventListener(PlayEvent.PLAY_STATE_CHANGE, onSetAutoHide);
++
++ controlBarContainer.addEventListener(MouseEvent.MOUSE_DOWN, onControlBarAny, false);
++ controlBarContainer.addEventListener(MouseEvent.MOUSE_UP, onControlBarAny, false);
+
+ layout();
+
+@@ -654,6 +661,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.
+ */
+@@ -928,12 +967,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
new file mode 100644
index 00000000000..4a3d2ec8c0d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/media9/files/players/StrobeMediaPlayback-license
@@ -0,0 +1,5 @@
+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
new file mode 100644
index 00000000000..9d070ed2d40
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml
@@ -0,0 +1,93 @@
+<?xml version="1.0"?>
+<!-- -->
+<!-- Adobe Flex 4 source file of VPlayer.swf, -->
+<!-- a FlashPlayer-10 compatible component for playing -->
+<!-- FLV and MP4/H.264 video files and streams. -->
+<!-- -->
+<!-- version 20120301 -->
+<!-- -->
+<!-- -->
+<!-- The free Adobe Flex 4 SDK is required to compile -->
+<!-- this file. Get it from -->
+<!-- -->
+<!-- http://www.adobe.com/products/flex/ -->
+<!-- -->
+<!-- and run -->
+<!-- -->
+<!-- mxmlc -static-link-runtime-shared-libraries VPlayer.mxml -->
+<!-- -->
+<!-- on the command line. -->
+<!-- -->
+<!-- -->
+<!-- Copyright (C) 2011 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);"
+>
+ <fx:Script>
+ <![CDATA[
+ [Bindable] private var source:String;
+ [Bindable] private var autoPlay:Boolean=false;
+ [Bindable] private var loop:Boolean=false;
+ [Bindable] private var volume:Number=0.75;
+ private var vidComplete:Boolean=false;
+
+ import mx.core.FlexGlobals;
+ private function initialise(flashVars:Object):void{
+ source=flashVars.source;
+ if(flashVars.autoPlay){autoPlay=(flashVars.autoPlay=='true')}
+ if(flashVars.loop){loop=(flashVars.loop=='true')}
+ if(flashVars.volume){volume=Number(flashVars.volume)}
+ }
+
+ import flash.events.ProgressEvent;
+ private function progressHandler(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{
+ vidComplete=false;
+ if(event.state=='playbackError')
+ Alert.show('Unable to play \''+event.target.source+'\'','Error');
+ }
+ ]]>
+ </fx:Script>
+
+ <s:VideoDisplay
+ id="vidDisp"
+ width="100%" height="100%" scaleMode="stretch"
+ source="{source}" volume="{volume}"
+ autoPlay="{autoPlay}" autoRewind="false" loop="{loop}"
+ mouseDown="vidDisp.pause();"
+ mouseUp="if(vidComplete){vidDisp.seek(0);}vidDisp.play();"
+ mediaPlayerStateChange="stateChangeHandler(event);"
+ complete="vidComplete=true;"
+ />
+
+ <mx:ProgressBar width="80%" mode="polled" source="vidDisp"
+ horizontalCenter="0" verticalCenter="0" labelPlacement="center"
+ id="loadingProgress" alpha="0.5"
+ complete="loadingProgress.visible=false;"
+ progress="progressHandler(event)"
+ />
+</s:Application>