Modal box vs Quick Time movie - php

I have a problem where my Modal Box pops up behind my Quick Time Movie when you click on the Magnifying Glass button to search.
http://www.vaal-used-cars.co.za
I came across someone who had the same type of problem but with FLV video and I went and did what the person who replied to him said he must do which was the following.
param name="wmode" value="transparent"
This is how I've put it into my code...
<th width="86%" scope="col"><embed src="images/vaalusedcars.mpg" width="480" height="290" volume="50" param name="wmode" value="transparent" autoplay="false"></embed></th>
I've uploaded the page again refreshed but it's still popping up behind the Movie.
Any help on how to get this fixed please ??
Thanx
Jolene

Try to add the wmode attribute:
<embed src="images/vaalusedcars.mpg" width="480" height="290" volume="50" wmode="opaque" autoplay="false"/>
The parameter you mentioned is used together with the <object> tag:
<object>
<param name="wmode" value="transparent">
</object>
You might think about using a flash player (like JWPlayer) instead as Flash it is installed on most clients. I only know a few people willing to install Quicktime Player.

Related

Issues with embedding WMV files in html

I have a link to play a video in my website. When a user click on that video link, the div which embedded that video will popup(not popup window, its showing hidden div using jquery BlockUI). And there is close button it will hide the div which embedded video.
Everything is working fine. But video is not stopping on closing that div. I can hear the sound :( . I want to stop that sound too on closing that video. What to do. Please do the needful
<OBJECT ID="MediaPlayers" WIDTH="400" HEIGHT="350" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="1.wmv">
<PARAM name="autostart" VALUE="false">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="1.wmv" NAME="MediaPlayer"
WIDTH="400" HEIGHT="350" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
</OBJECT>
Try to use this when you close the popup window.
document.getElementById("MediaPlayers").stop();
Or you can use another div to wrap this player, and then add your html into innerHTML when open popup window and then remove all when you close the window. like
<div id="playerWrap">
<OBJECT ID="MediaPlayers" ....
.....
</OBJECT>
</div>
javascript code:
document.getElementById("palyerWrap").innerHTML = "";
reference by http://www.htmlforums.com/multimedia-elements/t-accessing-mediaplayer-functionality-from-javascript-65899.html
if you want everybody to be able to your video, you should use the html5 video tag instead. this will not only relieve you from unexpected behavior of propriatory plugins (windows media player) but also allow you to reach a broader spectrum of devices and therefore a bigger audience.
i suggest to convert you video to the webm format and using jplayer to display it on your site.

Embedding Video Code with PHP

I am developing a web application with backend administration panel that allows users to insert video embedding code. This code will render the video on the corresponding page as i am echoing that code at that location.
The problem is that, when i echo the code, the code itself gets displayed instead of video being shown. Where i am going wrong?
Here is the code entered by user in the textarea in admin panel:
<pre>
<object id="vp110mFH" width="432" height="240" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param name="movie" value="http://static.animoto.com/swf/w.swf?w=swf/vp1&e=1340255540&f=10mFH15tm8Wyv1UT85DhEA&d=72&m=p&r=360p&volume=100&start_res=360p&i=m&ct=Click...To%20request%20more%20Info..&cu=http://schoolanduniversity.com/study_programs/more-information.php&options="></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed id="vp110mFH" src="http://static.animoto.com/swf/w.swf?w=swf/vp1&e=1340255540&f=10mFH15tm8Wyv1UT85DhEA&d=72&m=p&r=360p&volume=100&start_res=360p&i=m&ct=Click...To%20request%20more%20Info..&cu=http://schoolanduniversity.com/study_programs/more-information.php&options=" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="432" height="240"></embed></object>
</pre>
Please guide.
Regards,
Mrinal Purohit
It seems like you are displaying the html entities for your embed code, you could try using html_entity_decode() to get around this. Of course a better solution would be to store the embed code in the correct format, ie not encoded as entities.

How would I make a playlist editor for mp3 flash object?

I have an mp3 player embedded into my site and would like to have a box on my site where they can edit playlist. I need to know, How would I begin to make a playlist editor in php for an mp3 flash object?
..So they may add songs/edit songs/delete song if posted , etc
<object style="position:absolute;top:1px;left:400px;z-index:12;" type="application/x-shockwave-flash" data="http://flash-mp3-player.net/medias/player_mp3.swf" width="200" height="20">
<param name="movie" value="http://flash-mp3-player.net/medias/player_mp3.swf" />
<param name="bgcolor" value="#94C0DF" />
<param name="FlashVars" value="mp3=http%3A//flash-mp3-player.net/medias/another_world.mp3&volume=50&showinfo=1&bgcolor=94C0DF&bgcolor1=B4E8FB&bgcolor2=B4E8FB&buttoncolor=330026&slidercolor1=888888&sliderovercolor=00d600" />
</object>
According to the user forum of "flash-mp3-player.net", you just serve up the playlist in a particular text format. So you'll want to use some kind of database to associate "playlists" with the "tracks" there, and when someone requests a given "playlist", you query that database and generate output of the correct format (as specified in the above URL) as the response.

XSPF Web Music Player and restarting music in surfing

I asked a question in this link;
Streaming music background
function music(){
$txt = '<object type="application/x-shockwave-flash"
data="http://***.com/slim.swf?&autoplay=true&repeat=true&shuffle=true&song_url=http: //***.com/music.mp3&"
width="200" height="20">
<param name="movie"
value="http://***.com/slim.swf?&autoplay=true&repeat=true&shuffle=true& song_url=http://***.com/music.mp3&" />
<img src="noflash.gif"
width="0" height="0" alt="" />
</object>';
echo $txt;
}
I have added this player with a simple php fonction. The player is working perfect but when page changes, the music restarts. I want that I will be continued.
What is wrong in code?
Update: Ah, so you are in fact using a player with an autoresume function. Well, then turn on the autoresume, will ya?
By default, autoresume is off. To turn it on, you need to add &autoresume=1 to the end of the player URL, as shown here: [...]
Old answer:
I'm afraid I think you got this wrong. The answerer in the other question was talking about creating a whole site in Flash, something that would enable you to have continuous background music.
It's not easy to get continuous music on a HTML page. Check out this question for some pointers.

What XSS/CSRF attacks (if any) to be aware of when allowing video embeds?

I've been assigned a project for a website where users will be allowed to upload video's (using a YouTube API) but more importantly (for me) they will also be allowed to submit video embed codes (from numerous video sites, YouTube, Vimeo, etc. etc.).
Having no experience with allowing users to embed video:
How can I best protect against cross site scripting and/or cross site request forgery attacks specifically for video embedding? What are some of the common pitfalls to watch for?
At a minumum I would think to strip all tags except <object>, <param> and <embed>. But I have a feeling this will not be enough, will it?
edit
Also:
Do you think allowing only known video domainnames in the <embed src= and <param name="movie" value= attributes is enough to prevent rogue flash movies from being embedded in those attributes?
/edit
If it is of importance, the environment will be:
PHP/Zend Framework
MySQL
Bonuspoints:
Is there a common minimum golden rule/code template for video embed codes that are valid across all video sites that I could use to filter the input?
First and most dangerous xss (?) is that flash can read your DOM... Don't embed videos on pages where user can input his/hers login data. Login forms should be separated.
Usually flash embeds uses code that looks similar to:
Youtube:
<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/AyPzM5WK8ys" />
<param name="wmode" value="transparent" />
<embed src="http://www.youtube.com/v/AyPzM5WK8ys"
type="application/x-shockwave-flash"
wmode="transparent" width="425" height="350" />
</object>
Vimeo:
<object width="400" height="225">
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10239065&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" />
<embed src="http://vimeo.com/moogaloop.swf?clip_id=10239065&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed>
</object>
<p>La Fete (HD - 2010) from Malcolm Sutherland on Vimeo.</p>
Metacafe:
<embed src="http://www.metacafe.com/fplayer/4317045/bmx_face_slide.swf" width="400" height="345" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="always" name="Metacafe_4317045"> </embed>
<br><font size = 1>BMX Face Slide - Free videos are just a click away</font>
Best solution for enabling embeded content is to strip tags with exception for embed, param, object and list of attributes from the the samples that can be used.
Remember, some attributes can run javascript code as well as anchor's href...
Edit:
Allowing only trusted sites in src and param's value attribute is kinda good way to prevent hAx0rs from doing bad things but it's not flawles. Another big thing: read more about allowScriptAccess. Its a Param's attribute you should remove or set to sameDomain / never. It will prevent SWF from running javascript :)
Why don't you just visit all the sites, save their embed code, and then only allow your users to submit the required site's parameters?

Categories