summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/media9
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-07-30 22:02:44 +0000
committerKarl Berry <karl@freefriends.org>2015-07-30 22:02:44 +0000
commit60fede9bb7e0593a59a686c5249d424be598ff6c (patch)
tree6f11fb8b46753fb69f9a8f1534fe698ce526621d /Master/texmf-dist/source/latex/media9
parent9d26d2183c8125be8f6573a04ffd66f2e9c79e96 (diff)
media9 (30jul15)
git-svn-id: svn://tug.org/texlive/trunk@38007 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/media9')
-rw-r--r--Master/texmf-dist/source/latex/media9/players/VPlayer.mxml26
-rw-r--r--Master/texmf-dist/source/latex/media9/players/VPlayer9.mxml8
2 files changed, 24 insertions, 10 deletions
diff --git a/Master/texmf-dist/source/latex/media9/players/VPlayer.mxml b/Master/texmf-dist/source/latex/media9/players/VPlayer.mxml
index c83ef4e3999..ce7f1ee2fe0 100644
--- a/Master/texmf-dist/source/latex/media9/players/VPlayer.mxml
+++ b/Master/texmf-dist/source/latex/media9/players/VPlayer.mxml
@@ -4,7 +4,7 @@
<!-- a FlashPlayer-10 compatible component for playing -->
<!-- FLV and MP4/H.264 video files and streams. -->
<!-- -->
-<!-- version 20150722 -->
+<!-- version 20150730 -->
<!-- -->
<!-- -->
<!-- The free Apache Flex 4 SDK is required to compile -->
@@ -74,11 +74,23 @@
}
import org.osmf.events.MediaPlayerStateChangeEvent;
+ import org.osmf.media.MediaPlayerState;
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');
+ switch(event.state) {
+ case MediaPlayerState.PLAYBACK_ERROR: // ('playbackError')
+ Alert.show('Unable to play \''+event.target.source+'\'','Error');
+ break;
+ case MediaPlayerState.READY:
+ if(autoPlay) vidDisp.play();
+ break;
+ //MediaPlayerState.BUFFERING
+ //MediaPlayerState.LOADING
+ //MediaPlayerState.PAUSED
+ //MediaPlayerState.PLAYING
+ //MediaPlayerState.UNINITIALIZED
+ }
}
private function onKeyDown(e:KeyboardEvent):void {
@@ -287,9 +299,6 @@
itemPlayPause.caption=(vidDisp.playing ? "Pause" : "Play")+", [Space]";
itemMute.caption=(vidDisp.muted ? "Unmute" : "Mute")+", [m]";}
);
-
- //autoPlay setting not reliable
- if(autoPlay) {while(!vidDisp.playing) play();};
}
]]>
</fx:Script>
@@ -299,11 +308,14 @@
duration="2000"/>
</fx:Declarations>
+ <!-- autoPlay setting (autoPlay="{autoPlay}") is not reliable;
+ we handle this in MediaPlayerStateChange event -->
<s:VideoDisplay
id="vidDisp"
width="100%" height="100%" scaleMode="{scaleMode}"
source="{source}" volume="{vol}"
- autoPlay="{autoPlay}" autoRewind="{autoRewind}" loop="{loop}"
+ autoPlay="false"
+ autoRewind="{autoRewind}" loop="{loop}"
mediaPlayerStateChange="onStateChange(event);"
complete="vidComplete=true;"
durationChange="vidDisp.seek(0);"
diff --git a/Master/texmf-dist/source/latex/media9/players/VPlayer9.mxml b/Master/texmf-dist/source/latex/media9/players/VPlayer9.mxml
index 4379385d75b..ca7e74c64ac 100644
--- a/Master/texmf-dist/source/latex/media9/players/VPlayer9.mxml
+++ b/Master/texmf-dist/source/latex/media9/players/VPlayer9.mxml
@@ -4,7 +4,7 @@
<!-- a FlashPlayer-9 compatible component for playing -->
<!-- FLV and MP4/H.264 video files and streams. -->
<!-- -->
-<!-- version 20150722 -->
+<!-- version 20150729 -->
<!-- -->
<!-- Copyright (C) 2012-today Alexander Grahn -->
<!-- -->
@@ -23,7 +23,8 @@
<!-- The current maintainer of this work is A. Grahn. -->
<!-- -->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
+<mx:Application
+ xmlns:mx="http://www.adobe.com/2006/mxml"
preinitialize="initialise(this.parameters);"
applicationComplete="initApp();"
backgroundAlpha="0"
@@ -63,8 +64,9 @@
}
import mx.events.VideoEvent;
+ //import flash.events.VideoEvent;
import mx.controls.Alert;
- private function onStateChange(event:VideoEvent):void {
+ private function onStateChange(event:mx.events.VideoEvent):void {
vidComplete=false;
if(event.state=='connectionError')
Alert.show('Unable to play \''+event.target.source+'\'','Error');