# How to embed 3 videos horizontally using media9?

I am using media9 package. I want to insert 3 videos horizontally & then in the next row again 2 videos.

\includemedia[
activate=pageopen,
width=50pt,height=50pt,
flashvars={%
source=camera1-.mp4% same path as in addresource!
&autoPlay=true%    % optional configuration
&loop=true%        % variables
}
]{}{VPlayer.swf}

\includemedia[
activate=pageopen,
width=50pt,height=50pt,
flashvars={%
source=camera2-.mp4% same path as in addresource!
&autoPlay=true%    % optional configuration
&loop=true%        % variables
}
]{}{VPlayer.swf}

\includemedia[
activate=pageopen,
width=50pt,height=50pt,
flashvars={%
source=camera6-.mp4% same path as in addresource!
&autoPlay=true%    % optional configuration
&loop=true%        % variables
}
]{}{VPlayer.swf}

\includemedia[
activate=pageopen,
width=50pt,height=50pt,
flashvars={%
source=camera4-.mp4% same path as in addresource!
&autoPlay=true%    % optional configuration
&loop=true%        % variables
}
]{}{VPlayer.swf}

\includemedia[
activate=pageopen,
width=50pt,height=50pt,
flashvars={%
source=camera7-.mp4% same path as in addresource!
&autoPlay=true%    % optional configuration
&loop=true%        % variables
}
]{}{VPlayer.swf}

-
Welcome to TeX.sx! You can format code by using the {} command in the edit window or by indenting using four spaces –  Peter Jansson Jan 29 '13 at 7:53

\includemedia behaves like \includegraphics or like any other TeX box: They are put one after another. If separated by spaces, those boxes that don't fit onto the current text line are moved to the next, and \\ forces a line break.

Try something like:

\documentclass{article}
\usepackage[draft]{media9}

\begin{document}
\noindent Text before\\
\includemedia[width=50pt,height=50pt]{}{}\includemedia[width=50pt,height=50pt]{}{}\includemedia[width=50pt,height=50pt]{}{}\\
\includemedia[width=50pt,height=50pt]{}{}\includemedia[width=50pt,height=50pt]{}{}\\
Text after.
\end{document}

-
Thanks for the reply, but it does not solve my problem. The code you have given It only align one video & text placed horizontal to that video. I want all the videos placed horizontally one by one. No text should be there. Is it possible or not? –  user25176 Jan 29 '13 at 10:58
The text was inserted to demonstrate how TeX places boxes of arbitrary content. If you don't want text, omit it. The remainder is what you requested: Three videos on the first line, followed by two videos on the next. –  AlexG Jan 29 '13 at 11:34
I some how managed to split the frame & add 2 videos horizontally. \noindent{ \begin{minipage}[t]{0.20\linewidth} \hspace{.1pt} \end{minipage}} \noindent{ \begin{minipage}[t]{0.30\linewidth} \includemedia[ activate=pageopen, width=70pt,height=50pt, addresource=camera1-.mp4, flashvars={source=camera1-.mp4 &autoPlay=true &loop=true }]{}{VPlayer.swf} \end{minipage}} \hfill{ \begin{minipage}[t]{0.45\linewidth} \includemedia[ activate=pageopen, width=70pt,height=50pt, addresource=camera6-.mp4, flashvars={source=camera6-.mp4 &autoPlay=true &loop=true }]{}{VPlayer.swf} \end{minipage} } –  user25176 Jan 29 '13 at 11:49
The code you have written does not work. It is still showing in vertical order. –  user25176 Jan 30 '13 at 7:20
Perhaps the \textwidth used is too small to keep three videos of the given width (50pt) on one line. Which document class are you using? beamer? article? Provide a minimal compilable example. –  AlexG Feb 28 '13 at 11:54