summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/flashmovie
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-14 00:03:51 +0000
committerKarl Berry <karl@freefriends.org>2010-09-14 00:03:51 +0000
commitc093affc0bc3b558c318d29dcc2240a36178a7df (patch)
tree058635e4fd606688a17fb96be4a0e3e604eb22c4 /Master/texmf-dist/tex/latex/flashmovie
parentfb46da52c21567a3a980ae8827fb52f161c4f5ae (diff)
flashmovie update (9sep10)
git-svn-id: svn://tug.org/texlive/trunk@19720 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/flashmovie')
-rw-r--r--Master/texmf-dist/tex/latex/flashmovie/flashmovie.sty220
1 files changed, 147 insertions, 73 deletions
diff --git a/Master/texmf-dist/tex/latex/flashmovie/flashmovie.sty b/Master/texmf-dist/tex/latex/flashmovie/flashmovie.sty
index 051b5971da1..0603e59a3b9 100644
--- a/Master/texmf-dist/tex/latex/flashmovie/flashmovie.sty
+++ b/Master/texmf-dist/tex/latex/flashmovie/flashmovie.sty
@@ -1,7 +1,14 @@
%%%%%%%%%%%%% flashmovie.sty
%%%%%%%%%%%%% Copyright 2010 Timo Hartmann (thartmann15 at googlemail.com)
%
-% Version 0.2
+% Version 0.3
+%
+% changelog:
+% 0.3 : 2010-09-09 : better examples,minor bug fixes, issues with beamer explained
+% 0.2 : 2010-04-21 : major overhaul: keyval 'engine', flv-player-engine,
+% efficient multiple embedding of files,...
+% 0.1 : 2010-04-13 : a bunch of bugfixes
+% 0.0 : 2009-12-06 : initial release
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -32,11 +39,6 @@
% - Marco Aurélio Graciotto Silva
% - neolao
%
-% changelog:
-% 0.2 : 2010-04-21 : major overhaul: keyval 'engine', flv-player-engine,...
-% 0.1 : 2010-04-13 : a bunch of bugfixes
-% 0.0 : 2009-12-06 : initial release
-%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This package allows direct embedding of flash movies into PDF files. It is
@@ -63,8 +65,13 @@
% Both files (the video and the flash-video-player) will be
% embedded into the pdf. See example(2) below.
% Different video formats (mp4/flv/whatever-the-flash-video-player-accepts/...)
-% can be used. Controls are available (depends on the player).
+% can be used. Controls are available (depending on the player).
% See example (2) below.
+% Using the keyword "engine" one can select the method of embedding.
+% If you omit it or if you specify "engine=pure-swf" then the file will be
+% directly embedded. This works only for swf-files.
+% For other possible values of "engine" see the chapter "flash-video-players".
+%
%
% flash-video-players:
% There are several flash-video-players available which fit the needs
@@ -83,7 +90,7 @@
% supported parameters:
% auto=0 --> auto-play off (default)
% auto=1 --> auto-play on
-% image=some.jpeg --> start-image (not necessary)
+% image=someimage.jpeg --> start-image (not necessary)
%
% - "engine=acropro". This is an commercial player which is distributed with
% Acrobat 9 Pro. You have to obtain VideoPlayer.swf and SkinOverPlaySeekStop.swf
@@ -93,14 +100,27 @@
% - "engine=jw-player". This is the JW player from http://www.longtailvideo.com/players/jw-flv-player.
% You have to obtain player.swf from that site and put it in the working directory in order
% to use this module.
-% It is NOT included with this distribution.
+% It is NOT included in this distribution.
% For this player flashmovie.sty only provides rudimentary support.
% - "engine=osplayer". This is an open-source player from http://www.osflv.com
% You have to obtain OSplayer.swf from that site and put it in the working directory in order
% to use this module.
-% It is NOT included with this distribution.
+% It is NOT included in this distribution.
% For this player flashmovie.sty only provides rudimentary support.
%
+% other options for the "engine"-keyword:
+% - "engine=pure-swf" : This directly embedds the file into the PDF without
+% any flash-video-player. This is the default option when you omit the
+% "engine"-keyword. This works only for swf-files.
+% - "engine=blank" : This simply produces an empty rectangle instead of an
+% flash animation. This is useful during the creation process of the
+% PDF because flash animations inside a PDF can easily crash
+% the Adobe reader with the reload (CTRL-R) feature after recompiling
+% the tex-file.
+% The same effect can be produced if uses "blank=1" as an option
+% regardless what the value of "engine" is.
+% example: \flashmovie[...,engine=flv-player,blank=1,...]{...}
+%
%
% example (1)
% - download a video file to use, for example
@@ -141,7 +161,39 @@
% todo:
% - make more options of rich-media annotations usable, for example activation by clicking, play-count,...
%
+% tips:
+% - It is in principle possible to insert any flash animation into a PDF.
+% One is not restricted to videos.
+% - During development of the PDF one can switch of the flash animations which
+% is sometimes useful. See "engine=blank" or "blank=1" for more information.
+%
+% troubleshooting:
+% - If you encounter the error message "\pdfminorversion cannot be changed after data is written to the PDF file.",
+% then another package is also setting the variable "\pdfminorversion".
+% For example the package "beamer" does so.
+% There are two solutions:
+% - Include the package with the highest "\pdfminorversion" first.
+% For example put "\RequirePackage{flashmovie}" on the very first line
+% of your file instead of using "\usepackage{flashmovie}" later on.
+% Or rearrange the usepackage-commands in the right order.
+% - Comment the line "\ifnum\pdfminorversion<7 \pdfminorversion=7\fi" in
+% "flashmovie.sty". This will probably leave your PDF with the wrong
+% version information, but the Adobe Reader will take it anyway.
+% - There seems to be some trouble with the latex package beamer. You can't use
+% the flv-player reliably with it. It is prone to crash the acrobat reader while
+% changing pages.
+% The only reliable way to use beamer is to directly embed the videos as
+% flash animations.
+% Another option is to use the JW player. It seems to work with beamer,
+% but is only rudimentary supported.
+% Any competent help on this issue would be appreciated. This might be
+% another open source player which works with beamer or a fix of the flv-player
+% or something else.
+%
% warning:
+% - It is recommended to use always the latest available version of the Adobe Reader.
+% This should be mandatory because in the past many attacks on computers were based
+% on 'evil' PDFs which exploited security holes in this software.
% - Because the file names of the movies are directly embedded into the PDFs please use only
% "normal" file names. More specific use only names compatible with internal PDF strings.
% There is even a specification what conforming file names are (see the PDF reference).
@@ -161,6 +213,7 @@
\def\flashmovieimage{}
\def\flashmovieauto{0}
\def\flashmovieengine{}
+ \def\flashmoviekblank{0}
}
\define@key{flashmovieparams}{width} {\def\flashmoviewidth {#1}}
@@ -168,6 +221,7 @@
\define@key{flashmovieparams}{image} {\def\flashmovieimage {#1}}
\define@key{flashmovieparams}{auto} {\def\flashmovieauto {#1}}
\define@key{flashmovieparams}{engine} {\def\flashmovieengine {#1}}
+\define@key{flashmovieparams}{blank} {\def\flashmoviekblank {#1}}
\newlength{\flashmovie@width}
\newlength{\flashmovie@height}
@@ -228,12 +282,16 @@
\def\flashmovie{\@ifnextchar[\@flashmovie{\@flashmovie[]}}
\def\@flashmovie[#1]#2{\flashmovieparamsclear \setkeys{flashmovieparams}{#1}{
- \ifx\flashmovieimage\flashmovieengine
+
+ \ifthenelse{\equal{\flashmoviekblank}{\flashmoviezero}}
+ {}{\def\flashmovieengine{blank}}
+
+ \ifx\flashmovieengine\flashmovieempty
\flashmovie@pureswf[#1]{#2}
\else
\ifthenelse{\equal{\flashmovieengine}{pure-swf}}
- {\flashmovie@puresef[#1]{#2}}{}
+ {\flashmovie@pureswf[#1]{#2}}{}
\ifthenelse{\equal{\flashmovieengine}{flv-player}}
{\flashmovie@flvplayer[#1]{#2}}{}
@@ -247,6 +305,9 @@
\ifthenelse{\equal{\flashmovieengine}{osplayer}}
{\flashmovie@osplayer[#1]{#2}}{}
+ \ifthenelse{\equal{\flashmovieengine}{blank}}
+ {\flashmovie@blank[#1]{#2}}{}
+
\fi
}}
@@ -256,9 +317,9 @@
\def\flashmovie@pureswf{\@ifnextchar[\@flashmovie@pureswf{\@flashmovie@pureswf[]}}
\def\@flashmovie@pureswf[#1]#2{\flashmovieparamsclear \setkeys{flashmovieparams}{#1}{
- \newcount\configurationnum
- \newcount\contentnum
- \newcount\settingsnum
+ \newcount\flashmovie@n@config
+ \newcount\flashmovie@n@content
+ \newcount\flashmovie@n@settings
\flashmovieembedfile{#2}
\edef\flashmovie@e@video{\flashmovieembedded}
@@ -273,23 +334,23 @@
>>]
/Subtype /Flash
>>}
- \configurationnum=\pdflastobj
+ \flashmovie@n@config=\pdflastobj
\immediate
\pdfobj
{<<
/Assets << /Names [(#2) \flashmovie@e@video\space 0 R] >>
- /Configurations [\the\configurationnum\space 0 R]
+ /Configurations [\the\flashmovie@n@config\space 0 R]
>>}
- \contentnum=\pdflastobj
+ \flashmovie@n@content=\pdflastobj
\immediate
\pdfobj
{<<
/Activation
<< /Type /RichMediaActivation
- /Condition /PO
- /Configuration \the\configurationnum\space 0 R
+ /Condition /PV
+ /Configuration \the\flashmovie@n@config\space 0 R
/Animation
<< /Subtype /Linear
/Speed 1
@@ -317,10 +378,10 @@
>>
/Deactivation
<< /Type /RichMediaDeactivation
- /Condition /XD
+ /Condition /PI
>>
>>}
- \settingsnum=\pdflastobj
+ \flashmovie@n@settings=\pdflastobj
\sbox{\flashmovie@content} {{\hbox to \flashmoviewidth {\vbox to \flashmovieheight { }}}}
@@ -330,19 +391,31 @@
\pdfannot width \flashmovie@width height \flashmovie@height depth 0pt {
/Subtype /RichMedia
- /RichMediaContent \the\contentnum\space 0 R
- /RichMediaSettings \the\settingsnum\space 0 R
+ /RichMediaContent \the\flashmovie@n@content\space 0 R
+ /RichMediaSettings \the\flashmovie@n@settings\space 0 R
}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% blank
+
+\def\flashmovie@blank{\@ifnextchar[\@flashmovie@blank{\@flashmovie@blank[]}}
+
+\def\@flashmovie@blank[#1]#2{\flashmovieparamsclear \setkeys{flashmovieparams}{#1}{
+ \sbox{\flashmovie@content} {{\hbox to \flashmoviewidth {\vbox to \flashmovieheight { }}}}
+ \settowidth {\flashmovie@width} {\usebox{\flashmovie@content}}
+ \settoheight{\flashmovie@height}{\usebox{\flashmovie@content}}
+ \usebox{\flashmovie@content}
+}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% player from adobe acrobat pro
\def\flashmovie@acropro{\@ifnextchar[\@flashmovie@acropro{\@flashmovie@acropro[]}}
\def\@flashmovie@acropro[#1]#2{\flashmovieparamsclear \setkeys{flashmovieparams}{#1}{
- \newcount\configurationnum
- \newcount\contentnum
- \newcount\settingsnum
+ \newcount\flashmovie@n@config
+ \newcount\flashmovie@n@content
+ \newcount\flashmovie@n@settings
\flashmovieembedfile{#2}
\edef\flashmovie@e@video{\flashmovieembedded}
@@ -367,23 +440,23 @@
>>]
/Subtype /Flash
>>}
- \configurationnum=\pdflastobj
+ \flashmovie@n@config=\pdflastobj
\immediate
\pdfobj
{<<
/Assets << /Names [(#2) \flashmovie@e@video\space 0 R (skinover.swf) \flashmovie@e@skin\space 0 R (VideoPlayer.swf) \flashmovie@e@player\space 0 R] >>
- /Configurations [\the\configurationnum\space 0 R]
+ /Configurations [\the\flashmovie@n@config\space 0 R]
>>}
- \contentnum=\pdflastobj
+ \flashmovie@n@content=\pdflastobj
\immediate
\pdfobj
{<<
/Activation
<< /Type /RichMediaActivation
- /Condition /PO
- /Configuration \the\configurationnum\space 0 R
+ /Condition /PV
+ /Configuration \the\flashmovie@n@config\space 0 R
/Animation
<< /Subtype /Linear
/Speed 1
@@ -411,10 +484,10 @@
>>
/Deactivation
<< /Type /RichMediaDeactivation
- /Condition /XD
+ /Condition /PI
>>
>>}
- \settingsnum=\pdflastobj
+ \flashmovie@n@settings=\pdflastobj
\sbox{\flashmovie@content} {{\hbox to \flashmoviewidth {\vbox to \flashmovieheight { }}}}
@@ -424,8 +497,8 @@
\pdfannot width \flashmovie@width height \flashmovie@height depth 0pt {
/Subtype /RichMedia
- /RichMediaContent \the\contentnum\space 0 R
- /RichMediaSettings \the\settingsnum\space 0 R
+ /RichMediaContent \the\flashmovie@n@content\space 0 R
+ /RichMediaSettings \the\flashmovie@n@settings\space 0 R
}}}
@@ -435,9 +508,9 @@
\def\flashmovie@flvplayer{\@ifnextchar[\@flashmovie@flvplayer{\@flashmovie@flvplayer[]}}
\def\@flashmovie@flvplayer[#1]#2{\flashmovieparamsclear \setkeys{flashmovieparams}{#1}{
- \newcount\configurationnum
- \newcount\contentnum
- \newcount\settingsnum
+ \newcount\flashmovie@n@config
+ \newcount\flashmovie@n@content
+ \newcount\flashmovie@n@settings
\flashmovieembedfile{#2}
\edef\flashmovie@e@video{\flashmovieembedded}
@@ -477,24 +550,24 @@
>>]
/Subtype /Flash
>>}
- \configurationnum=\pdflastobj
+ \flashmovie@n@config=\pdflastobj
\immediate
\pdfobj
{<<
/Assets << /Names
[(#2) \flashmovie@e@video\space 0 R (player_flv_maxi.swf) \flashmovie@e@player\space 0 R \flashmovieimagevarii] >>
- /Configurations [\the\configurationnum\space 0 R]
+ /Configurations [\the\flashmovie@n@config\space 0 R]
>>}
- \contentnum=\pdflastobj
+ \flashmovie@n@content=\pdflastobj
\immediate
\pdfobj
{<<
/Activation
<< /Type /RichMediaActivation
- /Condition /PO
- /Configuration \the\configurationnum\space 0 R
+ /Condition /PV
+ /Configuration \the\flashmovie@n@config\space 0 R
/Animation
<< /Subtype /Linear
/Speed 1
@@ -522,10 +595,10 @@
>>
/Deactivation
<< /Type /RichMediaDeactivation
- /Condition /XD
+ /Condition /PI
>>
>>}
- \settingsnum=\pdflastobj
+ \flashmovie@n@settings=\pdflastobj
\sbox{\flashmovie@content} {{\hbox to \flashmoviewidth {\vbox to \flashmovieheight { }}}}
@@ -535,8 +608,8 @@
\pdfannot width \flashmovie@width height \flashmovie@height depth 0pt {
/Subtype /RichMedia
- /RichMediaContent \the\contentnum\space 0 R
- /RichMediaSettings \the\settingsnum\space 0 R }
+ /RichMediaContent \the\flashmovie@n@content\space 0 R
+ /RichMediaSettings \the\flashmovie@n@settings\space 0 R }
}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -545,9 +618,9 @@
\def\flashmovie@jwplayer{\@ifnextchar[\@flashmovie@jwplayer{\@flashmovie@jwplayer[]}}
\def\@flashmovie@jwplayer[#1]#2{\flashmovieparamsclear \setkeys{flashmovieparams}{#1}{
- \newcount\configurationnum
- \newcount\contentnum
- \newcount\settingsnum
+ \newcount\flashmovie@n@config
+ \newcount\flashmovie@n@content
+ \newcount\flashmovie@n@settings
\flashmovieembedfile{#2}
\edef\flashmovie@e@video{\flashmovieembedded}
@@ -569,24 +642,24 @@
>>]
/Subtype /Flash
>>}
- \configurationnum=\pdflastobj
+ \flashmovie@n@config=\pdflastobj
\immediate
\pdfobj
{<<
/Assets << /Names
[(#2) \flashmovie@e@video\space 0 R (player.swf) \flashmovie@e@player\space 0 R] >>
- /Configurations [\the\configurationnum\space 0 R]
+ /Configurations [\the\flashmovie@n@config\space 0 R]
>>}
- \contentnum=\pdflastobj
+ \flashmovie@n@content=\pdflastobj
\immediate
\pdfobj
{<<
/Activation
<< /Type /RichMediaActivation
- /Condition /PO
- /Configuration \the\configurationnum\space 0 R
+ /Condition /PV
+ /Configuration \the\flashmovie@n@config\space 0 R
/Animation
<< /Subtype /Linear
/Speed 1
@@ -614,10 +687,10 @@
>>
/Deactivation
<< /Type /RichMediaDeactivation
- /Condition /XD
+ /Condition /PI
>>
>>}
- \settingsnum=\pdflastobj
+ \flashmovie@n@settings=\pdflastobj
\sbox{\flashmovie@content} {{\hbox to \flashmoviewidth {\vbox to \flashmovieheight { }}}}
@@ -627,8 +700,8 @@
\pdfannot width \flashmovie@width height \flashmovie@height depth 0pt {
/Subtype /RichMedia
- /RichMediaContent \the\contentnum\space 0 R
- /RichMediaSettings \the\settingsnum\space 0 R }
+ /RichMediaContent \the\flashmovie@n@content\space 0 R
+ /RichMediaSettings \the\flashmovie@n@settings\space 0 R }
}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -637,9 +710,9 @@
\def\flashmovie@osplayer{\@ifnextchar[\@flashmovie@osplayer{\@flashmovie@osplayer[]}}
\def\@flashmovie@osplayer[#1]#2{\flashmovieparamsclear \setkeys{flashmovieparams}{#1}{
- \newcount\configurationnum
- \newcount\contentnum
- \newcount\settingsnum
+ \newcount\flashmovie@n@config
+ \newcount\flashmovie@n@content
+ \newcount\flashmovie@n@settings
\flashmovieembedfile{#2}
\edef\flashmovie@e@video{\flashmovieembedded}
@@ -661,24 +734,24 @@
>>]
/Subtype /Flash
>>}
- \configurationnum=\pdflastobj
+ \flashmovie@n@config=\pdflastobj
\immediate
\pdfobj
{<<
/Assets << /Names
[(#2) \flashmovie@e@video\space 0 R (OSplayer.swf) \flashmovie@e@player\space 0 R] >>
- /Configurations [\the\configurationnum\space 0 R]
+ /Configurations [\the\flashmovie@n@config\space 0 R]
>>}
- \contentnum=\pdflastobj
+ \flashmovie@n@content=\pdflastobj
\immediate
\pdfobj
{<<
/Activation
<< /Type /RichMediaActivation
- /Condition /PO
- /Configuration \the\configurationnum\space 0 R
+ /Condition /PV
+ /Configuration \the\flashmovie@n@config\space 0 R
/Animation
<< /Subtype /Linear
/Speed 1
@@ -706,10 +779,10 @@
>>
/Deactivation
<< /Type /RichMediaDeactivation
- /Condition /XD
+ /Condition /PI
>>
>>}
- \settingsnum=\pdflastobj
+ \flashmovie@n@settings=\pdflastobj
\sbox{\flashmovie@content} {{\hbox to \flashmoviewidth {\vbox to \flashmovieheight { }}}}
@@ -719,6 +792,7 @@
\pdfannot width \flashmovie@width height \flashmovie@height depth 0pt {
/Subtype /RichMedia
- /RichMediaContent \the\contentnum\space 0 R
- /RichMediaSettings \the\settingsnum\space 0 R }
-}} \ No newline at end of file
+ /RichMediaContent \the\flashmovie@n@content\space 0 R
+ /RichMediaSettings \the\flashmovie@n@settings\space 0 R }
+}}
+