summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml')
-rw-r--r--Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml28
1 files changed, 23 insertions, 5 deletions
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 a5f05bbb425..7d73ce43b7d 100644
--- a/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml
+++ b/Master/texmf-dist/doc/latex/media9/files/players/VPlayer.mxml
@@ -4,7 +4,7 @@
<!-- a FlashPlayer-10 compatible component for playing -->
<!-- FLV and MP4/H.264 video files and streams. -->
<!-- -->
-<!-- version 20140306 -->
+<!-- version 20140625 -->
<!-- -->
<!-- -->
<!-- The free Apache Flex 4 SDK is required to compile -->
@@ -57,6 +57,8 @@
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 {
@@ -155,11 +157,26 @@
if(stepping&&vidDisp.playing){vidDisp.pause();}
}
- private function play():void {
- if(vidComplete){vidDisp.seek(0);}vidDisp.play();
+ 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():void {
+ private function pause(p:Number=-1):void {
+ if(p>=0){pauseAtPos=p;return;}
vidDisp.pause();
}
@@ -262,12 +279,13 @@
id="vidDisp"
width="100%" height="100%" scaleMode="{scaleMode}"
source="{source}" volume="{vol}"
- autoPlay="{autoPlay}" autoRewind="{autoRewind}" loop="{loop}"
+ 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"