Welcome Guest, Not a member yet? Register   Sign In
display video file
#1

[eluser]Unknown[/eluser]
Hi everybody!

I heard about CI with one month ago and now I work in an big project. I have a problem and I don't know how can I solve it. I'm able to see the video only if I display one movie. If in my data base for the same choose I have to display many videos, the buttons becomes useless. I really need help.

Thanks

<?php
$cpt = 0 ;
foreach($query as $items)
{
echo ("<td rowspan=3 align=right valign=top><b><div> &lt;object classid='" ."clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8" ."'codebase='" ."http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" ."'width='" ."440" ."'height='" ."280" ."'id='" ."video1" ."'events='" ."True" ."'&gt;<param name='" ."Src" ."'value='" ."C:\\xampp\\htdocs\\public\\video\\" .$items->file ."'/><param name='" ."ShowDisplay" ."'value='" ."True" ."'/><param name='" ."AutoLoop" ."'value='" ."True" ."'/><param name='" ."AutoPlay" ."'value='" ."False" ."'/>&lt;embed type='" ."application/x-vlc-plugin" ."'name='" ."video1" ."'autoplay='" ."False" ."'loop='" ."True" ."'height='" ."280" ."'width='" ."440" ."'border='" ."1" ."'target='" ."C:\\xampp\\htdocs\\public\\video\\" .$items-&gt;file ."'/>&lt;/object&gt;<br>&lt;input type='" ."button" ."'class='" ."submit" ."'style='" ."width:50px;height:25px" ."'value='" ."Play" ."'onClick='" ."document.video1.play();" ."'&gt;&lt;input type='" ."button" ."'class='" ."submit" ."'style='" ."width:50px;height:25px" ."'value='" ."Pause" ."'onClick='" ."document.video1.pause();" ."'&gt;&lt;input type='" ."button" ."'class='" ."submit" ."'style='" ."width:50px;height:25px" ."'value='" ."Stop" ."'onClick='" ."document.video1.stop();" ."'&gt;&lt;input type='" ."button" ."'class='" ."submit" ."'style='" ."width:80px;height:25px" ."'value='" ."Fullscreen" ."'onClick='" ."document.video1.fullscreen();" ."'&gt;</div></td></b>\n");

$cpt++;
}
?&gt;
#2

[eluser]missionsix[/eluser]
your onClick events reverence 'video1' on every iteration in the loop, as well as your id on the &lt;object&gt; tag. I believe you need to use your increment variable, $cpt, in place of the 1 on the video1 str. so: replace all video1's with video$cpt
#3

[eluser]Derek Allard[/eluser]
Welcome to CodeIgniter. No need to send private messages to people to draw attention to your posts... we're a pretty helpful community and we'll help out where we can.
#4

[eluser]Unknown[/eluser]
I'm sorry, I'm a junior programmer and this is for the first time when I post a message on this forum. Thanks a lot missionsix, now I can see all my videos !!!
I am verry surprise and thankfull for the generous implication of yours.Thanks again.I'll be back tomorrow....probably with some other issues.
#5

[eluser]missionsix[/eluser]
Your very welcome, glad i could help.
#6

[eluser]nirbhab[/eluser]
Please explain what you are up to, rather than pasting the code.
if you are cloning some site..tell us...it wud be gr8 help to understand the concept.

i have never received a private msg, except this one :-), community is already so gr8 in responding, that we never required this private message feature.




Theme © iAndrew 2016 - Forum software by © MyBB