1

My current code is the following

\begin{frame}
\frametitle{Introduction To AWS}
\hspace{-0.8cm}    
\includemedia[
 label=myVidPlayer,
 width=10cm,height=6cm,
 activate=pageopen,
 addresource=1.flv,
 addresource=2.flv,
 addresource=3.flv,
 addresource=4.flv,
 flashvars={
     source=1.flv %video to be shown at first
    &autoPlay=true
    &scaleMode=letterbox %useful, if videos are of different aspect ratio
 }
]{}{VPlayer.swf}


\mediabutton[mediacommand=myVidPlayer:setSource [(1.flv)]]{Alexa}
\mediabutton[mediacommand=myVidPlayer:setSource [(2.flv)]]{Philip Robot}
\mediabutton[mediacommand=myVidPlayer:setSource [(3.flv)]]{Sophia} 
\mediabutton[mediacommand=myVidPlayer:setSource [(4.flv)]]{Bot Simulation}


\end{frame}

1) How can I color the mediabuttons ?

The way they are now is kinda disturbing as it looks all connected together since its all white colored. Can I make them fancier or color them?

2) Can I add a play and a pause button as well?

3) Can I center the video ?

Current View: enter image description here

Thanks!

  • 1
    See the example on p. 23 of the media9 documentation. It has a Play/Pause button and uses \fbox to produce a button look. – AlexG Jul 16 '18 at 20:08
3
  1. How can I color the mediabuttons ?

You can replace "Alexa" with whatever commands you like to create coloured buttons, for example with \colorbox{<color>}{<text>}:

\documentclass{beamer}

\usepackage{media9}

\begin{document}

\begin{frame}
\frametitle{Introduction To AWS}
\hspace{-0.8cm}    
\includemedia[
 label=myVidPlayer,
 width=10cm,height=6cm,
 activate=pageopen,
 addresource=video01.flv,
 flashvars={
     source=video01.flv %video to be shown at first
    &autoPlay=true
    &scaleMode=letterbox %useful, if videos are of different aspect ratio
 }
]{}{VPlayer.swf}

\mediabutton[mediacommand=myVidPlayer:setSource [(video01.flv)]]{\colorbox{red}{\strut Alexa}}


\end{frame}


\end{document}
  1. Can I center the video?

You could use \hfill before and after the video

\documentclass{beamer}

\usepackage{media9}

\begin{document}

\begin{frame}
\frametitle{Introduction To AWS}
{
\hfill
\includemedia[
 label=myVidPlayer,
 width=10cm,height=6cm,
 activate=pageopen,
 addresource=video01.flv,
 flashvars={
     source=video01.flv %video to be shown at first
    &autoPlay=true
    &scaleMode=letterbox %useful, if videos are of different aspect ratio
 }
]{}{VPlayer.swf}
\hfill
}

\mediabutton[mediacommand=myVidPlayer:setSource [(video01.flv)]]{Alexa}


\end{frame}


\end{document}
  • 1
    An additional \strut in the text argument of the \colorbox could be useful for all boxes to have the same height and depth. – AlexG Jul 16 '18 at 20:00

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.