summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/media9
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/tex/latex/media9
parent65dea7bb3a3dfc2b4443ab2175f9e813daeafbcc (diff)
media9 (3apr12)
git-svn-id: svn://tug.org/texlive/trunk@25842 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/media9')
-rw-r--r--Master/texmf-dist/tex/latex/media9/media9.sty31
-rw-r--r--Master/texmf-dist/tex/latex/media9/players/APlayer.mxml143
-rw-r--r--Master/texmf-dist/tex/latex/media9/players/StrobeMediaPlayback.swfbin0 -> 254235 bytes
-rw-r--r--Master/texmf-dist/tex/latex/media9/players/VPlayer.mxml93
-rw-r--r--Master/texmf-dist/tex/latex/media9/players/VPlayer.swfbin440128 -> 440128 bytes
5 files changed, 19 insertions, 248 deletions
diff --git a/Master/texmf-dist/tex/latex/media9/media9.sty b/Master/texmf-dist/tex/latex/media9/media9.sty
index c47d1df7f60..7e012d53228 100644
--- a/Master/texmf-dist/tex/latex/media9/media9.sty
+++ b/Master/texmf-dist/tex/latex/media9/media9.sty
@@ -39,8 +39,8 @@
\RequirePackage{l3keys2e}
\RequirePackage{ifpdf}
-\def\g@mix@date@tl{2012/03/16}
-\def\g@mix@version@tl{0.2}
+\def\g@mix@date@tl{2012/04/03}
+\def\g@mix@version@tl{0.3}
\ProvidesExplPackage{media9}{\g@mix@date@tl}{\g@mix@version@tl}
{acrobat-9 compatible media}
@@ -100,7 +100,7 @@
\bool_new:N\g_mix_dvipdfmx_bool
\bool_new:N\g_mix_pkgdraft_bool
\tl_gset:Nn\g_mix_pkgact_tl{/XA}
-\tl_gset:Nn\g_mix_pkgdeact_tl{/XD}
+\tl_gset:Nn\g_mix_pkgdeact_tl{/PC}
\tl_gset:Nn\g_mix_pkgtransp_tl{false}
\tl_gset:Nn\g_mix_pkgcontextclick_tl{false}
\tl_gset:Nn\g_mix_pkgplaycnt_tl{-1}
@@ -132,9 +132,9 @@
activate / onclick .code:n = {\tl_gset:Nn\g_mix_pkgact_tl{/XA}},
deactivate .choice:,
- deactivate / pageinvisible .code:n = {\tl_gset:Nn\g_mix_pkgact_tl{/PI}},
- deactivate / pageclose .code:n = {\tl_gset:Nn\g_mix_pkgact_tl{/PC}},
- deactivate / onclick .code:n = {\tl_gset:Nn\g_mix_pkgact_tl{/XD}},
+ deactivate / pageinvisible .code:n = {\tl_gset:Nn\g_mix_pkgdeact_tl{/PI}},
+ deactivate / pageclose .code:n = {\tl_gset:Nn\g_mix_pkgdeact_tl{/PC}},
+ deactivate / onclick .code:n = {\tl_gset:Nn\g_mix_pkgdeact_tl{/XD}},
transparent .choice_code:n = {
\tl_gset:Nx\g_mix_pkgtransp_tl{\l_keys_choice_tl}},
@@ -1051,6 +1051,7 @@
\def\mix@uribegin{%
%make sure special characters in URIs (RFC 3986) are used unmodified
\begingroup%
+ \defineshorthand{"}{\detokenize{"}}%
\defineshorthand{:}{\detokenize{:}}%
\defineshorthand{/}{\detokenize{/}}%
\defineshorthand{?}{\detokenize{?}}%
@@ -1081,7 +1082,7 @@
% macro to format a real number in tl variable
% * to show at most 9 places after `.'
% * trailing zeros removed
-\cs_new:Nn\mix_format_num:N{
+\cs_new_protected:Nn\mix_format_num:N{
\tl_set:Nx#1{\exp_after:wN\mix_format_num:w#1\q_stop}
}
\cs_new:Npn\mix_format_num:w#1.#2\q_stop{
@@ -1407,13 +1408,19 @@
url .bool_gset:N = \g_mix_url_bool,
- addresource .code:n = {\seq_gput_right:Nn\g_mix_res_seq{#1}},
+ addresource .code:n = {\seq_gput_right:Nn\g_mix_res_seq{#1}},
addresource .value_required:,
add3Djscript .code:n = {\seq_gput_right:Nn\g_mix_script_seq{#1}},
add3Djscript .value_required:,
- flashvars .tl_gset_x:N = \g_mix_flashvars_tl,
+ flashvars .code:n = {
+ \tl_gset:Nx\g_mix_flashvars_tl{\tl_trim_spaces:n{#1}}
+ \tl_greplace_all:Nnn\g_mix_flashvars_tl{~&}{&}
+ \tl_greplace_all:Nnn\g_mix_flashvars_tl{&~}{&}
+ \tl_greplace_all:Nnn\g_mix_flashvars_tl{~=}{=}
+ \tl_greplace_all:Nnn\g_mix_flashvars_tl{=~}{=}
+ },
flashvars .value_required:,
activate .choice:,
@@ -1422,9 +1429,9 @@
activate / onclick .code:n = {\tl_gset:Nn\g_mix_act_tl{/XA}},
deactivate .choice:,
- deactivate / pageinvisible .code:n = {\tl_gset:Nn\g_mix_act_tl{/PI}},
- deactivate / pageclose .code:n = {\tl_gset:Nn\g_mix_act_tl{/PC}},
- deactivate / onclick .code:n = {\tl_gset:Nn\g_mix_act_tl{/XD}},
+ deactivate / pageinvisible .code:n = {\tl_gset:Nn\g_mix_deact_tl{/PI}},
+ deactivate / pageclose .code:n = {\tl_gset:Nn\g_mix_deact_tl{/PC}},
+ deactivate / onclick .code:n = {\tl_gset:Nn\g_mix_deact_tl{/XD}},
draft .choice:,
draft / true .code:n = {\bool_gset_true:N\g_mix_usrdraft_bool},
diff --git a/Master/texmf-dist/tex/latex/media9/players/APlayer.mxml b/Master/texmf-dist/tex/latex/media9/players/APlayer.mxml
deleted file mode 100644
index 67375fb6a06..00000000000
--- a/Master/texmf-dist/tex/latex/media9/players/APlayer.mxml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?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/tex/latex/media9/players/StrobeMediaPlayback.swf b/Master/texmf-dist/tex/latex/media9/players/StrobeMediaPlayback.swf
new file mode 100644
index 00000000000..7297bef122b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/media9/players/StrobeMediaPlayback.swf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/media9/players/VPlayer.mxml b/Master/texmf-dist/tex/latex/media9/players/VPlayer.mxml
deleted file mode 100644
index 9d070ed2d40..00000000000
--- a/Master/texmf-dist/tex/latex/media9/players/VPlayer.mxml
+++ /dev/null
@@ -1,93 +0,0 @@
-<?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>
diff --git a/Master/texmf-dist/tex/latex/media9/players/VPlayer.swf b/Master/texmf-dist/tex/latex/media9/players/VPlayer.swf
index daf19dbc7fe..b48d0dcf767 100644
--- a/Master/texmf-dist/tex/latex/media9/players/VPlayer.swf
+++ b/Master/texmf-dist/tex/latex/media9/players/VPlayer.swf
Binary files differ