3

I integrated videos to my LaTeX document which worked perfectly:

\begin{figure} [H]
    \mbox{
        \movie[width=15.75cm, height=6cm, showcontrols=false, loop, poster, autostart]{}{animations/chap_04/Ani_04_01.mp4}
    }
    \caption{Caption}
    \label{Label}
\end{figure}

Now I would like to load different video files into the \mbox. To load each video I would like use text-links which are placed somewhere below the video frame. Is it possible? If it is, how can I solve the problem?

0

1 Answer 1

3

Package movie15 shouldn't be used anymore.

The replacement, media9, is capable of doing exactly what you are after. The following example is taken from its manual. Any number of video files can be embedded using the addresource option. Videos are loaded by means of the setSource method which is bound to buttons below the video box.

\documentclass{article}
\usepackage{media9}

\begin{document}
\includemedia[
  label=some_dice,
  width=0.4\linewidth,height=0.3\linewidth,
  activate=pageopen,
  addresource=random.mp4, %two video files
  addresource=cube.mp4,
  transparent,
  flashvars={
    source=random.mp4
   &loop=true             % loop video
   &scaleMode=letterbox   % preserve aspect ratio while scaling the video
  }
]{}{VPlayer.swf}

\mediabutton[
  mediacommand=some_dice:setSource [(random.mp4)]
]{\fbox{\strut random.mp4}}
\mediabutton[
  mediacommand=some_dice:setSource [(cube.mp4)]
]{\fbox{\strut cube.mp4}}

\end{document}
3
  • Thanks for the clue with media9 package! I tried it and unfortunately the buttons did work. The first video was loading, but the buttons didn't effect anything ... (I tried: Mac OS X 10.8 with Adobe Acrobat 11.0.0.2)
    – Freddi
    Jun 20, 2013 at 0:51
  • @Freddi: Did you run LaTeX twice, as the warning messages suggest? There is some Label<->Ref interaction between video box and buttons which requires LaTeX to be rerun, as usual.
    – AlexG
    Jun 20, 2013 at 6:33
  • I don't know ... but I just reopened LaTeX and tried it again and it worked perfectly ;) So, thank you very much!
    – Freddi
    Jun 20, 2013 at 10:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .