summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/movie15/movie15.sty2223
1 files changed, 1214 insertions, 1009 deletions
diff --git a/Master/texmf-dist/tex/latex/movie15/movie15.sty b/Master/texmf-dist/tex/latex/movie15/movie15.sty
index ac357f33026..694aa7a09fd 100644
--- a/Master/texmf-dist/tex/latex/movie15/movie15.sty
+++ b/Master/texmf-dist/tex/latex/movie15/movie15.sty
@@ -9,14 +9,14 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{movie15}[2006/07/13]
+\ProvidesPackage{movie15}[2006/07/27]
\RequirePackage{keyval}
\RequirePackage{ifthen}
\RequirePackage{ifpdf}
\newboolean{@MXV@iiiDfeat}% enable 3D features from PDF-1.6 spec?
\setboolean{@MXV@iiiDfeat}{false}%
-\newboolean{@MXV@iiid}%set to true if a 3D file is beeing embedded
+\newboolean{@MXV@iiid}%set to true if a 3D file is being embedded
\DeclareOption{3D}{%
\setboolean{@MXV@iiiDfeat}{true}%
@@ -39,6 +39,9 @@
%for conditionals where \ifthenelse doesn't work
\gdef\@MXV@if#1{\csname if#1\endcsname}%
+\newboolean{@MXV@presentation} %used with presentation making package?
+\newboolean{@MXV@hide} %contents hidden on the current slide?
+
\ifthenelse{\boolean{@MXV@iiiDfeat}}{%
\newcount\@MXV@iiidoncurpage%index of 3D annot on current page
\global\@MXV@iiidoncurpage=0%
@@ -67,8 +70,13 @@
\def\@MXV@labeltoaux#1#2{%
\@bsphack\protected@write\@auxout{}{%
\string\@MXV@newlabel{#1}{#2}%
+ \string\@MXV@newlabel{@#1@}{\@MXV@getlabelvalue{#1}}%
}\@esphack%
- \ifthenelse{\equal{\@MXV@getlabelvalue{#1}}{undefined}}{%
+ \ifthenelse{%
+ \equal{\@MXV@getlabelvalue{#1}}{undefined}\OR%
+ %double check that the value hasn't changed
+ \NOT\equal{\@MXV@getlabelvalue{#1}}{\@MXV@getlabelvalue{@#1@}}%
+ }{%
\ifthenelse{\isundefined{\@MXV@warning}}{%issue warning only once, at end
\gdef\@MXV@warning{}% of document
\AtEndDocument{%
@@ -96,14 +104,18 @@
}%
\else%
\PassOptionsToPackage{pdfmark}{hyperref}%
- %counter for absolute number of movierefs
- \newcount\@MXV@links
\fi
%counter for absolute number of inclusions,
%used for labelling each annotation
\newcount\@MXV@includes
+%counter for absolute number of movie players
+\newcount\@MXV@players
+
+%counter for absolute number of movierefs
+\newcount\@MXV@links
+
%measuring things
%textbox
\newdimen\@MXV@width
@@ -164,6 +176,7 @@
\setboolean{@MXV@linkclose}{false}%
\setboolean{@MXV@linkreset}{false}%
\gdef\@MXV@label{}% for movieref
+ \gdef\@MXV@@label{}% for movieref
\gdef\@MXV@mime{@MXV@auto}%
\gdef\@MXV@player{}%
\gdef\@MXV@fsentry{}%
@@ -472,7 +485,10 @@
%
%3D stream object
\if@MXV@inline%
- \IfFileExists{#4}{%
+ \ifthenelse{%
+ \NOT\boolean{@MXV@presentation}\OR%
+ \equal{\@MXV@getlabelvalue{\@MXV@label.3dstream}}{undefined}%
+ }{%
\pdfobj stream%
attr {%
/Subtype/\@MXV@iiidsubtype%
@@ -485,13 +501,11 @@
file {#4}%
\pdfrefobj\pdflastobj%
\edef\@MXV@iiidstream{\the\pdflastobj}%
+ \if@MXV@presentation%
+ \@MXV@newlabel{\@MXV@label.3dstream}{\@MXV@iiidstream}%
+ \fi%
}{%
- \PackageError{movie15}{%
- File `#4' cannot be opened for embedding.\MessageBreak
- Did you forget to set option `url' or `inline=false'?
- }{%
- Try any of the options `url' or `inline=false'!
- }%
+ \edef\@MXV@iiidstream{\@MXV@getlabelvalue{\@MXV@label.3dstream}}%
}%
\fi%
%
@@ -562,25 +576,44 @@
\pdfobj stream {}\pdfrefobj\pdflastobj%
\xdef\@MXV@apdict{/AP << /N \the\pdflastobj\space 0 R >>}%
}{}%
+ %3D reference dict
+ \if@MXV@presentation%
+ \ifthenelse{%
+ \equal{\@MXV@getlabelvalue{\@MXV@label.3dref}}{undefined}%
+ }{%
+ \pdfobj {<<%
+ /Type/3DRef%
+ /3DD \@MXV@iiidstream\space 0 R% 3D stream object
+ >>}\pdfrefobj\pdflastobj%
+ \edef\@MXV@iiidstreamorref{\the\pdflastobj}%
+ \@MXV@newlabel{\@MXV@label.3dref}{\the\pdflastobj}%
+ }{%
+ \edef\@MXV@iiidstreamorref{\@MXV@getlabelvalue{\@MXV@label.3dref}}%
+ }%
+ \else%
+ \edef\@MXV@iiidstreamorref{\@MXV@iiidstream}%
+ \fi%
%annotation object of subtype `3D'%
\pdfannot width #1 height #2 depth #3 {%
/Subtype/3D%
/F 4% we cannot put F 5 here; bug in Reader; 3D annot would be
/T (\@MXV@filename)% disabled even if plugin were available
/Contents (3D Object (\@MXV@mime))%
- \ifx\@MXV@label\@empty\else%
- /NM (\@MXV@label)%
+ \ifx\@MXV@@label\@empty\else%
+ /NM (\@MXV@@label)%
\fi%
- /P \@MXV@pdfpageref{@MXV@player\the\@MXV@includes.page} 0 R%
+ /P \@MXV@pdfpageref{@MXV@annot\the\@MXV@includes.page} 0 R%
\@MXV@apdict% /AP <</N<<>>/R<<>>/D<<>>>> doesn't work here
\@MXV@defaultview%
/3DI \if@MXV@iiidctrls true\else false\fi%
- /3DD \@MXV@iiidstream\space 0 R% 3D stream object
+ /3DD \@MXV@iiidstreamorref\space 0 R% 3D stream or reference object
/3DA << \@MXV@activation\@MXV@deactivation >>%
}%
- %label for later annot obj number determination
- \ifx\@MXV@label\@empty\else%
- \@MXV@labeltoaux{@MXV@\@MXV@label.annot}{\the\pdflastannot}%
+ %label for later annot obj number determination, to be used in
+ %movieref's
+ \ifx\@MXV@@label\@empty\else%
+ \@MXV@labeltoaux{@MXV@\@MXV@@label.annot}{\the\pdflastannot}%
+ \@MXV@newlabel{@MXV@\@MXV@@label.annot}{\the\pdflastannot}%
\fi%
\fi}}%
}%
@@ -659,8 +692,11 @@
%
%3D stream object
\if@MXV@inline%
- \IfFileExists{#4}{%
- \pdfmark{%
+ \ifthenelse{%
+ \NOT\boolean{@MXV@presentation}\OR%
+ \equal{\@MXV@getlabelvalue{\@MXV@label.3dstream}}{undefined}%
+ }{%
+ \pdfmark{%
pdfmark=/OBJ,%
Raw={%
/_objdef {iiiDfile\the\@MXV@includes}%
@@ -688,13 +724,11 @@
}%
}%
\edef\@MXV@iiidstream{iiiDfile\the\@MXV@includes}%
+ \if@MXV@presentation%
+ \@MXV@newlabel{\@MXV@label.3dstream}{\@MXV@iiidstream}%
+ \fi%
}{%
- \PackageError{movie15}{%
- File `#4' cannot be opened for embedding.\MessageBreak
- Did you forget to set option `url' or `inline=false'?
- }{%
- Try any of the options `url' or `inline=false'!
- }%
+ \edef\@MXV@iiidstream{\@MXV@getlabelvalue{\@MXV@label.3dstream}}%
}%
\fi%
%
@@ -793,6 +827,35 @@
}%
\xdef\@MXV@apdict{/AP << /N {apdict}>>}%
}{}%
+ %3D reference dict
+ \if@MXV@presentation%
+ \ifthenelse{%
+ \equal{\@MXV@getlabelvalue{\@MXV@label.3dref}}{undefined}%
+ }{%
+ \pdfmark{%
+ pdfmark=/OBJ,%
+ Raw={%
+ /_objdef {iiiDref\the\@MXV@includes}%
+ /type/dict%
+ }%
+ }%
+ \pdfmark{%
+ pdfmark=/PUT,%
+ Raw={%
+ {iiiDref\the\@MXV@includes} <<%
+ /Type/3DRef%
+ /3DD {\@MXV@iiidstream}% 3D stream object
+ >>%
+ }%
+ }%
+ \edef\@MXV@iiidstreamorref{iiiDref\the\@MXV@includes}%
+ \@MXV@newlabel{\@MXV@label.3dref}{\@MXV@iiidstreamorref}%
+ }{%
+ \edef\@MXV@iiidstreamorref{\@MXV@getlabelvalue{\@MXV@label.3dref}}%
+ }%
+ \else%
+ \edef\@MXV@iiidstreamorref{\@MXV@iiidstream}%
+ \fi%
%annotation object of subtype `3D'
\pdfmark[\phantom{\@MXV@box{#1}{#2}{#3}}]{%
pdfmark=/ANN,%
@@ -801,18 +864,22 @@
/_objdef {3Dannot\the\@MXV@includes}%
/F 4%
/T (\@MXV@filename)%
- \ifx\@MXV@label\@empty\else%
- /NM (\@MXV@label)%
+ \ifx\@MXV@@label\@empty\else%
+ /NM (\@MXV@@label)%
\fi%
/Contents (3D Object (\@MXV@mime))%
/P {ThisPage}%
\@MXV@apdict% /AP <</N<<>>/R<<>>/D<<>>>> doesn't work here
\@MXV@defaultview%
/3DI \if@MXV@iiidctrls true\else false\fi%
- /3DD {\@MXV@iiidstream}%
+ /3DD {\@MXV@iiidstreamorref}% 3D stream or reference object
/3DA << \@MXV@activation\@MXV@deactivation >>%
}%
}%
+ \ifx\@MXV@@label\@empty\else%
+ \@MXV@labeltoaux{@MXV@\@MXV@@label.annot}{\the\@MXV@includes}%
+ \@MXV@newlabel{@MXV@\@MXV@@label.annot}{\the\@MXV@includes}%
+ \fi%
\fi%
}%
\fi%
@@ -849,7 +916,10 @@
afterBlur: function (e) {%
%only resume if we click outside of any media
if(focusonplayer==0){%
- try{e.target.play();}catch(e){}
+ try{
+ e.target.settings.privateData.paused=false;
+ e.target.play();
+ }catch(e){}
}
},
onFocus: function (e) {%
@@ -858,10 +928,11 @@
afterFocus: function (e) {%
if(!e.target.isPlaying){%play on click if paused
try{
+ e.target.settings.privateData.paused=false;
e.target.play();
if(!e.target.isPlaying){%still not playing?!
%sometimes play() fails, in particular if the movie has reached
- %its end while having the focus; but this works:
+ %its end before getting the focus; but this works:
if(
e.target.settings.startAt.time
|| e.target.settings.startAt.frame
@@ -880,7 +951,10 @@
\@MXV@if{#2}%
else{%
%media can only be paused if mouse option is set
- try{e.target.pause();}catch (e){}
+ try{
+ e.target.pause();
+ e.target.settings.privateData.paused=true;
+ }catch (e){}
}
\fi%
e.target.visible=true;
@@ -905,7 +979,10 @@
e.target.seek(e.target.settings.startAt);
}
e.target.visible=true;
- \@MXV@if{#3} e.target.play();\fi
+ \@MXV@if{#3}
+ e.target.settings.privateData.paused=false;
+ e.target.play();
+ \fi
}
catch (e){}
}
@@ -931,31 +1008,22 @@
\fi%
%embedded file entry `/EF'
\if@MXV@inline%
- \IfFileExists{#4}{%
- %embed the same media file only once
- \ifthenelse{\equal{\@MXV@getlabelvalue{#4}}{undefined}}{%
- \pdfobj stream %
- attr {%
- /Type/EmbeddedFile%
- /Subtype (\@MXV@mime)%
- }%
- file {#4}%
- \pdfrefobj\pdflastobj%
- \edef\@MXV@efentry{%
- /EF << /F \the\pdflastobj\space 0 R >>%
- }%
- \@MXV@newlabel{#4}{\the\pdflastobj}%
- }{%
- \edef\@MXV@efentry{%
- /EF << /F \@MXV@getlabelvalue{#4}\space 0 R >>%
+ %embed the same media file only once
+ \ifthenelse{\equal{\@MXV@getlabelvalue{#4}}{undefined}}{%
+ \pdfobj stream %
+ attr {%
+ /Type/EmbeddedFile%
+ /Subtype (\@MXV@mime)%
}%
+ file {#4}%
+ \pdfrefobj\pdflastobj%
+ \edef\@MXV@efentry{%
+ /EF << /F \the\pdflastobj\space 0 R >>%
}%
+ \@MXV@newlabel{#4}{\the\pdflastobj}%
}{%
- \PackageError{movie15}{%
- File `#4' cannot be opened for embedding.\MessageBreak
- Did you forget to set option `url' or `inline=false'?
- }{%
- Try any of the options `url' or `inline=false'!
+ \edef\@MXV@efentry{%
+ /EF << /F \@MXV@getlabelvalue{#4}\space 0 R >>%
}%
}%
\else\def\@MXV@efentry{}\fi%
@@ -1036,14 +1104,16 @@
/F 5% disable annot if multimedia is not available
/T (\@MXV@filename)%
/Contents (Media File (\@MXV@mime))%
- /P \@MXV@pdfpageref{@MXV@player\the\@MXV@includes.page} 0 R%
+ /P \@MXV@pdfpageref{@MXV@annot\the\@MXV@includes.page} 0 R%
/A \the\@MXV@adict\space 0 R%
/AA \the\@MXV@aadict\space 0 R%
/AP <</N<<>>/R<<>>/D<<>>>>%
}\edef\@MXV@screenannot{\the\pdflastannot}%
- %label for later annot obj number determination
- \ifx\@MXV@label\@empty\else%
- \@MXV@labeltoaux{@MXV@\@MXV@label.annot}{\@MXV@screenannot}%
+ %label for later annot obj number determination, to be used in
+ %movieref's only
+ \ifx\@MXV@@label\@empty\else%
+ \@MXV@labeltoaux{@MXV@\@MXV@@label.annot}{\@MXV@screenannot}%
+ \@MXV@newlabel{@MXV@\@MXV@@label.annot}{\@MXV@screenannot}%
\fi%
%
%new media clip object of subtype `Media Clip Data' (/S/MCD)
@@ -1069,8 +1139,9 @@
>>%
>>}\edef\@MXV@mediarendition{\the\pdflastobj}\pdfrefobj\pdflastobj%
%label for later rendition obj number determination
- \ifx\@MXV@label\@empty\else%
- \@MXV@labeltoaux{@MXV@\@MXV@label.rendition}{\@MXV@mediarendition}%
+ \ifx\@MXV@@label\@empty\else%
+ \@MXV@labeltoaux{@MXV@\@MXV@@label.rendition}{\@MXV@mediarendition}%
+ \@MXV@newlabel{@MXV@\@MXV@@label.rendition}{\@MXV@mediarendition}%
\fi%
%
%action dictionary
@@ -1199,6 +1270,10 @@
/AP <</N<<>>/R<<>>/D<<>>>>%
}%
}%
+ \ifx\@MXV@@label\@empty\else%
+ \@MXV@labeltoaux{@MXV@\@MXV@@label.annot}{\the\@MXV@includes}%
+ \@MXV@newlabel{@MXV@\@MXV@@label.annot}{\the\@MXV@includes}%
+ \fi%
%
%entire action entry moved outside screen annotation
\pdfmark{%
@@ -1289,53 +1364,44 @@
%
%embedded file entry `/EF'
\if@MXV@inline%
- \IfFileExists{#4}{%
- %embed the same media file only once
- \ifthenelse{\equal{\@MXV@getlabelvalue{#4}}{undefined}}{%
- %new stream object
- \pdfmark{%
- pdfmark=/OBJ,%
- Raw={%
- /_objdef {fstream\the\@MXV@includes}%
- /type/stream%
- }%
- }%
- \pdfmark{%
- pdfmark=/PUT,%
- Raw={%
- {fstream\the\@MXV@includes}%
- (#4) (r) file% read in file contents
- }%
+ %embed the same media file only once
+ \ifthenelse{\equal{\@MXV@getlabelvalue{#4}}{undefined}}{%
+ %new stream object
+ \pdfmark{%
+ pdfmark=/OBJ,%
+ Raw={%
+ /_objdef {fstream\the\@MXV@includes}%
+ /type/stream%
}%
- \pdfmark{%
- pdfmark=/PUT,%
- Raw={%
- {fstream\the\@MXV@includes} <<%
- /Type/EmbeddedFile%
- /Subtype(\@MXV@mime)%
- >>%
- }%
+ }%
+ \pdfmark{%
+ pdfmark=/PUT,%
+ Raw={%
+ {fstream\the\@MXV@includes}%
+ (#4) (r) file% read in file contents
}%
- \edef\@MXV@moviestream{fstream\the\@MXV@includes}%
- \@MXV@newlabel{#4}{fstream\the\@MXV@includes}%
- }{%
- \edef\@MXV@moviestream{\@MXV@getlabelvalue{#4}}%
}%
- % put the embedded file entry into file spec object
\pdfmark{%
pdfmark=/PUT,%
Raw={%
- {filespec\the\@MXV@includes} <<%
- /EF << /F {\@MXV@moviestream} >>%
+ {fstream\the\@MXV@includes} <<%
+ /Type/EmbeddedFile%
+ /Subtype(\@MXV@mime)%
>>%
}%
}%
+ \edef\@MXV@moviestream{fstream\the\@MXV@includes}%
+ \@MXV@newlabel{#4}{fstream\the\@MXV@includes}%
}{%
- \PackageError{movie15}{%
- File `#4' cannot be opened for embedding.\MessageBreak
- Did you forget to set option `url' or `inline=false'?
- }{%
- Try any of the options `url' or `inline=false'!
+ \edef\@MXV@moviestream{\@MXV@getlabelvalue{#4}}%
+ }%
+ % put the embedded file entry into file spec object
+ \pdfmark{%
+ pdfmark=/PUT,%
+ Raw={%
+ {filespec\the\@MXV@includes} <<%
+ /EF << /F {\@MXV@moviestream} >>%
+ >>%
}%
}%
\fi%
@@ -1407,1034 +1473,1173 @@
%definition of user command `\includemovie'
\newcommand{\includemovie}[4][]{%
\leavevmode%
- \global\advance\@MXV@includes by 1%increment counter
\@MXV@reset% all macros and options
\setkeys{movie15}{#1}% parse options
- %guess the mime type based on the filename extension
- \filename@parse{#4}%
- \ifthenelse{\equal{\@MXV@mime}{@MXV@auto}}{%
- \@MXV@guessmime{#4}{\filename@ext}}{}%
- \if\filename@ext\relax%
- \xdef\@MXV@filename{\filename@base}%
- \else%
- \xdef\@MXV@filename{\filename@base.\filename@ext}%
- \fi%
%
- %if 3D object is not embedded inline we must use some external player :(
- \ifthenelse{%
- \boolean{@MXV@iiid}
- \AND\NOT\boolean{@MXV@inline}
- }{%
- \setboolean{@MXV@externalviewer}{true}%
- }{}%
+ %total height of text
+ \@MXV@totalheight=\@MXV@height%
+ \advance\@MXV@totalheight by \@MXV@depth%
+ %traiselen=distance at which text is to be raised to centre it vertically
+ %braiselen=vertical centre of media box (auxiliary measure)
+ \@MXV@traiselen=0.5\@MXV@height%
+ \advance\@MXV@traiselen by -0.5\@MXV@depth%
%
- %some link attributes (if hyperref not loaded)
- \ifthenelse{\isundefined{\@pdfborder}}{%
- \def\@MXV@urlattr{}%
- \def\@MXV@runattr{}%
- }{%
- \edef\@MXV@urlattr{%
- /Border [\@pdfborder]%
- /C [\@urlbordercolor]%
- /H \@pdfhighlight%
- }%
- \edef\@MXV@runattr{%
- /Border [\@pdfborder]%
- /C [\@runbordercolor]%
- /H \@pdfhighlight%
- }%
+ \ifthenelse{\equal{#3}{}}{% no height argument
+ \@MXV@braiselen=0.5\@MXV@height%
+ }{%override height of text, height argument given
+ \@MXV@braiselen=#3%
+ \@MXV@braiselen=0.5\@MXV@braiselen%
+ \setlength{\@MXV@height}{#3}%
}%
%
- %label this annotation for later player id number determination &
- %check for multiply-defined labels
- \ifx\@MXV@label\@empty\else%
- %
- \ifthenelse{%
- \NOT\equal{\@MXV@getlabelvalue{@MXV@\@MXV@label.playerid}}{undefined}%
- \AND%
- \NOT\equal{\@MXV@getlabelvalue{@MXV@\@MXV@label.playerid}}{%
- \the\@MXV@includes}%
+ \ifthenelse{\equal{\@MXV@boxdepth}{}}{% no depth option given
+ \ifthenelse{\lengthtest{\@MXV@totalheight>\@MXV@height}}{%
+ %depth of text only taken into account, if the total height
+ %is smaller than the height of the display box
+ \advance\@MXV@braiselen by -0.5\@MXV@depth%
}{%
- \PackageWarning{movie15}{%
- Label `\@MXV@label' multiply defined%
+ \@MXV@depth=0pt%
+ }%
+ }{%override depth of text, depth option given
+ \setlength{\@MXV@@boxdepth}{\@MXV@boxdepth}%
+ \advance\@MXV@braiselen by -0.5\@MXV@@boxdepth%
+ \setlength{\@MXV@depth}{\@MXV@boxdepth}%
+ }%
+ %finally centre text vertically
+ \ifthenelse{\NOT\equal{#3}{}\OR\NOT\equal{\@MXV@boxdepth}{}}{%
+ \advance\@MXV@traiselen by -\@MXV@braiselen%
+ \@MXV@traiselen=-\@MXV@traiselen%
+ \savebox{\@MXV@textbox}{\raisebox{\@MXV@traiselen}[0pt][0pt]{%
+ \usebox{\@MXV@textbox}}}%
+ }{}%
+ \ifthenelse{\equal{#2}{}}{}{%override horiz. dimension of text
+ \setlength{\@MXV@width}{#2}%
+ %centre text horizontally
+ \savebox{\@MXV@textbox}{\makebox[\@MXV@width][c]{\usebox{\@MXV@textbox}}}%
+ }%
+ %
+ %find out if some presentation making package is being used
+ %and whether the contents should be hidden or not on the current slide
+ \setboolean{@MXV@presentation}{false}%
+ \setboolean{@MXV@hide}{false}%
+ \ifx\ifpd@overlay\@undefined\relax%
+ \else% powerdot
+ \setboolean{@MXV@presentation}{true}%
+ \ifthenelse{\boolean{pd@overlay}}{}{%
+ \ifthenelse{\pd@method=2}{}{%
+ \setboolean{@MXV@hide}{true}%
}%
- \ifthenelse{\isundefined{\@MXV@multiwarning}}{%
- \gdef\@MXV@multiwarning{}%
- \AtEndDocument{%
- \PackageWarningNoLine{movie15}{%
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\MessageBreak
- @@ There were multiply-defined labels! @@\MessageBreak
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}%
- }%
- }{}%
+ }%
+ \fi%
+ \ifx\ifbeamer@anotherslide\@undefined\relax\else%
+ \setboolean{@MXV@presentation}{true}%
+ \ifthenelse{\boolean{beamer@anotherslide}}{%
+ \setboolean{@MXV@hide}{true}%
}{}%
- \@MXV@labeltoaux{@MXV@\@MXV@label.playerid}{\the\@MXV@includes}%
\fi%
%
- \ifthenelse{\boolean{@MXV@externalviewer}}{%
- \ifx\@MXV@label\@empty\else%
- \@MXV@labeltoaux{@MXV@\@MXV@label.externalviewer}{true}%
- \fi%
+ \ifthenelse{\boolean{@MXV@hide}}{%
+ %insert whitespace instead of annot
+ \phantom{\vrule width \@MXV@width height \@MXV@height depth \@MXV@depth}%
}{%
- %what is to be put into movie link annot depends on the following
- \ifx\@MXV@label\@empty\else%
- \@MXV@labeltoaux{@MXV@\@MXV@label.externalviewer}{false}%
- \fi%
+ \ifthenelse{\NOT\boolean{@MXV@url}\AND\NOT\boolean{@MXV@inline}}{%
+ \IfFileExists{#4}{}{%
+ \PackageError{movie15}{%
+ File `#4' cannot be opened for embedding.\MessageBreak
+ Did you forget to set option `url' or `inline=false'?
+ }{%
+ Try any of the options `url' or `inline=false'!
+ }%
+ }%
+ }{}%
%
- %label this annotation for later page number determination
- \@MXV@labeltoaux{@MXV@player\the\@MXV@includes.page}{%
- \noexpand\the\@MXV@page}%
+ %guess the mime type based on the filename extension
+ \filename@parse{#4}%
+ \ifthenelse{\equal{\@MXV@mime}{@MXV@auto}}{%
+ \@MXV@guessmime{#4}{\filename@ext}}{}%
+ \if\filename@ext\relax%
+ \xdef\@MXV@filename{\filename@base}%
+ \else%
+ \xdef\@MXV@filename{\filename@base.\filename@ext}%
+ \fi%
%
- %test for hyperref package
- \ifthenelse{\NOT\boolean{pdf}\AND\isundefined{\pdfmark}}{%
- \@MXV@missing{hyperref}%
+ %if 3D object is not embedded inline we must use some external player :(
+ \ifthenelse{%
+ \boolean{@MXV@iiid}
+ \AND\NOT\boolean{@MXV@inline}
+ }{%
+ \setboolean{@MXV@externalviewer}{true}%
}{}%
%
- %depending on options do content specific stuff
- \ifthenelse{\boolean{@MXV@iiid}}{%
- % #### 3D ####
- \ifthenelse{\boolean{@MXV@autoplay}\OR\boolean{@MXV@autoresume}}{%
- \def\@MXV@activation{/A/PV/AIS/L}% open 3D object, run animation
- }{%
- \if@MXV@runposter%
- \def\@MXV@activation{/A/PV/AIS/I}%open 3D obj but don't run animation
+ %some link attributes (if hyperref not loaded)
+ \ifthenelse{\isundefined{\@pdfborder}}{%
+ \def\@MXV@urlattr{}%
+ \def\@MXV@runattr{}%
+ }{%
+ \edef\@MXV@urlattr{%
+ \ifx\beamer@version\@undefined%
+ /Border [\@pdfborder]%
\else%
- \def\@MXV@activation{/A/XA}% explicit activation by user
+ /Border [1 1 1]%
\fi%
+ /C [\@urlbordercolor]%
+ /H \@pdfhighlight%
}%
- \if@MXV@autostop%
- \def\@MXV@deactivation{/D/PI/DIS/I}%
- \else%
- \if@MXV@autopause%
- \def\@MXV@deactivation{/D/PI/DIS/I}%
+ \edef\@MXV@runattr{%
+ \ifx\beamer@version\@undefined%
+ /Border [\@pdfborder]%
\else%
- \if@MXV@autoclose%
- \def\@MXV@deactivation{/D/PI/DIS/U}%
- \else%@MXV@continue
- \def\@MXV@deactivation{/D/PI/DIS/L}%
- \fi%
+ /Border [1 1 1]%
\fi%
- \fi%
- \if@MXV@externalviewer\else%
- %counter for 3D inclusion on current page
- \ifthenelse{%
- \equal{%
- \@MXV@getlabelvalue{@MXV@player\the\@MXV@includes.page}%
- }{\@MXV@oldpage}%
- }{%
- \global\advance\@MXV@iiidoncurpage by 1%
- }{%
- \global\@MXV@iiidoncurpage=1%
+ /C [\@runbordercolor]%
+ /H \@pdfhighlight%
+ }%
+ }%
+ %
+ \global\advance\@MXV@includes by 1%increment counter
+ %
+ %label this annotation for later page number determination
+ \@MXV@labeltoaux{@MXV@annot\the\@MXV@includes.page}{%
+ \noexpand\the\@MXV@page}%
+ %
+ %label this annotation for later annot id number determination &
+ %check for multiply-defined labels
+ % \@MXV@label --> automatic (presentation mode) or user defined label
+ % \@MXV@@label = \@MXV@label (non presentation doc classes)
+ % \@MXV@@label = \@MXV@label + physical page No. (presentation mode)
+ \ifx\@MXV@label\@empty%
+ %when used with presentation packages, annots must be labelled,
+ %use the media file name, if no label provided
+ \ifthenelse{\boolean{@MXV@presentation}}{%
+ \xdef\@MXV@label{#4}%
+ }{}%
+ \fi%
+ \ifx\@MXV@label\@empty\else%
+ \ifthenelse{\boolean{@MXV@presentation}}{%
+ %in presentation mode, the label must be extended by the physical page No.
+ \xdef\@MXV@@label{\@MXV@label.\@MXV@getlabelvalue{@MXV@annot\the\@MXV@includes.page}}%
+ }{%
+ \xdef\@MXV@@label{\@MXV@label}%
+ }%
+ \fi%
+ \ifx\@MXV@@label\@empty\else%
+ \ifthenelse{%
+ \NOT\equal{\@MXV@getlabelvalue{@MXV@\@MXV@@label.annotid}}{undefined}%
+ \AND%
+ \NOT\equal{\@MXV@getlabelvalue{@MXV@\@MXV@@label.annotid}}{%
+ \the\@MXV@includes}%
+ }{%
+ \PackageWarning{movie15}{%
+ Label `\@MXV@label' multiply defined%
}%
- \xdef\@MXV@oldpage{\@MXV@getlabelvalue{%
- @MXV@player\the\@MXV@includes.page}}%
- \fi%
+ \ifthenelse{\isundefined{\@MXV@multiwarning}}{%
+ \gdef\@MXV@multiwarning{}%
+ \AtEndDocument{%
+ \PackageWarningNoLine{movie15}{%
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\MessageBreak
+ @@ There were multiply-defined labels! @@\MessageBreak
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}%
+ }%
+ }{}%
+ }{}%
+ \@MXV@labeltoaux{@MXV@\@MXV@@label.annotid}{\the\@MXV@includes}%
+ \@MXV@newlabel{@MXV@\@MXV@@label.annotid}{\the\@MXV@includes}%
+ \fi%
+ %
+ \ifthenelse{\boolean{@MXV@externalviewer}}{%
\ifx\@MXV@label\@empty\else%
- \@MXV@labeltoaux{@MXV@\@MXV@label.3D}{true}%
- \@MXV@labeltoaux{@MXV@\@MXV@label.3Doncurpage}{\the\@MXV@iiidoncurpage}%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.externalviewer}{true}%
+ \@MXV@newlabel{@MXV@\@MXV@label.externalviewer}{true}%
\fi%
- }{%#### 2D ####
- \ifx\@MXV@startat\@empty% default start position
- \gdef\@MXV@startat{, startAt: 0}%
- \fi%
- %write player settings to aux file
+ }{%
+ %what is to be put into movie link annot depends on the following
\ifx\@MXV@label\@empty\else%
- \@MXV@labeltoaux{@MXV@\@MXV@label.mouse}{%
- \if@MXV@mouse true\else false\fi}%
- \@MXV@labeltoaux{@MXV@\@MXV@label.showUI}{\@MXV@ctrls}%
- \@MXV@labeltoaux{@MXV@\@MXV@label.palindrome}{\@MXV@palindrome}%
- \@MXV@labeltoaux{@MXV@\@MXV@label.repeat}{\@MXV@repeat}%
- \@MXV@labeltoaux{@MXV@\@MXV@label.rate}{\@MXV@rate}%
- \@MXV@labeltoaux{@MXV@\@MXV@label.startAt}{\@MXV@startat}%
- \@MXV@labeltoaux{@MXV@\@MXV@label.endAt}{\@MXV@endat}%
- \@MXV@labeltoaux{@MXV@\@MXV@label.volume}{\@MXV@volume}%
- \@MXV@labeltoaux{@MXV@\@MXV@label.autoplay}{%
- \if@MXV@autoplay true\else false\fi}%
- \@MXV@labeltoaux{@MXV@\@MXV@label.3D}{false}%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.externalviewer}{false}%
+ \@MXV@newlabel{@MXV@\@MXV@label.externalviewer}{false}%
\fi%
%
- \ifthenelse{\boolean{@MXV@autoplay}\OR\boolean{@MXV@runposter}}{%
- \xdef\@MXV@pageopenopentry{/OP 4}%
- }{%
- \if@MXV@autoresume%
- \xdef\@MXV@pageopenopentry{/OP 3}%
+ %test for hyperref package
+ \ifthenelse{\NOT\boolean{pdf}\AND\isundefined{\pdfmark}}{%
+ \@MXV@missing{hyperref}%
+ }{}%
+ %
+ %depending on options do content specific stuff
+ \ifthenelse{\boolean{@MXV@iiid}}{%
+ % #### 3D ####
+ \ifthenelse{\boolean{@MXV@autoplay}\OR\boolean{@MXV@autoresume}}{%
+ \def\@MXV@activation{/A/PV/AIS/L}% open 3D object, run animation
+ }{%
+ \if@MXV@runposter%
+ \def\@MXV@activation{/A/PV/AIS/I}%open 3D obj but don't run animation
+ \else%
+ \def\@MXV@activation{/A/XA}% explicit activation by user
+ \fi%
+ }%
+ \if@MXV@autostop%
+ \def\@MXV@deactivation{/D/PI/DIS/I}%
\else%
- \xdef\@MXV@pageopenopentry{/OP 2}%
+ \if@MXV@autopause%
+ \def\@MXV@deactivation{/D/PI/DIS/I}%
+ \else%
+ \if@MXV@autoclose%
+ \def\@MXV@deactivation{/D/PI/DIS/U}%
+ \else%@MXV@continue
+ \def\@MXV@deactivation{/D/PI/DIS/L}%
+ \fi%
+ \fi%
\fi%
- }%
- %
- \if@MXV@autostop%
- \xdef\@MXV@pagecloseopentry{/OP 1}%
- \else%
- \if@MXV@autopause%
- \xdef\@MXV@pagecloseopentry{/OP 2}%
+ \if@MXV@externalviewer\else%
+ %counter for 3D inclusion on current page
+ \ifthenelse{%
+ \equal{%
+ \@MXV@getlabelvalue{@MXV@annot\the\@MXV@includes.page}%
+ }{\@MXV@oldpage}%
+ }{%
+ \global\advance\@MXV@iiidoncurpage by 1%
+ }{%
+ \global\@MXV@iiidoncurpage=1%
+ }%
+ \xdef\@MXV@oldpage{\@MXV@getlabelvalue{%
+ @MXV@annot\the\@MXV@includes.page}}%
+ \fi%
+ \ifx\@MXV@label\@empty\else%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.3D}{true}%
+ \@MXV@newlabel{@MXV@\@MXV@label.3D}{true}%
+ \fi%
+ \ifx\@MXV@@label\@empty\else%
+ \@MXV@labeltoaux{@MXV@\@MXV@@label.3Doncurpage}{\the\@MXV@iiidoncurpage}%
+ \@MXV@newlabel{@MXV@\@MXV@@label.3Doncurpage}{\the\@MXV@iiidoncurpage}%
+ \fi%
+ }{%#### 2D ####
+ %get the player ID
+ \if@MXV@presentation%
+ \ifthenelse{%
+ \equal{\@MXV@getlabelvalue{@MXV@\@MXV@label.playerid}}{undefined}%
+ }{%
+ \global\advance\@MXV@players by 1%increment counter
+ }{%
+ \global\@MXV@players=\@MXV@getlabelvalue{@MXV@\@MXV@label.playerid}%
+ }%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.playerid}{\the\@MXV@players}%
+ \@MXV@newlabel{@MXV@\@MXV@label.playerid}{\the\@MXV@players}%
+ \edef\@MXV@currplayer{\the\@MXV@players}%
\else%
- \if@MXV@autoclose%
- \xdef\@MXV@pagecloseopentry{/OP 1}%
- \else% @MXV@continue
- \xdef\@MXV@pagecloseopentry{/OP 3}%
+ \ifx\@MXV@label\@empty\else%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.playerid}{\the\@MXV@includes}%
+ \@MXV@newlabel{@MXV@\@MXV@label.playerid}{\the\@MXV@includes}%
\fi%
+ \edef\@MXV@currplayer{\the\@MXV@includes}%
\fi%
- \fi%
- %
- %JavaScripts for playback control
- %script for page invisible event
- \if@MXV@autopause%
- \xdef\@MXV@pageclosejsentry{%
- /JS (
- try{%
- if(player\the\@MXV@includes.isPlaying){%
- player\the\@MXV@includes.pause();
- }
- focusonplayer=-1; %page change
- player\the\@MXV@includes.visible=false;
- }
- catch(e){}
- )%
+ %
+ \ifx\@MXV@startat\@empty% default start position
+ \gdef\@MXV@startat{, startAt: 0}%
+ \fi%
+ %write player settings to aux file
+ \ifx\@MXV@label\@empty\else%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.mouse}{%
+ \if@MXV@mouse true\else false\fi}%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.showUI}{\@MXV@ctrls}%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.palindrome}{\@MXV@palindrome}%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.repeat}{\@MXV@repeat}%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.rate}{\@MXV@rate}%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.startAt}{\@MXV@startat}%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.endAt}{\@MXV@endat}%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.volume}{\@MXV@volume}%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.autoplay}{%
+ \if@MXV@autoplay true\else false\fi}%
+ \@MXV@labeltoaux{@MXV@\@MXV@label.3D}{false}%
+ \@MXV@newlabel{@MXV@\@MXV@label.mouse}{%
+ \if@MXV@mouse true\else false\fi}%
+ \@MXV@newlabel{@MXV@\@MXV@label.showUI}{\@MXV@ctrls}%
+ \@MXV@newlabel{@MXV@\@MXV@label.palindrome}{\@MXV@palindrome}%
+ \@MXV@newlabel{@MXV@\@MXV@label.repeat}{\@MXV@repeat}%
+ \@MXV@newlabel{@MXV@\@MXV@label.rate}{\@MXV@rate}%
+ \@MXV@newlabel{@MXV@\@MXV@label.startAt}{\@MXV@startat}%
+ \@MXV@newlabel{@MXV@\@MXV@label.endAt}{\@MXV@endat}%
+ \@MXV@newlabel{@MXV@\@MXV@label.volume}{\@MXV@volume}%
+ \@MXV@newlabel{@MXV@\@MXV@label.autoplay}{%
+ \if@MXV@autoplay true\else false\fi}%
+ \@MXV@newlabel{@MXV@\@MXV@label.3D}{false}%
+ \fi%
+ %
+ \ifthenelse{\boolean{@MXV@autoplay}\OR\boolean{@MXV@runposter}}{%
+ \xdef\@MXV@pageopenopentry{/OP 4}%
+ }{%
+ \if@MXV@autoresume%
+ \xdef\@MXV@pageopenopentry{/OP 3}%
+ \else%
+ \xdef\@MXV@pageopenopentry{/OP 2}%
+ \fi%
}%
- \else%
+ %
\if@MXV@autostop%
+ \xdef\@MXV@pagecloseopentry{/OP 1}%
+ \else%
+ \if@MXV@autopause%
+ \xdef\@MXV@pagecloseopentry{/OP 2}%
+ \else%
+ \if@MXV@autoclose%
+ \xdef\@MXV@pagecloseopentry{/OP 1}%
+ \else% @MXV@continue
+ \xdef\@MXV@pagecloseopentry{/OP 3}%
+ \fi%
+ \fi%
+ \fi%
+ %
+ %JavaScripts for playback control
+ %script for page invisible event
+ \if@MXV@autopause%
\xdef\@MXV@pageclosejsentry{%
/JS (
try{%
- %players tend to be buggy, always stop from playing state
- if(!player\the\@MXV@includes.isPlaying){
- player\the\@MXV@includes.play();
+ if(player\@MXV@currplayer.isPlaying){%
+ player\@MXV@currplayer.pause();
+ player\@MXV@currplayer.settings.privateData.paused=true;
}
- player\the\@MXV@includes.stop();
- if(
- player\the\@MXV@includes.settings.startAt.time
- || player\the\@MXV@includes.settings.startAt.frame
- || player\the\@MXV@includes.settings.startAt.marker
- || player\the\@MXV@includes.id ==
- 'vnd.adobe.swname:AAPL_QuickTime'
- ){
- player\the\@MXV@includes.seek(%
- player\the\@MXV@includes.settings.startAt);
- }
- focusonplayer=-1;
- player\the\@MXV@includes.visible=false;
+ focusonplayer=-1; %page change
+ player\@MXV@currplayer.visible=false;
}
catch(e){}
)%
}%
\else%
- \if@MXV@autoclose%
+ \if@MXV@autostop%
\xdef\@MXV@pageclosejsentry{%
/JS (
try{%
- player\the\@MXV@includes.close(app.media.closeReason.general);
- focusonplayer=-1; %page change
- player\the\@MXV@includes.visible=false;
+ player\@MXV@currplayer.settings.privateData.paused=false;
+ %players tend to be bugged, always stop from playing state
+ if(!player\@MXV@currplayer.isPlaying){
+ player\@MXV@currplayer.play();
+ }
+ player\@MXV@currplayer.stop();
+ if(
+ player\@MXV@currplayer.settings.startAt.time
+ || player\@MXV@currplayer.settings.startAt.frame
+ || player\@MXV@currplayer.settings.startAt.marker
+ || player\@MXV@currplayer.id ==
+ 'vnd.adobe.swname:AAPL_QuickTime'
+ ){
+ player\@MXV@currplayer.seek(%
+ player\@MXV@currplayer.settings.startAt);
+ }
+ focusonplayer=-1;
+ player\@MXV@currplayer.visible=false;
}
catch(e){}
)%
}%
\else%
- \xdef\@MXV@pageclosejsentry{%@MXV@continue
- /JS (
- try{%
- focusonplayer=-1; %page change
- player\the\@MXV@includes.visible=false;
- }
- catch(e){}
- )%
- }%
+ \if@MXV@autoclose%
+ \xdef\@MXV@pageclosejsentry{%
+ /JS (
+ try{%
+ player\@MXV@currplayer.close(app.media.closeReason.general);
+ focusonplayer=-1; %page change
+ player\@MXV@currplayer.visible=false;
+ }
+ catch(e){}
+ )%
+ }%
+ \else%
+ \xdef\@MXV@pageclosejsentry{%@MXV@continue
+ /JS (
+ try{%
+ focusonplayer=-1; %page change
+ player\@MXV@currplayer.visible=false;
+ }
+ catch(e){}
+ )%
+ }%
+ \fi%
\fi%
\fi%
- \fi%
- %
- %script for activation/resume on page open event
- \xdef\@MXV@pageopenjsentry{%
- /JS (
- try{%
- if(player\the\@MXV@includes.isOpen){%
- player\the\@MXV@includes.visible=true;
- %
- %start or resume media which have autoplay option set;
- %also resume paused media which have autoresume option set
- \if@MXV@autoplay%
- player\the\@MXV@includes.play();
- if(!player\the\@MXV@includes.isPlaying){% still not playing?!
- if(
- player\the\@MXV@includes.settings.startAt.time
- || player\the\@MXV@includes.settings.startAt.frame
- || player\the\@MXV@includes.settings.startAt.marker
- || player\the\@MXV@includes.id ==
- 'vnd.adobe.swname:AAPL_QuickTime'
- ){
- player\the\@MXV@includes.seek(
- player\the\@MXV@includes.settings.startAt);
- }else{
- player\the\@MXV@includes.stop();
+ %
+ %script for activation/resume on page open event
+ \xdef\@MXV@pageopenjsentry{%
+ /JS (
+ try{%
+ if(player\@MXV@currplayer.isOpen){%
+ %drag the player on the current slide (presentation mode)
+ player\@MXV@currplayer.page=this.pageNum;
+ %... and make it visible
+ player\@MXV@currplayer.visible=true;
+ %
+ %start or resume media which have autoplay option set;
+ %also resume paused media which have autoresume option set
+ \if@MXV@autoplay%
+ player\@MXV@currplayer.settings.privateData.paused=false;
+ player\@MXV@currplayer.play();
+ if(!player\@MXV@currplayer.isPlaying){% still not playing?!
+ if(
+ player\@MXV@currplayer.settings.startAt.time
+ || player\@MXV@currplayer.settings.startAt.frame
+ || player\@MXV@currplayer.settings.startAt.marker
+ || player\@MXV@currplayer.id=='vnd.adobe.swname:AAPL_QuickTime'
+ ){
+ player\@MXV@currplayer.seek(
+ player\@MXV@currplayer.settings.startAt);
+ }else{
+ player\@MXV@currplayer.stop();
+ }
+ player\@MXV@currplayer.play();
}
- player\the\@MXV@includes.play();
- }
- \else%
- \if@MXV@autoresume%
- if(player\the\@MXV@includes.settings.privateData.paused){%
- player\the\@MXV@includes.play();
- if(!player\the\@MXV@includes.isPlaying){%
- if(
- player\the\@MXV@includes.settings.startAt.time
- || player\the\@MXV@includes.settings.startAt.frame
- || player\the\@MXV@includes.settings.startAt.marker
- || player\the\@MXV@includes.id ==
- 'vnd.adobe.swname:AAPL_QuickTime'
- ){
- player\the\@MXV@includes.seek(%
- player\the\@MXV@includes.settings.startAt);
- }else{
- player\the\@MXV@includes.stop();%
+ \else%
+ \if@MXV@autoresume%
+ if(player\@MXV@currplayer.settings.privateData.paused){%
+ player\@MXV@currplayer.settings.privateData.paused=false;
+ player\@MXV@currplayer.play();
+ if(!player\@MXV@currplayer.isPlaying){%
+ if(
+ player\@MXV@currplayer.settings.startAt.time
+ || player\@MXV@currplayer.settings.startAt.frame
+ || player\@MXV@currplayer.settings.startAt.marker
+ || player\@MXV@currplayer.id ==
+ 'vnd.adobe.swname:AAPL_QuickTime'
+ ){
+ player\@MXV@currplayer.seek(%
+ player\@MXV@currplayer.settings.startAt);
+ }else{
+ player\@MXV@currplayer.stop();%
+ }
+ player\@MXV@currplayer.play();
}
- player\the\@MXV@includes.play();
}
- }
+ \fi%
\fi%
- \fi%
+ }
+ else{%
+ throw "isClosed";
+ }
}
- else{%
- throw "isClosed";
+ catch(e){%
+ \@MXV@if{\if@MXV@autoplay true\else\if@MXV@runposter true\else %
+ false\fi\fi}%
+ if(focusonplayer==undefined){%
+ var focusonplayer=0; %shared by all annots
+ }
+ \@MXV@settings{\@MXV@ctrls}{\@MXV@palindrome}{\@MXV@repeat}%
+ {\@MXV@rate}{\@MXV@startat}{\@MXV@endat}{\@MXV@volume}%
+ \@MXV@events{\@MXV@currplayer}%
+ {\if@MXV@mouse true\else false\fi}%
+ {\if@MXV@autoplay true\else false\fi}%
+ var player\@MXV@currplayer=app.media.openPlayer({%
+ settings: settings,
+ events: events
+ });
+ \fi%
+ }%
+ )
+ }%
+ %
+ %script for normal activation by mouse click
+ \xdef\@MXV@activationjsentry{%
+ /JS (
+ if(focusonplayer==undefined){%
+ var focusonplayer=0; %shared by all annots
}
- }
- catch(e){%
- \@MXV@if{\if@MXV@autoplay true\else\if@MXV@runposter true\else %
- false\fi\fi}%
- if(focusonplayer==undefined){%
- var focusonplayer=0; %shared by all annots
- }
- \@MXV@settings{\@MXV@ctrls}{\@MXV@palindrome}{\@MXV@repeat}%
- {\@MXV@rate}{\@MXV@startat}{\@MXV@endat}{\@MXV@volume}%
- \@MXV@events{\the\@MXV@includes}%
- {\if@MXV@mouse true\else false\fi}%
- {\if@MXV@autoplay true\else false\fi}%
- var player\the\@MXV@includes=app.media.openPlayer({%
- settings: settings,
- events: events
- });
- \fi%
- }%
- )
- }%
- %
- %script for normal activation by mouse click
- \xdef\@MXV@activationjsentry{%
- /JS (
- if(focusonplayer==undefined){%
- var focusonplayer=0; %shared by all annots
- }
- \@MXV@settings{\@MXV@ctrls}{\@MXV@palindrome}{\@MXV@repeat}%
- {\@MXV@rate}{\@MXV@startat}{\@MXV@endat}{\@MXV@volume}%
- \@MXV@events{\the\@MXV@includes}{\if@MXV@mouse true\else false\fi}%
- {true}%
- var player\the\@MXV@includes=app.media.openPlayer({%
- settings: settings,
- events: events
- });
- )
- }%
- }%
- }%
- %
- %total height of text
- \@MXV@totalheight=\@MXV@height%
- \advance\@MXV@totalheight by \@MXV@depth%
- %traiselen=distance at which text is to be raised to centre it vertically
- %braiselen=vertical centre of media box (auxiliary measure)
- \@MXV@traiselen=0.5\@MXV@height%
- \advance\@MXV@traiselen by -0.5\@MXV@depth%
- %
- \ifthenelse{\equal{#3}{}}{% no height argument
- \@MXV@braiselen=0.5\@MXV@height%
- }{%override height of text, height argument given
- \@MXV@braiselen=#3%
- \@MXV@braiselen=0.5\@MXV@braiselen%
- \setlength{\@MXV@height}{#3}%
- }%
- %
- \ifthenelse{\equal{\@MXV@boxdepth}{}}{% no depth option given
- \ifthenelse{\lengthtest{\@MXV@totalheight>\@MXV@height}}{%
- %depth of text only taken into account, if the total height
- %is smaller than the height of the display box
- \advance\@MXV@braiselen by -0.5\@MXV@depth%
- }{%
- \@MXV@depth=0pt%
- }%
- }{%override depth of text, depth option given
- \setlength{\@MXV@@boxdepth}{\@MXV@boxdepth}%
- \advance\@MXV@braiselen by -0.5\@MXV@@boxdepth%
- \setlength{\@MXV@depth}{\@MXV@boxdepth}%
- }%
- %finally centre text vertically
- \ifthenelse{\NOT\equal{#3}{}\OR\NOT\equal{\@MXV@boxdepth}{}}{%
- \advance\@MXV@traiselen by -\@MXV@braiselen%
- \@MXV@traiselen=-\@MXV@traiselen%
- \savebox{\@MXV@textbox}{\raisebox{\@MXV@traiselen}[0pt][0pt]{%
- \usebox{\@MXV@textbox}}}%
- }{}%
- \ifthenelse{\equal{#2}{}}{}{%override horiz. dimension of text
- \setlength{\@MXV@width}{#2}%
- %centre text horizontally
- \savebox{\@MXV@textbox}{\makebox[\@MXV@width][c]{\usebox{\@MXV@textbox}}}%
- }%
- %
- %insert textbox, obscured by poster
- \if@MXV@boxopt%
- \if@MXV@textoverposter\else%
- \makebox[0pt][l]{\usebox{\@MXV@textbox}}%
- \fi%
- \fi%
- %
- \ifthenelse{\NOT\boolean{@MXV@url}\AND\NOT\boolean{@MXV@inline}}{%
- \IfFileExists{#4}{}{%
- \AtEndDocument{%
- \PackageWarning{movie15}{%
- File: `#4'\MessageBreak
- could not be found in the current directory.\MessageBreak
- Maybe it is a URL and you just forgot to set\MessageBreak
- option `url' ?
+ \@MXV@settings{\@MXV@ctrls}{\@MXV@palindrome}{\@MXV@repeat}%
+ {\@MXV@rate}{\@MXV@startat}{\@MXV@endat}{\@MXV@volume}%
+ \@MXV@events{\@MXV@currplayer}{\if@MXV@mouse true\else false\fi}%
+ {true}%
+ var player\@MXV@currplayer=app.media.openPlayer({%
+ settings: settings,
+ events: events
+ });
+ )
}%
}%
}%
- }{}%
- %
- %insert link target, if media has been labelled
- \ifx\@MXV@label\@empty\else%
- \raisebox{\@MXV@height}{%
- \ifpdf%
- \pdfdest name {@MXV@\@MXV@label} xyz %
- \else%
- \hypertarget{@MXV@\@MXV@label}{}%
- \fi%
+ %
+ %insert link target, if media has been labelled
+ \ifthenelse{\NOT\equal{\@MXV@@label}{}}{%
+ \raisebox{\@MXV@height}{%
+ \ifpdf%
+ \pdfdest name {@MXV@\@MXV@@label} xyz %
+ \else%
+ \hypertarget{@MXV@\@MXV@@label}{}%
+ \fi%
+ }%
+ }{}%
+ %
+ %insert textbox, obscured by poster
+ \ifthenelse{\boolean{@MXV@boxopt}\AND\NOT\boolean{@MXV@textoverposter}}{%
+ \makebox[0pt][l]{\usebox{\@MXV@textbox}}%
+ }{}%
+ %
+ %insert annotation
+ \ifthenelse{\boolean{@MXV@iiid}}{%
+ \@MXV@includeiiid{\@MXV@width}{\@MXV@height}{\@MXV@depth}{#4}%
+ }{%
+ \@MXV@includemovie{\@MXV@width}{\@MXV@height}{\@MXV@depth}{#4}%
}%
- \fi%
- %
- %insert annotation
- \ifthenelse{\boolean{@MXV@iiid}}{%
- \@MXV@includeiiid{\@MXV@width}{\@MXV@height}{\@MXV@depth}{#4}%
- }{%
- \@MXV@includemovie{\@MXV@width}{\@MXV@height}{\@MXV@depth}{#4}%
+ %
+ %insert textbox, overprinting the poster
+ \ifthenelse{\boolean{@MXV@boxopt}\AND\boolean{@MXV@textoverposter}}{%
+ \makebox[0pt][r]{\usebox{\@MXV@textbox}}%
+ }{}%
}%
- %
- %insert textbox, overprinting the poster
- \if@MXV@boxopt%
- \if@MXV@textoverposter%
- \makebox[0pt][r]{\usebox{\@MXV@textbox}}%
- \fi%
- \fi%
}
%for remote control of media
\newcommand\movieref[3][]{%
\leavevmode%
- \@MXV@reset%
- \ifpdf\else\global\advance\@MXV@links by 1\fi%increment link counter
- %
\savebox{\@MXV@textbox}{#3}% save text argument
%
- %check if label is defined at all
- \ifthenelse{\equal{\@MXV@getlabelvalue{@MXV@#2.playerid}}{undefined}}{%
- \usebox{\@MXV@textbox}% write out text box
- \PackageWarning{movie15}{%
- Reference `#2' on page \thepage \space undefined%
- }%
- \ifthenelse{\isundefined{\@MXV@undefwarning}}{%
- \gdef\@MXV@undefwarning{}%
- \AtEndDocument{%
- \PackageWarningNoLine{movie15}{%
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\MessageBreak%
- @@ There were undefined references! @@\MessageBreak%
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}%
+ %find out if some presentation making package is being used
+ %and whether the contents should be hidden or not on the current slide
+ \setboolean{@MXV@presentation}{false}%
+ \setboolean{@MXV@hide}{false}%
+ \ifx\ifpd@overlay\@undefined\relax%
+ \else% powerdot
+ \setboolean{@MXV@presentation}{true}%
+ \ifthenelse{\boolean{pd@overlay}}{}{%
+ \ifthenelse{\pd@method=2}{}{%
+ \setboolean{@MXV@hide}{true}%
}%
+ }%
+ \fi%
+ \ifx\ifbeamer@anotherslide\@undefined\relax\else%
+ \setboolean{@MXV@presentation}{true}%
+ \ifthenelse{\boolean{beamer@anotherslide}}{%
+ \setboolean{@MXV@hide}{true}%
}{}%
- }{%
+ \fi%
%
- \ifthenelse{\equal{\@MXV@getlabelvalue{@MXV@#2.externalviewer}}{true}}{%
- \setboolean{@MXV@externalviewer}{true}%
+ \ifthenelse{\boolean{@MXV@hide}}{%
+ %put whitespace instead of link annot
+ \phantom{\usebox{\@MXV@textbox}}%
}{%
- \setboolean{@MXV@externalviewer}{false}%
- }%
- \if@MXV@externalviewer\else%
- %movieref used in 3D context?
- \ifthenelse{\equal{\@MXV@getlabelvalue{@MXV@#2.3D}}{true}}{%
- \ifthenelse{\boolean{@MXV@iiiDfeat}}{%
- \setboolean{@MXV@iiid}{true}%
- }{%
- \@MXV@neediiiD%
- }%
- }{}%
+ \@MXV@reset%
%
- %actions completely different in 3D & 2D context
- \ifthenelse{\boolean{@MXV@iiid}}{% #### 3D ####
- \setkeys{movie15}{#1}%
- \if@MXV@defaultviewprovided% define a new view,
- %using any of the coo, c2c, roo, caa options
- \edef\@MXV@args{\@MXV@coo\space\@MXV@ctoc\space\@MXV@roo\space}%
- \expandafter\@MXV@ciiwmatrix\@MXV@args% build C2W matrix
- \@MXV@viewobj% create pdf object of 3D view
- \edef\@MXV@iiidview{\@MXV@@viewobj}%
- %else use the indexed view specified by option `3Dviewindex'
- \fi%
- %
- %java script action
- \ifthenelse{\NOT\equal{\@MXV@jscriptiiidfile}{}%
- \OR\NOT\equal{\@MXV@calc}{}%
+ \xdef\@MXV@label{#2}%
+ %
+ \global\advance\@MXV@links by 1%increment link counter
+ %
+ %label this link for later page number determination
+ \@MXV@labeltoaux{@MXV@link\the\@MXV@links.page}{%
+ \noexpand\the\@MXV@page}%
+ %
+ \ifthenelse{\boolean{@MXV@presentation}}{%
+ %in presentation mode the label must be extended by the physical page No.
+ \xdef\@MXV@@label{\@MXV@label.\@MXV@getlabelvalue{@MXV@link\the\@MXV@links.page}}%
+ }{%
+ \xdef\@MXV@@label{\@MXV@label}%
+ }%
+ %
+ %check if label is defined at all
+ \ifthenelse{\equal{\@MXV@getlabelvalue{@MXV@\@MXV@@label.annotid}}{undefined}}{%
+ \usebox{\@MXV@textbox}% write out text box
+ \PackageWarning{movie15}{%
+ Reference `\@MXV@label' on page \thepage \space undefined%
+ }%
+ \ifthenelse{\isundefined{\@MXV@undefwarning}}{%
+ \gdef\@MXV@undefwarning{}%
+ \AtEndDocument{%
+ \PackageWarningNoLine{movie15}{%
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\MessageBreak%
+ @@ There were undefined references! @@\MessageBreak%
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}%
+ }%
+ }{}%
+ }{%
+ \ifthenelse{\equal{\@MXV@getlabelvalue{@MXV@\@MXV@label.externalviewer}}{true}}{%
+ \setboolean{@MXV@externalviewer}{true}%
}{%
- \ifx\@MXV@jscriptiiidfile\@empty\else%
- \ifthenelse{%
- \equal{\@MXV@getlabelvalue{\@MXV@jscriptiiidfile}}{undefined}%
+ \setboolean{@MXV@externalviewer}{false}%
+ }%
+ \if@MXV@externalviewer\else%
+ %movieref used in 3D context?
+ \ifthenelse{\equal{\@MXV@getlabelvalue{@MXV@\@MXV@label.3D}}{true}}{%
+ \ifthenelse{\boolean{@MXV@iiiDfeat}}{%
+ \setboolean{@MXV@iiid}{true}%
}{%
- \ifpdf%
- \pdfobj stream file {\@MXV@jscriptiiidfile}%
- \pdfrefobj\pdflastobj%
- \edef\@MXV@jscriptiiid{/JS \the\pdflastobj\space 0 R}%
- \@MXV@newlabel{\@MXV@jscriptiiidfile}{\the\pdflastobj}%
- \else%
- \pdfmark{%
- pdfmark=/OBJ,%
- Raw={%
- /_objdef {linkjscriptiiid\the\@MXV@links}%
- /type/stream%
- }%
- }%
- \pdfmark{%
- pdfmark=/PUT,%
- Raw={%
- {linkjscriptiiid\the\@MXV@links}%
- (\@MXV@jscriptiiidfile) (r) file%
- }%
- }%
- \edef\@MXV@jscriptiiid{%
- /JS {linkjscriptiiid\the\@MXV@links}%
- }%
- \@MXV@newlabel{\@MXV@jscriptiiidfile}%
- {linkjscriptiiid\the\@MXV@links}%
- \fi%
+ \@MXV@neediiiD%
+ }%
+ }{}%
+ %
+ %actions completely different in 3D & 2D context
+ \ifthenelse{\boolean{@MXV@iiid}}{% #### 3D ####
+ \setkeys{movie15}{#1}%
+ \if@MXV@defaultviewprovided% define a new view,
+ %using any of the coo, c2c, roo, caa options
+ \edef\@MXV@args{\@MXV@coo\space\@MXV@ctoc\space\@MXV@roo\space}%
+ \expandafter\@MXV@ciiwmatrix\@MXV@args% build C2W matrix
+ \@MXV@viewobj% create pdf object of 3D view
+ \edef\@MXV@iiidview{\@MXV@@viewobj}%
+ %else use the indexed view specified by option `3Dviewindex'
+ \fi%
+ %
+ %java script action
+ \ifthenelse{\NOT\equal{\@MXV@jscriptiiidfile}{}%
+ \OR\NOT\equal{\@MXV@calc}{}%
}{%
- \ifpdf%
- \edef\@MXV@jscriptiiid{%
- /JS \@MXV@getlabelvalue{\@MXV@jscriptiiidfile}\space 0 R%
- }%
- \else%
- \edef\@MXV@jscriptiiid{%
- /JS {\@MXV@getlabelvalue{\@MXV@jscriptiiidfile}}%
+ \ifx\@MXV@jscriptiiidfile\@empty\else%
+ \ifthenelse{%
+ \equal{\@MXV@getlabelvalue{\@MXV@jscriptiiidfile}}{undefined}%
+ }{%
+ \ifpdf%
+ \pdfobj stream file {\@MXV@jscriptiiidfile}%
+ \pdfrefobj\pdflastobj%
+ \edef\@MXV@jscriptiiid{/JS \the\pdflastobj\space 0 R}%
+ \@MXV@newlabel{\@MXV@jscriptiiidfile}{\the\pdflastobj}%
+ \else%
+ \pdfmark{%
+ pdfmark=/OBJ,%
+ Raw={%
+ /_objdef {linkjscriptiiid\the\@MXV@links}%
+ /type/stream%
+ }%
+ }%
+ \pdfmark{%
+ pdfmark=/PUT,%
+ Raw={%
+ {linkjscriptiiid\the\@MXV@links}%
+ (\@MXV@jscriptiiidfile) (r) file%
+ }%
+ }%
+ \edef\@MXV@jscriptiiid{%
+ /JS {linkjscriptiiid\the\@MXV@links}%
+ }%
+ \@MXV@newlabel{\@MXV@jscriptiiidfile}%
+ {linkjscriptiiid\the\@MXV@links}%
+ \fi%
+ }{%
+ \ifpdf%
+ \edef\@MXV@jscriptiiid{%
+ /JS \@MXV@getlabelvalue{\@MXV@jscriptiiidfile}\space 0 R%
+ }%
+ \else%
+ \edef\@MXV@jscriptiiid{%
+ /JS {\@MXV@getlabelvalue{\@MXV@jscriptiiidfile}}%
+ }%
+ \fi%
}%
\fi%
- }%
- \fi%
- \edef\@MXV@jscriptiiidaction{%
- /Next <<%
- /S/JavaScript% fill hash (annot3D) with refs to Annot3D objects
- /JS (% for use within the user provided script
- try{%
- annot3D["#2"]=getAnnots3D(%
- \@MXV@getlabelvalue{%
- @MXV@player\@MXV@getlabelvalue{@MXV@#2.playerid}.page%
- }-1%
- )[\@MXV@getlabelvalue{@MXV@#2.3Doncurpage}-1];
- annot3D["#2"].activated=true;
- }catch(e){%
- try{%
- annot3D=new Array;
- annot3D["#2"]=getAnnots3D(%
- \@MXV@getlabelvalue{%
- @MXV@player\@MXV@getlabelvalue{@MXV@#2.playerid}.page%
- }-1%
- )[\@MXV@getlabelvalue{@MXV@#2.3Doncurpage}-1];
- annot3D["#2"].activated=true;
- }catch(e){%
- spc=String.fromCharCode(32);
- app.alert("3D" + spc + "annotation" + spc + "could" + spc +
- "not" + spc + "be" + spc + "activated!");
- }%
- }%
- )%
- %JavaScript for calculating 3Droo and 3Dcoo settings for a given
- %aperture angle
- \ifx\@MXV@calc\@empty\else%
+ \edef\@MXV@jscriptiiidaction{%
/Next <<%
- /S/JavaScript%
- /JS (try{%
- %aperture angle of the virtual camera
- var aac = \@MXV@calc;
- %
- %list of nodes
- var nodes = annot3D["#2"].context3D.scene.nodes;
- var cnt = nodes.count;
- %
- %auxiliary vectors
- var dir = new annot3D["#2"].context3D.Vector3();
- var up = new annot3D["#2"].context3D.Vector3();
- var corner = new annot3D["#2"].context3D.Vector3();
- %
- %auxiliary 4x4 matrix
- var bbox4x4 = new annot3D["#2"].context3D.Matrix4x4();
- %
- %centre of global bounding box --> centre of orbit
- var coo = %
- annot3D["#2"].context3D.scene.computeBoundingBox().center;
- %
- %radius of bounding sphere
- var rBSphere = 0;
- %
- %iterate over all nodes in the scene
- for(i=0; i<cnt; i++){%
- var node = nodes.getByIndex(i);
- %
- %but inspect mesh nodes only
- if(node.constructor.name == 'Mesh'){%
- %get the bbox of the node (local coordinates)
- var bbox = node.computeBoundingBox();
- %
- %local to parent transformation matrix
- var trans = node.transform.transpose;
- %
- %build local to world transformation matrix by recursively
- %multiplying the parent's transf. matrix on the left
- var parent = node.parent;
- while(parent.constructor.name != 'Scene'){%
- trans = parent.transform.transpose.multiply(trans);
- parent = parent.parent;
- }%
- %
- %transform the local bounding box corner coordinates to
- %world coordinates for bounding sphere radius
- %determination;
- %Matrix4x4 method transformDirection(<Vector3>) seems
- %to be bugged, therefore we must resort to the
- %multiply(<Matrix4x4>) method using an auxiliary matrix
- %which contains the local bounding box corner coordinates
- %
- %auxiliary matrix from bbox.min coordinates
- bbox4x4.setView(bbox.min, dir, up);
- %
- %transform to world coordinates
- bbox4x4 = trans.multiply(bbox4x4.transpose);
- %
- %extract the transformed coordinates
- corner.set(bbox4x4.transpose.translation);
+ /S/JavaScript% fill hash (annot3D) with refs to Annot3D objects
+ /JS (% for use within the user provided script
+ try{%
+ annot3D["\@MXV@label"]=getAnnots3D(%
+ \@MXV@getlabelvalue{%
+ @MXV@annot\@MXV@getlabelvalue{@MXV@\@MXV@@label.annotid}.page%
+ }-1%
+ )[\@MXV@getlabelvalue{@MXV@\@MXV@@label.3Doncurpage}-1];
+ annot3D["\@MXV@label"].activated=true;
+ }catch(e){%
+ try{%
+ annot3D=new Array;
+ annot3D["\@MXV@label"]=getAnnots3D(%
+ \@MXV@getlabelvalue{%
+ @MXV@annot\@MXV@getlabelvalue{@MXV@\@MXV@@label.annotid}.page%
+ }-1%
+ )[\@MXV@getlabelvalue{@MXV@\@MXV@@label.3Doncurpage}-1];
+ annot3D["\@MXV@label"].activated=true;
+ }catch(e){%
+ spc=String.fromCharCode(32);
+ app.alert("3D" + spc + "annotation" + spc + "could" + spc +
+ "not" + spc + "be" + spc + "activated!");
+ }%
+ }%
+ )%
+ %JavaScript for calculating 3Droo and 3Dcoo settings for a given
+ %aperture angle
+ \ifx\@MXV@calc\@empty\else%
+ /Next <<%
+ /S/JavaScript%
+ /JS (try{%
+ %aperture angle of the virtual camera
+ var aac = \@MXV@calc;
%
- %vector from centre of orbit to bbox corner position
- corner.subtractInPlace(coo);
+ %list of nodes
+ var nodes = annot3D["\@MXV@label"].context3D.scene.nodes;
+ var cnt = nodes.count;
%
- %update bounding sphere radius
- rBSphere = Math.max(rBSphere, corner.length);
+ %auxiliary vectors
+ var dir = new annot3D["\@MXV@label"].context3D.Vector3();
+ var up = new annot3D["\@MXV@label"].context3D.Vector3();
+ var corner = new annot3D["\@MXV@label"].context3D.Vector3();
%
- %the same procedure with bbox.max
- bbox4x4.setView(bbox.max, dir, up);
- bbox4x4 = trans.multiply(bbox4x4.transpose);
- corner.set(bbox4x4.transpose.translation);
- corner.subtractInPlace(coo);
- rBSphere = Math.max(rBSphere, corner.length);
+ %auxiliary 4x4 matrix
+ var bbox4x4 = new annot3D["\@MXV@label"].context3D.Matrix4x4();
%
- %and with all remaining 6 bbox corners
- corner.set(bbox.min.x, bbox.max.y, bbox.max.z);
- bbox4x4.setView(corner, dir, up);
- bbox4x4 = trans.multiply(bbox4x4.transpose);
- corner.set(bbox4x4.transpose.translation);
- corner.subtractInPlace(coo);
- rBSphere = Math.max(rBSphere, corner.length);
+ %centre of global bounding box --> centre of orbit
+ var coo = %
+ annot3D["\@MXV@label"].context3D.scene.computeBoundingBox().center;
%
- corner.set(bbox.min.x, bbox.min.y, bbox.max.z);
- bbox4x4.setView(corner, dir, up);
- bbox4x4 = trans.multiply(bbox4x4.transpose);
- corner.set(bbox4x4.transpose.translation);
- corner.subtractInPlace(coo);
- rBSphere = Math.max(rBSphere, corner.length);
+ %radius of bounding sphere
+ var rBSphere = 0;
%
- corner.set(bbox.min.x, bbox.max.y, bbox.min.z);
- bbox4x4.setView(corner, dir, up);
- bbox4x4 = trans.multiply(bbox4x4.transpose);
- corner.set(bbox4x4.transpose.translation);
- corner.subtractInPlace(coo);
- rBSphere = Math.max(rBSphere, corner.length);
+ %iterate over all nodes in the scene
+ for(i=0; i<cnt; i++){%
+ var node = nodes.getByIndex(i);
+ %
+ %but inspect mesh nodes only
+ if(node.constructor.name == 'Mesh'){%
+ %get the bbox of the node (local coordinates)
+ var bbox = node.computeBoundingBox();
+ %
+ %local to parent transformation matrix
+ var trans = node.transform.transpose;
+ %
+ %build local to world transformation matrix by recursively
+ %multiplying the parent's transf. matrix on the left
+ var parent = node.parent;
+ while(parent.constructor.name != 'Scene'){%
+ trans = parent.transform.transpose.multiply(trans);
+ parent = parent.parent;
+ }%
+ %
+ %transform the local bounding box corner coordinates to
+ %world coordinates for bounding sphere radius
+ %determination;
+ %Matrix4x4 method transformDirection(<Vector3>) seems
+ %to be bugged, therefore we must resort to the
+ %multiply(<Matrix4x4>) method using an auxiliary matrix
+ %which contains the local bounding box corner coordinates
+ %
+ %auxiliary matrix from bbox.min coordinates
+ bbox4x4.setView(bbox.min, dir, up);
+ %
+ %transform to world coordinates
+ bbox4x4 = trans.multiply(bbox4x4.transpose);
+ %
+ %extract the transformed coordinates
+ corner.set(bbox4x4.transpose.translation);
+ %
+ %vector from centre of orbit to bbox corner position
+ corner.subtractInPlace(coo);
+ %
+ %update bounding sphere radius
+ rBSphere = Math.max(rBSphere, corner.length);
+ %
+ %the same procedure with bbox.max
+ bbox4x4.setView(bbox.max, dir, up);
+ bbox4x4 = trans.multiply(bbox4x4.transpose);
+ corner.set(bbox4x4.transpose.translation);
+ corner.subtractInPlace(coo);
+ rBSphere = Math.max(rBSphere, corner.length);
+ %
+ %and with all remaining 6 bbox corners
+ corner.set(bbox.min.x, bbox.max.y, bbox.max.z);
+ bbox4x4.setView(corner, dir, up);
+ bbox4x4 = trans.multiply(bbox4x4.transpose);
+ corner.set(bbox4x4.transpose.translation);
+ corner.subtractInPlace(coo);
+ rBSphere = Math.max(rBSphere, corner.length);
+ %
+ corner.set(bbox.min.x, bbox.min.y, bbox.max.z);
+ bbox4x4.setView(corner, dir, up);
+ bbox4x4 = trans.multiply(bbox4x4.transpose);
+ corner.set(bbox4x4.transpose.translation);
+ corner.subtractInPlace(coo);
+ rBSphere = Math.max(rBSphere, corner.length);
+ %
+ corner.set(bbox.min.x, bbox.max.y, bbox.min.z);
+ bbox4x4.setView(corner, dir, up);
+ bbox4x4 = trans.multiply(bbox4x4.transpose);
+ corner.set(bbox4x4.transpose.translation);
+ corner.subtractInPlace(coo);
+ rBSphere = Math.max(rBSphere, corner.length);
+ %
+ corner.set(bbox.max.x, bbox.min.y, bbox.min.z);
+ bbox4x4.setView(corner, dir, up);
+ bbox4x4 = trans.multiply(bbox4x4.transpose);
+ corner.set(bbox4x4.transpose.translation);
+ corner.subtractInPlace(coo);
+ rBSphere = Math.max(rBSphere, corner.length);
+ %
+ corner.set(bbox.max.x, bbox.min.y, bbox.max.z);
+ bbox4x4.setView(corner, dir, up);
+ bbox4x4 = trans.multiply(bbox4x4.transpose);
+ corner.set(bbox4x4.transpose.translation);
+ corner.subtractInPlace(coo);
+ rBSphere = Math.max(rBSphere, corner.length);
+ %
+ corner.set(bbox.max.x, bbox.max.y, bbox.min.z);
+ bbox4x4.setView(corner, dir, up);
+ bbox4x4 = trans.multiply(bbox4x4.transpose);
+ corner.set(bbox4x4.transpose.translation);
+ corner.subtractInPlace(coo);
+ rBSphere = Math.max(rBSphere, corner.length);
+ }%
+ }%
%
- corner.set(bbox.max.x, bbox.min.y, bbox.min.z);
- bbox4x4.setView(corner, dir, up);
- bbox4x4 = trans.multiply(bbox4x4.transpose);
- corner.set(bbox4x4.transpose.translation);
- corner.subtractInPlace(coo);
- rBSphere = Math.max(rBSphere, corner.length);
+ %radius of orbit
+ var roo = rBSphere / Math.sin(aac * Math.PI / 360.);
%
- corner.set(bbox.max.x, bbox.min.y, bbox.max.z);
- bbox4x4.setView(corner, dir, up);
- bbox4x4 = trans.multiply(bbox4x4.transpose);
- corner.set(bbox4x4.transpose.translation);
- corner.subtractInPlace(coo);
- rBSphere = Math.max(rBSphere, corner.length);
+ %assemble result string
+ var res = '';
+ spc=String.fromCharCode(32);
+ if(aac != 30){%
+ res += util.printf('3Daac=\%s,' + spc, %
+ (Math.abs(aac) < 1.001e-6 && Math.abs(aac) > 0 ? %
+ util.printf('\%.18f', aac): aac), 32%
+ );
+ }%
+ if(coo.length){%
+ res += util.printf( '3Dcoo=\%s' + spc + '\%s' + spc + '\%s,'
+ + spc, %
+ (Math.abs(coo.x) < 1.001e-6 && Math.abs(coo.x) > 0 ? %
+ util.printf('\%.18f', coo.x): coo.x), %
+ (Math.abs(coo.y) < 1.001e-6 && Math.abs(coo.y) > 0 ? %
+ util.printf('\%.18f', coo.y): coo.y), %
+ (Math.abs(coo.z) < 1.001e-6 && Math.abs(coo.z) > 0 ? %
+ util.printf('\%.18f', coo.z): coo.z)%
+ );
+ }%
+ res += '3Droo=' + roo + ',';
%
- corner.set(bbox.max.x, bbox.max.y, bbox.min.z);
- bbox4x4.setView(corner, dir, up);
- bbox4x4 = trans.multiply(bbox4x4.transpose);
- corner.set(bbox4x4.transpose.translation);
- corner.subtractInPlace(coo);
- rBSphere = Math.max(rBSphere, corner.length);
- }%
- }%
- %
- %radius of orbit
- var roo = rBSphere / Math.sin(aac * Math.PI / 360.);
- %
- %assemble result string
- var res = '';
- spc=String.fromCharCode(32);
- if(aac != 30){%
- res += util.printf('3Daac=\%s,' + spc, %
- (Math.abs(aac) < 1.001e-6 && Math.abs(aac) > 0 ? %
- util.printf('\%.18f', aac): aac), 32%
- );
- }%
- if(coo.length){%
- res += util.printf( '3Dcoo=\%s' + spc + '\%s' + spc + '\%s,'
- + spc, %
- (Math.abs(coo.x) < 1.001e-6 && Math.abs(coo.x) > 0 ? %
- util.printf('\%.18f', coo.x): coo.x), %
- (Math.abs(coo.y) < 1.001e-6 && Math.abs(coo.y) > 0 ? %
- util.printf('\%.18f', coo.y): coo.y), %
- (Math.abs(coo.z) < 1.001e-6 && Math.abs(coo.z) > 0 ? %
- util.printf('\%.18f', coo.z): coo.z)%
- );
- }%
- res += '3Droo=' + roo + ',';
- %
- %open pop-up displaying the result string
- var settings = {%
- initialize: function(dialog) {%
- dialog.load({%
- "text": res%
- });
- }, %
- description: {%
- name: '3D' + spc + 'Camera' + spc + 'Settings', %
- elements: [%
- {%
- type: "static_text", %
- name: 'Copy' + spc + 'and' + spc + 'paste' + spc +
- 'the' + spc + 'following' + spc + 'to' + spc +
- 'the' + spc + 'option' + spc + 'list' + spc +
- 'of' + spc + '\string\\\string\\includemovie!'%
- },
- {%
- type: "edit_text", %
- item_id: "text", %
- alignment: "align_fill", %
- readonly: true%
+ %open pop-up displaying the result string
+ var settings = {%
+ initialize: function(dialog) {%
+ dialog.load({%
+ "text": res%
+ });
}, %
- {%
- type: "ok", %
- ok_name: "Close"%
+ description: {%
+ name: '3D' + spc + 'Camera' + spc + 'Settings', %
+ elements: [%
+ {%
+ type: "static_text", %
+ name: 'Copy' + spc + 'and' + spc + 'paste' + spc +
+ 'the' + spc + 'following' + spc + 'to' + spc +
+ 'the' + spc + 'option' + spc + 'list' + spc +
+ 'of' + spc + '\string\\\string\\includemovie!'%
+ },
+ {%
+ type: "edit_text", %
+ item_id: "text", %
+ alignment: "align_fill", %
+ readonly: false%
+ }, %
+ {%
+ type: "ok", %
+ ok_name: "Close"%
+ }%
+ ]%
}%
- ]%
- }%
- };
- app.execDialog(settings);
- }catch(e){})%
- \fi%
- \ifx\@MXV@jscriptiiidfile\@empty\else%
- /Next <<%
- /S/JavaScript%
- \@MXV@jscriptiiid% user provided script
- >>%
- \fi%
- \ifx\@MXV@calc\@empty\else%
+ };
+ app.execDialog(settings);
+ }catch(e){})%
+ \fi%
+ \ifx\@MXV@jscriptiiidfile\@empty\else%
+ /Next <<%
+ /S/JavaScript%
+ \@MXV@jscriptiiid% user provided script
+ >>%
+ \fi%
+ \ifx\@MXV@calc\@empty\else%
+ >>%
+ \fi%
>>%
- \fi%
- >>%
- }%
- }{\edef\@MXV@jscriptiiidaction{}}%
- }{% #### 2D ####
- %retrieve original settings
- \ifthenelse{\equal{\@MXV@getlabelvalue{@MXV@#2.mouse}}{true}}{%
- \setboolean{@MXV@mouse}{true}%
- }{%
- \setboolean{@MXV@mouse}{false}%
- }%
- \edef\@MXV@ctrls{\@MXV@getlabelvalue{@MXV@#2.showUI}}%
- \edef\@MXV@palindrome{\@MXV@getlabelvalue{@MXV@#2.palindrome}}%
- \edef\@MXV@repeat{\@MXV@getlabelvalue{@MXV@#2.repeat}}%
- \edef\@MXV@rate{\@MXV@getlabelvalue{@MXV@#2.rate}}%
- \edef\@MXV@startat{\@MXV@getlabelvalue{@MXV@#2.startAt}}%
- \edef\@MXV@endat{\@MXV@getlabelvalue{@MXV@#2.endAt}}%
- \edef\@MXV@volume{\@MXV@getlabelvalue{@MXV@#2.volume}}%
- \setkeys{movie15}{#1}%override with new settings
- %
- \edef\@MXV@operation{}%
- %create /OP and /JS entries
- \if@MXV@linkplay%
- \edef\@MXV@operation{%
- /OP 0%
- /JS (%
- if(focusonplayer==undefined){%
- var focusonplayer=0; %shared by all annots
}%
- \@MXV@settings{\@MXV@ctrls}{\@MXV@palindrome}{\@MXV@repeat}%
- {\@MXV@rate}{\@MXV@startat}{\@MXV@endat}{\@MXV@volume}%
- \@MXV@events{\@MXV@getlabelvalue{@MXV@#2.playerid}}%
- {\if@MXV@mouse true\else false\fi}{true}%
- try{%
- if(player\@MXV@getlabelvalue{@MXV@#2.playerid}.isOpen){%
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.close(%
- app.media.closeReason.general);
- player\@MXV@getlabelvalue{@MXV@#2.playerid}=null;
- }%
+ }{\edef\@MXV@jscriptiiidaction{}}%
+ }{% #### 2D ####
+ %retrieve original settings
+ \ifthenelse{\equal{\@MXV@getlabelvalue{@MXV@\@MXV@label.mouse}}{true}}{%
+ \setboolean{@MXV@mouse}{true}%
+ }{%
+ \setboolean{@MXV@mouse}{false}%
+ }%
+ \edef\@MXV@ctrls{\@MXV@getlabelvalue{@MXV@\@MXV@label.showUI}}%
+ \edef\@MXV@palindrome{\@MXV@getlabelvalue{@MXV@\@MXV@label.palindrome}}%
+ \edef\@MXV@repeat{\@MXV@getlabelvalue{@MXV@\@MXV@label.repeat}}%
+ \edef\@MXV@rate{\@MXV@getlabelvalue{@MXV@\@MXV@label.rate}}%
+ \edef\@MXV@startat{\@MXV@getlabelvalue{@MXV@\@MXV@label.startAt}}%
+ \edef\@MXV@endat{\@MXV@getlabelvalue{@MXV@\@MXV@label.endAt}}%
+ \edef\@MXV@volume{\@MXV@getlabelvalue{@MXV@\@MXV@label.volume}}%
+ \setkeys{movie15}{#1}%override with new settings
+ %
+ \edef\@MXV@operation{}%
+ %
+ %get the player ID
+ \edef\@MXV@currplayer{\@MXV@getlabelvalue{@MXV@\@MXV@label.playerid}}%
+ %
+ %create /OP and /JS entries
+ \if@MXV@linkplay%
+ \edef\@MXV@operation{%
+ /OP 0%
+ /JS (%
+ if(focusonplayer==undefined){%
+ var focusonplayer=0; %shared by all annots
+ }%
+ \@MXV@settings{\@MXV@ctrls}{\@MXV@palindrome}{\@MXV@repeat}%
+ {\@MXV@rate}{\@MXV@startat}{\@MXV@endat}{\@MXV@volume}%
+ \@MXV@events{\@MXV@currplayer}%
+ {\if@MXV@mouse true\else false\fi}{true}%
+ try{%
+ if(player\@MXV@currplayer.isOpen){%
+ player\@MXV@currplayer.close(%
+ app.media.closeReason.general);
+ player\@MXV@currplayer=null;
+ }%
+ }%
+ catch(e){}%
+ %
+ try{%
+ var player\@MXV@currplayer=app.media.openPlayer({%
+ settings: settings,%
+ events: events%
+ });
+ }%
+ catch (e){}%
+ )%
}%
- catch(e){}%
- %
- %
- try{%
- var player\@MXV@getlabelvalue{@MXV@#2.playerid}=%
- app.media.openPlayer({%
- settings: settings,%
- events: events%
- });
+ \fi%
+ \if@MXV@linkresume% resume/pause
+ \edef\@MXV@operation{%
+ /OP 3%
+ /JS (%
+ try{%
+ player\@MXV@currplayer.visible=true;
+ if(!player\@MXV@currplayer.isPlaying){%
+ player\@MXV@currplayer.settings.privateData.paused=false;
+ player\@MXV@currplayer.play();
+ if(!player\@MXV@currplayer.isPlaying){%
+ %media at end will restart from beginning
+ if(
+ player\@MXV@currplayer.settings.startAt.time
+ || player\@MXV@currplayer.settings.startAt.frame
+ || player\@MXV@currplayer.settings.startAt.marker
+ || player\@MXV@currplayer.id ==
+ 'vnd.adobe.swname:AAPL_QuickTime'
+ ){
+ player\@MXV@currplayer.seek(
+ player\@MXV@currplayer.settings.startAt);
+ }else{
+ player\@MXV@currplayer.stop();
+ }
+ player\@MXV@currplayer.play();
+ }%
+ }%
+ else{%
+ player\@MXV@currplayer.pause();
+ player\@MXV@currplayer.settings.privateData.paused=true;
+ }%
+ }%
+ catch(e){}%
+ )%
}%
- catch (e){}%
- )%
- }%
- \fi%
- \if@MXV@linkresume% resume/pause
- \edef\@MXV@operation{%
- /OP 3%
- /JS (%
- try{%
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.visible=true;
- if(!player\@MXV@getlabelvalue{@MXV@#2.playerid}.isPlaying){%
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.play();
- if(!player\@MXV@getlabelvalue{@MXV@#2.playerid}.isPlaying){%
- %media at end will restart from beginning
+ \fi%
+ \if@MXV@linkstop%
+ \edef\@MXV@operation{%
+ /OP 1%
+ /JS (%
+ try{%
+ if(!player\@MXV@currplayer.isPlaying){%
+ player\@MXV@currplayer.settings.privateData.paused=false;
+ player\@MXV@currplayer.play();
+ }%
+ player\@MXV@currplayer.stop();
if(
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.settings.startAt.time
- || player\@MXV@getlabelvalue{@MXV@#2.playerid}.settings.startAt.frame
- || player\@MXV@getlabelvalue{@MXV@#2.playerid}.settings.startAt.marker
- || player\@MXV@getlabelvalue{@MXV@#2.playerid}.id ==
+ player\@MXV@currplayer.settings.startAt.time
+ || player\@MXV@currplayer.settings.startAt.frame
+ || player\@MXV@currplayer.settings.startAt.marker
+ || player\@MXV@currplayer.id ==
'vnd.adobe.swname:AAPL_QuickTime'
){
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.seek(
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.settings.startAt);
- }else{
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.stop();
+ player\@MXV@currplayer.seek(%
+ player\@MXV@currplayer.settings.startAt);
}
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.play();
}%
- }%
- else{%
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.pause();
- }%
- }%
- catch(e){}%
- )%
- }%
- \fi%
- \if@MXV@linkstop%
- \edef\@MXV@operation{%
- /OP 1%
- /JS (%
- try{%
- if(!player\@MXV@getlabelvalue{@MXV@#2.playerid}.isPlaying){%
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.play();
- }%
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.stop();
- if(
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.settings.startAt.time
- || player\@MXV@getlabelvalue{@MXV@#2.playerid}.settings.startAt.frame
- || player\@MXV@getlabelvalue{@MXV@#2.playerid}.settings.startAt.marker
- || player\@MXV@getlabelvalue{@MXV@#2.playerid}.id ==
- 'vnd.adobe.swname:AAPL_QuickTime'
- ){
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.seek(%
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.settings.startAt);
- }
+ catch(e){}%
+ )%
}%
- catch(e){}%
- )%
- }%
- \fi%
- \if@MXV@linkpause% pause/resume
- \edef\@MXV@operation{%
- /OP 2%
- /JS (%
- try{%
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.visible=true;
- if(!player\@MXV@getlabelvalue{@MXV@#2.playerid}.isPlaying){%
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.play();
- if(!player\@MXV@getlabelvalue{@MXV@#2.playerid}.isPlaying){%
- %media at end will restart from beginning
- if(
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.settings.startAt.time
- || player\@MXV@getlabelvalue{@MXV@#2.playerid}.settings.startAt.frame
- || player\@MXV@getlabelvalue{@MXV@#2.playerid}.settings.startAt.marker
- || player\@MXV@getlabelvalue{@MXV@#2.playerid}.id ==
- 'vnd.adobe.swname:AAPL_QuickTime'
- ){
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.seek(
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.settings.startAt);
- }else{
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.stop();
- }
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.play();
+ \fi%
+ \if@MXV@linkpause% pause/resume
+ \edef\@MXV@operation{%
+ /OP 2%
+ /JS (%
+ try{%
+ player\@MXV@currplayer.visible=true;
+ if(!player\@MXV@currplayer.isPlaying){%
+ player\@MXV@currplayer.settings.privateData.paused=false;
+ player\@MXV@currplayer.play();
+ if(!player\@MXV@currplayer.isPlaying){%
+ %media at end will restart from beginning
+ if(
+ player\@MXV@currplayer.settings.startAt.time
+ || player\@MXV@currplayer.settings.startAt.frame
+ || player\@MXV@currplayer.settings.startAt.marker
+ || player\@MXV@currplayer.id ==
+ 'vnd.adobe.swname:AAPL_QuickTime'
+ ){
+ player\@MXV@currplayer.seek(
+ player\@MXV@currplayer.settings.startAt);
+ }else{
+ player\@MXV@currplayer.stop();
+ }
+ player\@MXV@currplayer.play();
+ }%
+ }%
+ else{%
+ player\@MXV@currplayer.pause();
+ player\@MXV@currplayer.settings.privateData.paused=true;
+ }%
}%
- }%
- else{%
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.pause();
- }%
+ catch(e){}%
+ )%
}%
- catch(e){}%
- )%
- }%
- \fi%
- \if@MXV@linkclose%
- \edef\@MXV@operation{%
- /OP 1%
- /JS (%
- try{%
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.close(%
- app.media.closeReason.general);
- player\@MXV@getlabelvalue{@MXV@#2.playerid}=null;
+ \fi%
+ \if@MXV@linkclose%
+ \edef\@MXV@operation{%
+ /OP 1%
+ /JS (%
+ try{%
+ player\@MXV@currplayer.close(%
+ app.media.closeReason.general);
+ player\@MXV@currplayer=null;
+ }%
+ catch(e){}%
+ )%
}%
- catch(e){}%
- )%
- }%
- \fi%
- \if@MXV@linkreset% reset to orig. settings
- %retrieve original settings
- \ifthenelse{\equal{\@MXV@getlabelvalue{@MXV@#2.mouse}}{true}}{%
- \setboolean{@MXV@mouse}{true}%
- }{%
- \setboolean{@MXV@mouse}{false}%
- }%
- \ifthenelse{\equal{\@MXV@getlabelvalue{@MXV@#2.autoplay}}{true}}{%
- \setboolean{@MXV@autoplay}{true}%
- }{%
- \setboolean{@MXV@autoplay}{false}%
- }%
- %
- \edef\@MXV@operation{%
- /OP 0%
- /JS (%
- if(focusonplayer==undefined){%
- var focusonplayer=0; %shared by all annots
+ \fi%
+ \if@MXV@linkreset% reset to orig. settings
+ %retrieve original settings
+ \ifthenelse{\equal{\@MXV@getlabelvalue{@MXV@\@MXV@label.mouse}}{true}}{%
+ \setboolean{@MXV@mouse}{true}%
+ }{%
+ \setboolean{@MXV@mouse}{false}%
}%
- \@MXV@settings{\@MXV@getlabelvalue{@MXV@#2.showUI}}%
- {\@MXV@getlabelvalue{@MXV@#2.palindrome}}%
- {\@MXV@getlabelvalue{@MXV@#2.repeat}}%
- {\@MXV@getlabelvalue{@MXV@#2.rate}}%
- {\@MXV@getlabelvalue{@MXV@#2.startAt}}%
- {\@MXV@getlabelvalue{@MXV@#2.endAt}}%
- {\@MXV@getlabelvalue{@MXV@#2.volume}}%
- \@MXV@events{\@MXV@getlabelvalue{@MXV@#2.playerid}}%
- {\if@MXV@mouse true\else false\fi}%
- {\if@MXV@autoplay true\else false\fi}%
- try{%
- if(player\@MXV@getlabelvalue{@MXV@#2.playerid}.isOpen){%
- player\@MXV@getlabelvalue{@MXV@#2.playerid}.close(%
- app.media.closeReason.general);
- player\@MXV@getlabelvalue{@MXV@#2.playerid}=null;
- }%
+ \ifthenelse{\equal{\@MXV@getlabelvalue{@MXV@\@MXV@label.autoplay}}{true}}{%
+ \setboolean{@MXV@autoplay}{true}%
+ }{%
+ \setboolean{@MXV@autoplay}{false}%
}%
- catch(e){}%
%
- try{%
- var player\@MXV@getlabelvalue{@MXV@#2.playerid}=%
- app.media.openPlayer({%
- settings: settings,%
- events: events%
- });
+ \edef\@MXV@operation{%
+ /OP 0%
+ /JS (%
+ if(focusonplayer==undefined){%
+ var focusonplayer=0; %shared by all annots
+ }%
+ \@MXV@settings{\@MXV@getlabelvalue{@MXV@\@MXV@label.showUI}}%
+ {\@MXV@getlabelvalue{@MXV@\@MXV@label.palindrome}}%
+ {\@MXV@getlabelvalue{@MXV@\@MXV@label.repeat}}%
+ {\@MXV@getlabelvalue{@MXV@\@MXV@label.rate}}%
+ {\@MXV@getlabelvalue{@MXV@\@MXV@label.startAt}}%
+ {\@MXV@getlabelvalue{@MXV@\@MXV@label.endAt}}%
+ {\@MXV@getlabelvalue{@MXV@\@MXV@label.volume}}%
+ \@MXV@events{\@MXV@currplayer}%
+ {\if@MXV@mouse true\else false\fi}%
+ {\if@MXV@autoplay true\else false\fi}%
+ try{%
+ if(player\@MXV@currplayer.isOpen){%
+ player\@MXV@currplayer.close(%
+ app.media.closeReason.general);
+ player\@MXV@currplayer=null;
+ }%
+ }%
+ catch(e){}%
+ %
+ try{%
+ var player\@MXV@currplayer=app.media.openPlayer({%
+ settings: settings,%
+ events: events%
+ });
+ }%
+ catch (e){}%
+ )%
}%
- catch (e){}%
- )%
+ \fi%
}%
\fi%
- }%
- \fi%
- %
- \ifpdf%
- \ifthenelse{\isundefined{\@pdfborder}}{%
- \def\@MXV@linkattr{}%
- }{%
- \edef\@MXV@linkattr{%
- /Border [\@pdfborder]%
- /C [\@linkbordercolor]%
- /H \@pdfhighlight%
- }%
- }%
- %
- \pdfstartlink%
- attr{\@MXV@linkattr}%
- user{%
- /Subtype /Link%
- /A <<%
- /S/GoTo%
- /D (@MXV@#2)%
- \if@MXV@externalviewer\else%
- \if@MXV@iiid%
- \ifx\@MXV@iiidview\@empty\else%
- /Next <<%
- /S/GoTo3DView%
- /TA \@MXV@getlabelvalue{@MXV@#2.annot}\space 0 R%
- /V \@MXV@iiidview%
- \fi%
- \@MXV@jscriptiiidaction%
- \ifx\@MXV@iiidview\@empty\else%
- >>%
- \fi%
+ %
+ \ifpdf%
+ \ifthenelse{\isundefined{\@pdfborder}}{%
+ \def\@MXV@linkattr{}%
+ }{%
+ \edef\@MXV@linkattr{%
+ \ifx\beamer@version\@undefined%
+ /Border [\@pdfborder]%
\else%
- /Next <<%
- /S/Rendition%
- /R \@MXV@getlabelvalue{@MXV@#2.rendition}\space 0 R%
- /AN \@MXV@getlabelvalue{@MXV@#2.annot}\space 0 R%
- \@MXV@operation%
- >>%
+ /Border [1 1 1]%
\fi%
- \fi%
- >>%
- }%
- \usebox{\@MXV@textbox}% write out text box
- \pdfendlink%
- \else%
- \pdfmark[{\usebox{\@MXV@textbox}}]{%
- pdfmark=/ANN,%
- Subtype=/Link,%
- Color=\@linkbordercolor,%
- AcroHighlight=\@pdfhighlight,%
- Raw={%
- /_objdef {linkannot\the\@MXV@links}%
- }%
- }%
- %
- %entire action entry moved outside
- \pdfmark{%
- pdfmark=/PUT,%
- Raw={%
- {linkannot\the\@MXV@links} <<%
- /A <<%
- /S/GoTo%
- /D/@MXV@#2%
- \if@MXV@externalviewer\else%
- \if@MXV@iiid%
- \ifx\@MXV@iiidview\@empty\else%
+ /C [\@linkbordercolor]%
+ /H \@pdfhighlight%
+ }%
+ }%
+ %
+ \pdfstartlink%
+ attr{\@MXV@linkattr}%
+ user{%
+ /Subtype /Link%
+ /A <<%
+ /S/GoTo%
+ /D (@MXV@\@MXV@label)%
+ \if@MXV@externalviewer\else%
+ \if@MXV@iiid%
+ \ifx\@MXV@iiidview\@empty\else%
+ /Next <<%
+ /S/GoTo3DView%
+ /TA \@MXV@getlabelvalue{@MXV@\@MXV@@label.annot}\space 0 R%
+ /V \@MXV@iiidview%
+ \fi%
+ \@MXV@jscriptiiidaction%
+ \ifx\@MXV@iiidview\@empty\else%
+ >>%
+ \fi%
+ \else%
/Next <<%
- /S/GoTo3DView%
- /TA {3Dannot\@MXV@getlabelvalue{@MXV@#2.playerid}}%
- /V \@MXV@iiidview%
- \fi%
- \@MXV@jscriptiiidaction%
- \ifx\@MXV@iiidview\@empty\else%
+ /S/Rendition%
+ /R \@MXV@getlabelvalue{@MXV@\@MXV@@label.rendition}\space 0 R%
+ /AN \@MXV@getlabelvalue{@MXV@\@MXV@@label.annot}\space 0 R%
+ \@MXV@operation%
>>%
\fi%
- \else%
- /Next <<%
- /S /Rendition%
- /R {mediarendition\@MXV@getlabelvalue{@MXV@#2.playerid}}%
- /AN {screenannot\@MXV@getlabelvalue{@MXV@#2.playerid}}%
- \@MXV@operation%
- >>%
\fi%
- \fi%
- >>%
- >>%
- }%
+ >>%
+ }%
+ \usebox{\@MXV@textbox}% write out text box
+ \pdfendlink%
+ \else%
+ \pdfmark[{\usebox{\@MXV@textbox}}]{%
+ pdfmark=/ANN,%
+ Subtype=/Link,%
+ Color=\@linkbordercolor,%
+ AcroHighlight=\@pdfhighlight,%
+ Raw={%
+ /_objdef {linkannot\the\@MXV@links}%
+ }%
+ }%
+ %
+ %entire action entry moved outside
+ \pdfmark{%
+ pdfmark=/PUT,%
+ Raw={%
+ {linkannot\the\@MXV@links} <<%
+ /A <<%
+ /S/GoTo%
+ /D (@MXV@\@MXV@label)%
+ \if@MXV@externalviewer\else%
+ \if@MXV@iiid%
+ \ifx\@MXV@iiidview\@empty\else%
+ /Next <<%
+ /S/GoTo3DView%
+ /TA {3Dannot\@MXV@getlabelvalue{@MXV@\@MXV@@label.annot}}%
+ /V \@MXV@iiidview%
+ \fi%
+ \@MXV@jscriptiiidaction%
+ \ifx\@MXV@iiidview\@empty\else%
+ >>%
+ \fi%
+ \else%
+ /Next <<%
+ /S /Rendition%
+ /R {mediarendition\@MXV@getlabelvalue{@MXV@\@MXV@@label.annotid}}%
+ /AN {screenannot\@MXV@getlabelvalue{@MXV@\@MXV@@label.annot}}%
+ \@MXV@operation%
+ >>%
+ \fi%
+ \fi%
+ >>%
+ >>%
+ }%
+ }%
+ \fi%
}%
- \fi%
}%
}
@@ -2736,7 +2941,7 @@
}
%compatibility macros
-\newcommand\movie[3][]{%
+\providecommand\movie[3][]{%
\leavevmode%
\@MXV@reset%
\def\@MXV@autostart{}\def\@MXV@loop{}\def\@MXV@showcontrols{}%