Current location: Hot Scripts Forums » General Community » Script Requests » Looking for a simple video-embed script/clause


Looking for a simple video-embed script/clause

Reply
  #1 (permalink)  
Old 08-05-09, 08:45 AM
a.jenery a.jenery is offline
Newbie Coder
 
Join Date: Aug 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Question Looking for a simple video-embed script/clause

Hi;

What is the or a standard script that you would include in a web page (html) for embedding a video clip, ideally, one that allows you to specify or alter the height and width in pixels?
This may seem like a silly-basic-question , but the number of free scripts that I have tried using that failed is so many, that I've lost count. Usually my editor (Dreamweaver), highlights them in yellow, indicating a missing tag or something...
I don't care if it's javascript, a basic html-type clause, so long as it works in a simple way...

Many thanks if anyone can help.
Reply With Quote
  #2 (permalink)  
Old 08-06-09, 08:39 AM
a.jenery a.jenery is offline
Newbie Coder
 
Join Date: Aug 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Any help would be appreciated...
Reply With Quote
  #3 (permalink)  
Old 08-06-09, 12:46 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
You can find plenty of help on the 'net.

Search for embed player html. Make sure it is described as cross-browser ready - meaning it will work with most browsers.

This embeds a player with javascript and then uses buttons to start and stop playing.

HTML Code:
<a href="javascript:StartMeUp()" title="listen" id="Preview" name="Preview"><img src="images/cp/16x16/actions/player_play.png" alt="listen" /></a><SCRIPT type="text/javascript">
var sAudioFile='name of audio file';

if(-1 != navigator.userAgent.indexOf("MSIE"))
{
document.write('<OBJECT id="Player" style="display:none" ');
document.write('classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"');
document.write('width=0 height=0><\/OBJECT>');
}
else if(-1 != navigator.userAgent.indexOf("Firefox"))
{
document.write('<OBJECT id="Player" ');
document.write('type="application/x-ms-wmp"');
document.write('width=0 height=0><\/OBJECT>');
}
var Player=document.getElementById('Player')
function StartMeUp ()
{
	if (sAudioFile!='')
                     {
	    Player.URL = sAudioFile;
                         Player.src=sAudioFile;
                     }
}
function ShutMeDown ()
{
    Player.controls.stop();
}
</SCRIPT>
You can adjust the height and width as necessary.
Reply With Quote
  #4 (permalink)  
Old 08-07-09, 05:31 AM
a.jenery a.jenery is offline
Newbie Coder
 
Join Date: Aug 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Many thanks, that's great help.
Reply With Quote
Reply

Bookmarks

Tags
embedding, script, simple, video


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 09:29 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.