1

I am trying to insert a .mp4 file in beamer, I got it work but two issues arising:

  1. the "play/pause" button doesn't work;
  2. I want to set a timer that the video only plays a specified time length, e.g. 10s with no looping.

Can anyone help fix my issues? Video attached. Thanks!

\usepackage{media9}

\begin{document}
\begin{frame}{Video example}

\includemedia[label=largecell,
    width=\textwidth,height=0.5625\textwidth,
    activate=onclick,
    addresource=largecell.mp4,
    flashvars={
        source=largecell.mp4
       &sclaeMode=letterbox
    }
]{}{VPlayer.swf}

\mediabutton[
  mediacommand=largecell:playPause,
  jsaction=largecell:{
    try{app.clearTimeOut(tout)}catch(e){} % kill pending timers
    var tout=app.setTimeOut('annotRM.largecell.callAS("pause")', 10000);
  }
]{\fbox{Play/Pause}}

\end{frame}
\end{document}

This is the link for my video

1
  • media9 depends on FlashPlayer that was removed from the web and from Adobe products at the beginning of 2021. Controlling video and audio playback with separate buttons, as in the example, does not work anymore.
    – AlexG
    Jul 29, 2021 at 8:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.