diff options
author | Karl Berry <karl@freefriends.org> | 2013-11-16 23:51:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-11-16 23:51:34 +0000 |
commit | 3dc099326cd991a2db80fc2b8e17b626a10d8f91 (patch) | |
tree | 29255929157770b0476a0cf5070bf13a7d6a968c | |
parent | 7d3939ca812ba5430cfb748fc99af2d3f6f734e6 (diff) |
media9 (16nov13)
git-svn-id: svn://tug.org/texlive/trunk@32163 c570f23f-e606-0410-a88d-b1316a301751
16 files changed, 98 insertions, 45 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/ChangeLog b/Master/texmf-dist/doc/latex/media9/ChangeLog index f2a7ae03952..32ddd90f0e8 100644 --- a/Master/texmf-dist/doc/latex/media9/ChangeLog +++ b/Master/texmf-dist/doc/latex/media9/ChangeLog @@ -1,3 +1,8 @@ +2013-11-15 + * v0.35 + * new: play button overlay, can be disabled with new option `noplaybutton' + * change: updated media players + 2013-11-12 * v0.34 * fix: `bigfiles' option and really big files caused dvips error diff --git a/Master/texmf-dist/doc/latex/media9/files/cubeposter.png b/Master/texmf-dist/doc/latex/media9/files/cubeposter.png Binary files differnew file mode 100644 index 00000000000..ae57869756f --- /dev/null +++ b/Master/texmf-dist/doc/latex/media9/files/cubeposter.png diff --git a/Master/texmf-dist/doc/latex/media9/files/epix.asy b/Master/texmf-dist/doc/latex/media9/files/epix.asy index 48e25aa5591..60720aaba05 100644 --- a/Master/texmf-dist/doc/latex/media9/files/epix.asy +++ b/Master/texmf-dist/doc/latex/media9/files/epix.asy @@ -9,8 +9,8 @@ import graph3; size(200,200,IgnoreAspect); -//currentprojection=perspective(4,2,3); -currentprojection=perspective(0,0,1); +currentprojection=perspective(4,2,3); +//currentprojection=perspective(0,0,1); real f(pair z) {return z.y^3/2-3z.x^2*z.y;} diff --git a/Master/texmf-dist/doc/latex/media9/files/epix.prc b/Master/texmf-dist/doc/latex/media9/files/epix.prc Binary files differindex 3d8da38bfea..99e33eed236 100644 --- a/Master/texmf-dist/doc/latex/media9/files/epix.prc +++ b/Master/texmf-dist/doc/latex/media9/files/epix.prc diff --git a/Master/texmf-dist/doc/latex/media9/files/epixposter.pdf b/Master/texmf-dist/doc/latex/media9/files/epixposter.pdf Binary files differnew file mode 100644 index 00000000000..92506d1092d --- /dev/null +++ b/Master/texmf-dist/doc/latex/media9/files/epixposter.pdf diff --git a/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml b/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml index fad4deca9aa..ad13e304471 100644 --- a/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml +++ b/Master/texmf-dist/doc/latex/media9/files/players/APlayer.mxml @@ -4,7 +4,7 @@ <!-- a FlashPlayer-10 compatible component for playing --> <!-- MP3 audio files and streams. --> <!-- --> -<!-- version 20131030 --> +<!-- version 20131114 --> <!-- --> <!-- --> <!-- The free Apache Flex 4 SDK is required to compile --> @@ -228,6 +228,7 @@ pause(); source=s; initSound(); + pause();seek(0); } private function loadPolicy(p:String):void {policy=p;} diff --git a/Master/texmf-dist/doc/latex/media9/files/players/APlayer9.mxml b/Master/texmf-dist/doc/latex/media9/files/players/APlayer9.mxml index 7559b779679..35a154ae3fc 100644 --- a/Master/texmf-dist/doc/latex/media9/files/players/APlayer9.mxml +++ b/Master/texmf-dist/doc/latex/media9/files/players/APlayer9.mxml @@ -4,7 +4,7 @@ <!-- a FlashPlayer-9 compatible component for playing --> <!-- MP3 audio files and streams. --> <!-- --> -<!-- version 20131030 --> +<!-- version 20131114 --> <!-- --> <!-- Copyright (C) 2012-today Alexander Grahn --> <!-- --> @@ -217,6 +217,7 @@ pause(); source=s; initSound(); + pause();seek(0); } private function loadPolicy(p:String):void {policy=p;} 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 a5ee8eddbda..a244fabc943 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 20131030 --> +<!-- version 20131114 --> <!-- --> <!-- --> <!-- The free Apache Flex 4 SDK is required to compile --> @@ -245,7 +245,7 @@ mouseUp="if(vidComplete) vidDisp.seek(0);if(!stepping){vidDisp.play();}" mediaPlayerStateChange="onStateChange(event);" complete="vidComplete=true;" - durationChange="if(vidDisp.autoPlay) vidDisp.play(); else vidDisp.seek(0);" + durationChange="vidDisp.seek(0);" /> <mx:ProgressBar width="100%" mode="polled" source="vidDisp" diff --git a/Master/texmf-dist/doc/latex/media9/files/players/VPlayer9.mxml b/Master/texmf-dist/doc/latex/media9/files/players/VPlayer9.mxml index 93d68600199..6a405c30145 100644 --- a/Master/texmf-dist/doc/latex/media9/files/players/VPlayer9.mxml +++ b/Master/texmf-dist/doc/latex/media9/files/players/VPlayer9.mxml @@ -4,7 +4,7 @@ <!-- a FlashPlayer-9 compatible component for playing --> <!-- FLV and MP4/H.264 video files and streams. --> <!-- --> -<!-- version 20131106 --> +<!-- version 20131114 --> <!-- --> <!-- Copyright (C) 2012-today Alexander Grahn --> <!-- --> @@ -186,7 +186,6 @@ vidDisp.pause();vidDisp.source = s; vidDisp.play();vidDisp.pause(); vidDisp.playheadTime=0; - if(autoPlay){vidDisp.play();} } private function formatTime(s:Number):String { diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf Binary files differindex 1bc0e362702..3602166a841 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 c4e999d836f..e6187eee6dd 100644 --- a/Master/texmf-dist/doc/latex/media9/media9.tex +++ b/Master/texmf-dist/doc/latex/media9/media9.tex @@ -148,6 +148,7 @@ xetex bigfiles draft final +noplaybutton activate=... deactivate=... windowed=... @@ -249,6 +250,10 @@ final \end{verbatim} With `\verb+draft+' the media is not embedded. Instead, a box is inserted that has the dimensions of \verb+<poster text>+, subject to the resizing options `\verb+width+', `\verb+height+', `\verb+depth+' and `\verb+scale+'. Option `\verb+final+' does the opposite as it forces the media to be embedded. Both options can be used to reduce compilation time during authoring of a document. To get the most out of them it is recommended to set `\verb+draft+' globally as a package or class option and to set `\verb+final+' locally as a command option of the media annotation that is currently worked on. After the document has been finished, the global `\verb+draft+' option can be removed. \begin{verbatim} + noplaybutton +\end{verbatim} +Disables the transparent play button normally laid over the inactive media annotation. +\begin{verbatim} windowed[= false | [<width>x<height>][@<position>] ] \end{verbatim} The media is played in a floating window, instead of being played in an embedded fashion. The floating window size is specified via the optional argument \verb+<width>x<height>+, where \verb+<width>+ and \verb+<height>+ are given in pixels (integer numbers without unit). If the size is not given, a default size is guessed from the annotation size. Optionally, the position of the floating window on the screen can be specified through \verb+@<position>+, where \verb+<position>+ may assume one of `\verb+tl+', `\verb+cl+', `\verb+bl+', `\verb+bc+', `\verb+br+', `\verb+cr+', `\verb+tr+', `\verb+tc+' or `\verb+cc+'. The position specifiers have the following meaning:\quad{\fboxsep=1pt\fbox{\vtop{\hbox{\ttfamily\fbox{\rule{0pt}{1.5ex}tl} \fbox{\rule{0pt}{1.5ex}tc} \fbox{\rule{0pt}{1.5ex}tr}} \hbox{\ttfamily\fbox{\rule{0pt}{1.5ex}cl} \fbox{\rule{0pt}{1.5ex}cc} \fbox{\rule{0pt}{1.5ex}cr}} \hbox{\ttfamily\fbox{\rule{0pt}{1.5ex}bl} \fbox{\rule{0pt}{1.5ex}bc} \fbox{\rule{0pt}{1.5ex}br}}}}}\\[0.5ex] @@ -622,11 +627,11 @@ parameter & description\\\hline\hline \begin{Verbatim} \includemedia[ label=some_dice, - width=0.4\linewidth,height=0.3\linewidth, - activate=pageopen, + width=0.6\linewidth,height=0.45\linewidth, addresource=random.mp4, %two video files addresource=cube.mp4, - transparent, + transparent, %transparent player background + activate=pageopen, flashvars={ source=random.mp4 &loop=true % loop video @@ -650,14 +655,14 @@ parameter & description\\\hline\hline \makebox[\linewidth]{\hfill\includemedia[ label=some_dice, width=0.6\linewidth,height=0.45\linewidth, - activate=pageopen, - addresource=random.mp4, + addresource=random.mp4, %two video files addresource=cube.mp4, - transparent, + transparent, %transparent player background + activate=pageopen, flashvars={ source=random.mp4 - &loop=true - &scaleMode=letterbox + &loop=true % loop video + &scaleMode=letterbox % preserve aspect ratio while scaling the video } ]{}{VPlayer.swf}\hfill} \makebox[\linewidth]{\hfill% @@ -770,30 +775,26 @@ http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/contrib/media9/players/ \centering \begin{Verbatim} \includemedia[ - width=0.4\linewidth,height=0.3\linewidth, - activate=pageopen, + %activate=onclick, % default addresource=cube.mp4, - transparent, flashvars={ source=cube.mp4 + &autoPlay=true % start playing on activation &loop=true - &scaleMode=letterbox } -]{}{VPlayer9.swf} +]{\includegraphics[height=0.45\linewidth]{cubeposter}}{VPlayer9.swf} \end{Verbatim} \vspace{1ex} \hfill\includemedia[ - width=0.6\linewidth,height=0.45\linewidth, - activate=pageopen, + activate=onclick, %default addresource=cube.mp4, - transparent, flashvars={ - source=cube.mp4 - &loop=true - &scaleMode=letterbox + source=cube.mp4 + &autoPlay=true %start playing on activation + &loop=true } -]{}{VPlayer9.swf}\hfill -\vspace{1ex} +]{\includegraphics[height=0.45\linewidth]{cubeposter}}{VPlayer9.swf}\hfill +\vspace{2ex} \begin{Verbatim} \includemedia[ addresource=bird.mp3, @@ -814,7 +815,7 @@ http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/contrib/media9/players/ transparent ]{\color{blue}\framebox[0.5\linewidth][c]{Singing bird}}{APlayer9.swf}\hfill \vspace{2ex} -\caption{Video and sound examples that should run in Adobe Reader for Linux up to version \href{ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.4.1/}{9.4.1}. Here, players `VPlayer9.swf' and `APlayer9.swf' are used. Both are compatible with Adobe Flash Player 9 plugin that is bundled with the Reader.}\label{ar941ex} +\caption{Video and sound examples that should run in Adobe Reader for Linux up to version \href{ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.4.1/}{9.4.1}. Here, players `VPlayer9.swf' and `APlayer9.swf' are used. Both are compatible with Adobe Flash Player 9 plugin that is bundled with the Reader. Also, the video player needs to be activated by mouse click (which is the default). We provide a poster image that is shown in the inactive state.}\label{ar941ex} \end{figure} \clearpage @@ -846,30 +847,28 @@ Below, several examples of embedded 3D files are shown. The first one, Fig.~\ref \begin{Verbatim} \includemedia[ width=0.8\linewidth,height=0.8\linewidth, - activate=pageopen, add3Djscript=asylabels.js, %upright text labels add3Djscript=3Dspintool.js, %let scene rotate about z-axis % 3Dcoo, 3Droo values found with `Generate Default View' from % context menu 3Dmenu, 3Dc2c=4 2 3, - 3Dcoo=6.01792049407959 12.437679290771484 0.18967819213867188, - 3Droo=479.9268773794643, -]{}{epix.prc} + 3Dcoo=4.413303375244141 2.195653200149536 -0.000011444091796875, + 3Droo=429.49035778293376, +]{\includegraphics{epixposter}}{epix.prc} \end{Verbatim} \vspace{1ex} \includemedia[ width=0.8\linewidth,height=0.8\linewidth, - activate=pageopen, add3Djscript=asylabels.js, %upright text labels add3Djscript=3Dspintool.js, %let scene rotate about z-axis % 3Dcoo, 3Droo values found with `Generate Default View' from % context menu 3Dmenu, 3Dc2c=4 2 3, - 3Dcoo=6.01792049407959 12.437679290771484 0.18967819213867188, - 3Droo=479.9268773794643, -]{}{epix.prc} + 3Dcoo=4.413303375244141 2.195653200149536 -0.000011444091796875, + 3Droo=429.49035778293376, +]{\includegraphics{epixposter}}{epix.prc} \caption{Embedded PRC file produced with Asymptote, making use of convenience 3D JavaScripts `asylabels.js' and `3Dspintool.js' mentioned {\leavevmode\pdfstartlink attr{/Border[0 0 1]/C[0 0 1]/H/I}user{/Subtype/Link/A<</D(3dscripts)/S/GoTo>>}above\pdfendlink}.}\label{asyex} \end{figure} diff --git a/Master/texmf-dist/tex/latex/media9/media9.sty b/Master/texmf-dist/tex/latex/media9/media9.sty index cff71e34542..0f381901d79 100644 --- a/Master/texmf-dist/tex/latex/media9/media9.sty +++ b/Master/texmf-dist/tex/latex/media9/media9.sty @@ -40,9 +40,10 @@ \RequirePackage{xparse} \RequirePackage{ifpdf} \RequirePackage{atbegshi} +\RequirePackage{tikz} -\def\g@mix@date@tl{2013/11/12} -\def\g@mix@version@tl{0.34} +\def\g@mix@date@tl{2013/11/15} +\def\g@mix@version@tl{0.35} \def\g@mix@liiikerneldate{2013/07/28} \def\g@mix@liiipkgdate{2013/07/28} @@ -120,6 +121,8 @@ \tl_gclear:N\g_mix_pkgopt_ls_tl \tl_gclear:N\g_mix_pkgopt_rm_tl \bool_new:N\g_mix_pkgiiidcalc_bool +\bool_new:N\g_mix_pkgpbtn_bool +\bool_gset_true:N\g_mix_pkgpbtn_bool %floating window settings \group_begin: @@ -165,6 +168,11 @@ final / false .code:n = {\bool_gset_true:N\g_mix_pkgdraft_bool}, final .default:n = {true}, + noplaybutton .choice:, + noplaybutton / true .code:n = {\bool_gset_false:N\g_mix_pkgpbtn_bool}, + noplaybutton / false .code:n = {\bool_gset_true:N\g_mix_pkgpbtn_bool}, + noplaybutton .default:n = {true}, + activate .choice:, activate / pagevisible .code:n = {\tl_gset:Nn\g_mix_pkgact_tl{/PV}}, activate / pageopen .code:n = {\tl_gset:Nn\g_mix_pkgact_tl{/PO}}, @@ -358,6 +366,7 @@ \box_clear:N\l_mix_poster_box \tl_clear:N\l_mix_scripts_tl \bool_gset_eq:NN\g_mix_usrdraft_bool\g_mix_pkgdraft_bool + \bool_gset_eq:NN\g_mix_usrpbtn_bool\g_mix_pkgpbtn_bool \seq_gclear:N\g_mix_res_seq \seq_gclear:N\g_mix_script_seq \int_gzero:N\g_mix_resizeflag_int @@ -528,7 +537,7 @@ \pdfcatalog{/AcroForm~<</Fields~[]/NeedAppearances~true>>} \tl_gset:cn{Acro@Form@added}{} } - } + } }{ \int_new:N\g_mix_obj_int % object ID \bool_if:NTF\g_mix_dvipdfmx_bool{ %dvipdfmx/XeTeX @@ -616,7 +625,7 @@ /AcroForm~<</Fields~[]/NeedAppearances~true>>>>} \tl_gset:cn{Acro@Form@added}{} } - } + } }{ % dvips \bool_new:N\g_mix_powerdot_bool %to cope with some powerdot oddity @@ -895,7 +904,7 @@ } \tl_gset:cn{Acro@Form@added}{} } - } + } } } @@ -1134,6 +1143,20 @@ \NewDocumentCommand\addmediapath{m}{\file_path_include:n{#1/}} +%play button overlay +\box_new:N\l_mix_pbtn_box +\ExplSyntaxOff +\def\g@mix@pbtn@tl{% + \tikz[opacity=.7,transparency group]{% + \useasboundingbox (-5,-5) rectangle (5,5); + \fill [color=gray,even odd rule] (0,0) circle (2.5) + (-0.95,1.4)--(-0.95,-1.4)--+(30:2.8)--cycle; + \fill [color=white] (-0.95,1.4)--(-0.95,-1.4)--+(30:2.8)--cycle; + }% +} +\ExplSyntaxOn +\tl_set_eq:NN\g_mix_pbtn_tl\g@mix@pbtn@tl + \ior_new:N\l_mix_vfile_stream %file stream for 3D views files \NewDocumentCommand\includemedia{O{}mm}{%#1 options, #2 text/image #3 media file \group_begin: @@ -1375,8 +1398,27 @@ \box_use:N\l_mix_poster_box } } - \hbox_to_wd:nn{\l_mix_wd_tl}{ - \vrule~width~\c_zero_dim~height~\l_mix_ht_tl~depth~\l_mix_dp_tl\hss + \bool_if:NTF\g_mix_usrpbtn_bool{ + %scale and insert play button overlay + \hbox_set:Nn\l_mix_pbtn_box{\g_mix_pbtn_tl} + \dim_compare:nTF{\l_mix_tt_tl>\l_mix_wd_tl}{ + \box_resize_to_wd:Nn\l_mix_pbtn_box{\l_mix_wd_tl} + }{ + \box_resize_to_ht_plus_dp:Nn\l_mix_pbtn_box{\l_mix_tt_tl} + } + \box_move_down:nn{\l_mix_dp_tl}{ + \hbox_to_wd:nn{\l_mix_wd_tl}{ + \hss + \vbox_to_ht:nn{\l_mix_tt_tl}{ + \vss\box_use:N\l_mix_pbtn_box\vss + } + \hss + } + } + }{ + \hbox_to_wd:nn{\l_mix_wd_tl}{ + \vrule~width~\c_zero_dim~height~\l_mix_ht_tl~depth~\l_mix_dp_tl\hss + } } \int_gincr:N\g_mix_rmcnt_int } @@ -1553,6 +1595,7 @@ } \bool_new:N\g_mix_usrdraft_bool +\bool_new:N\g_mix_usrpbtn_bool \bool_new:N\g_mix_opt_iiidview_bool \bool_new:N\l_mix_roo_bool \bool_new:N\g_mix_opt_ciiw_bool @@ -1640,6 +1683,11 @@ final / false .code:n = {\bool_gset_true:N\g_mix_usrdraft_bool}, final .default:n = {true}, + noplaybutton .choice:, + noplaybutton / true .code:n = {\bool_gset_false:N\g_mix_usrpbtn_bool}, + noplaybutton / false .code:n = {\bool_gset_true:N\g_mix_usrpbtn_bool}, + noplaybutton .default:n = {true}, + transparent .choice_code:n = {\tl_gset:Nx\g_mix_transp_tl{\l_keys_choice_tl}}, transparent .generate_choices:n = {true,false}, transparent .default:n = {true}, diff --git a/Master/texmf-dist/tex/latex/media9/players/APlayer.swf b/Master/texmf-dist/tex/latex/media9/players/APlayer.swf Binary files differindex 3df6c471097..2926ce52bb5 100644 --- a/Master/texmf-dist/tex/latex/media9/players/APlayer.swf +++ b/Master/texmf-dist/tex/latex/media9/players/APlayer.swf diff --git a/Master/texmf-dist/tex/latex/media9/players/APlayer9.swf b/Master/texmf-dist/tex/latex/media9/players/APlayer9.swf Binary files differindex fd7689f2935..306fdbe7550 100644 --- a/Master/texmf-dist/tex/latex/media9/players/APlayer9.swf +++ b/Master/texmf-dist/tex/latex/media9/players/APlayer9.swf diff --git a/Master/texmf-dist/tex/latex/media9/players/VPlayer.swf b/Master/texmf-dist/tex/latex/media9/players/VPlayer.swf Binary files differindex 4e7805e7a20..3dd82141c77 100644 --- a/Master/texmf-dist/tex/latex/media9/players/VPlayer.swf +++ b/Master/texmf-dist/tex/latex/media9/players/VPlayer.swf diff --git a/Master/texmf-dist/tex/latex/media9/players/VPlayer9.swf b/Master/texmf-dist/tex/latex/media9/players/VPlayer9.swf Binary files differindex 574e3c92434..e2bfb405633 100644 --- a/Master/texmf-dist/tex/latex/media9/players/VPlayer9.swf +++ b/Master/texmf-dist/tex/latex/media9/players/VPlayer9.swf |