Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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,
  addresource=camera1-.mp4,
  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,
  addresource=camera2-.mp4,
  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,
  addresource=camera6-.mp4,
  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,
  addresource=camera4-.mp4,
  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,
  addresource=camera7-.mp4,
  flashvars={%
     source=camera7-.mp4% same path as in addresource!
   &autoPlay=true%    % optional configuration
   &loop=true%        % variables
  }  
]{}{VPlayer.swf}

Please help!

share|improve this question
    
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
add comment

1 Answer

\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}

enter image description here

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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