|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Youtube provides embed code for users who want to embed Youtube video to their website. See the embed code provided by Youtube:
![]() You can just copy the code that Youtube provides to your website and the video should show>>>How to add flash video to website Last edited by shirley1874; 05-19-2009 at 07:17 AM. |
|
||||
|
Yes like I have done here (May take some time to load) DigitalNorway: The digital revolution is transforming the world. View Source.
It is very easy to upload your own video's to YouTube. They are automatically converted. YouTube now also support HD format. This http://www.avs4you.com/ is recommended by Google / YouTube. So I have improved since this http://www.webproworld.com/breakroom...tml#post397214 thread (with broken temporary links).
__________________
Mini Network:: Financial information at your fingertips Learn object oriented programming where it started Last edited by kgun; 05-19-2009 at 01:44 PM. |
|
|||
|
Quote:
KGun, you mention that You Tube now supports HD format. My question is, is it a good idea to shoot video in HD format or (with load times and all) is it better to shoot in a lower resolution format? A friend of mine is shooting video that he wants to get good search results on; will the spiders not like HD? |
|
||||
|
Quote:
|
|
||||
|
Offering 2 formats when you shoot HG is always a good idea.. I rarely watch HD stuff online because the bandwidth out here in the country isn't very good..
On the original question, page validation is not a requirement, its a suggestion.. If a page doesn't validate 100% but still renders for visitors, I wouldn't worry about it too much..
__________________
Steve : Animal Charms Animal Jewelry | Fishing Blog I'm smelling a whole lot of if coming off of this plan. |
|
|||
|
Quote:
OK, thanks, KGun, I will pass this along to my friend shooting the videos. |
|
|||
|
There are newer methods, but this one is tried and proven for a basic start. It's the 2006 Adobe version with some revision and adaptation thrown in:
Code:
//v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
if (src.indexOf('?') != -1)
return src.replace(/\?/, ext+'?');
else
return src + ext;
}
function AC_Generateobj(objAttrs, params, embedAttrs)
{
var str = '<object ';
for (var i in objAttrs) {
str += i + '="' + objAttrs[i] + '" ';
};
str += '>';
for (var i in params) {
str += '<param name="' + i + '" value="' + params[i] + '" /> ';
};
str += '<embed ';
for (var i in embedAttrs){
str += i + '="' + embedAttrs[i] + '" ';
};
str += '>';
document.write(str);
// document.write('</embed>');
// document.write('</object>');
}
function AC_FL_RunContent(){
var ret =
AC_GetArgs
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
, "application/x-shockwave-flash"
);
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_SW_RunContent(){
var ret =
AC_GetArgs
( arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
, null
);
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
var ret = new Object();
ret.embedAttrs = new Object();
ret.params = new Object();
ret.objAttrs = new Object();
for (var i=0; i < args.length; i=i+2){
var currArg = args[i].toLowerCase();
switch (currArg){
case "classid":
break;
case "pluginspage":
ret.embedAttrs[args[i]] = args[i+1];
break;
case "src":
case "movie":
args[i+1] = AC_AddExtension(args[i+1], ext);
ret.embedAttrs["src"] = args[i+1];
ret.params[srcParamName] = args[i+1];
break;
case "onafterupdate":
case "onbeforeupdate":
case "onblur":
case "oncellchange":
case "onclick":
case "ondblClick":
case "ondrag":
case "ondragend":
case "ondragenter":
case "ondragleave":
case "ondragover":
case "ondrop":
case "onfinish":
case "onfocus":
case "onhelp":
case "onmousedown":
case "onmouseup":
case "onmouseover":
case "onmousemove":
case "onmouseout":
case "onkeypress":
case "onkeydown":
case "onkeyup":
case "onload":
case "onlosecapture":
case "onpropertychange":
case "onreadystatechange":
case "onrowsdelete":
case "onrowenter":
case "onrowexit":
case "onrowsinserted":
case "onstart":
case "onscroll":
case "onbeforeeditfocus":
case "onactivate":
case "onbeforedeactivate":
case "ondeactivate":
case "type":
case "codebase":
ret.objAttrs[args[i]] = args[i+1];
break;
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "id":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
break;
default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
}
}
ret.objAttrs["classid"] = classid;
if (mimeType) ret.embedAttrs["type"] = mimeType;
return ret;
}
HTML Code:
<script src="PATH-TO-SCRIPT-DIRECTORY/AC_RunActiveContent.js" type="text/javascript"></script> <!--[if IE]> <script type="text/vbscript"> Function VBGetSwfVer(i) on error resume next Dim swControl, swVersion swVersion = 0 set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i)) if (IsObject(swControl)) then swVersion = swControl.GetVariable("$version") end if VBGetSwfVer = swVersion End Function </script> <![endif]-->
HTML Code:
<div id="content"> <h1>YouTube Video of the Week</h1> <noscript><div><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="425" height="344" id="youtubevideo"> <param name="allowScriptAccess" value="always" /> <param name="allowFullScreen" value="true" /> <param name="movie" value="http://www.youtube.com/v/e-yldqNkGfo" /> <param name="quality" value="high" /> <param name="wmode" value="transparent" /> </object> </div> <div class="alternate_content"> <p class="message"><a title="Return to Home page" href="/"><span>Scripting required to display this media.</span></a></p> <p class="home"><a href="/"><span> Home </span></a></p> </div></noscript> <script type="text/javascript"><!-- // Adobe script, adapted. // http://www.youtube.com/watch?v=e-yldqNkGfo // becomes this // http://www.youtube.com/v/e-yldqNkGfo AC_FL_RunContent( 'codebase','https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0', 'width','425', 'height','344', 'id','youtubevideo', 'align','middle', 'src','youtubevideo', 'quality','high', 'wmode','transparent', 'name','youtubevideo', 'allowscriptaccess','always', 'allowFullScreen','true', 'pluginspage','https://www.macromedia.com/go/getflashplayer', 'movie','http://www.youtube.com/v/e-yldqNkGfo ); //end AC code document.write('<\/embed><\/object>'); //--></script> <h2>• Food Fight •</h2> </div>
A large part of the process is determining which Flash version the user has installed, as well as which browser (to a degree, this is an older method). A number of sites weighed in on this method back in the day. I can't even remember all the considerations and workarounds that have been incorporated since then. The core is still relatively untouched, and bears the original name, should you wish to Google it, or look for a newer version. Note the conditional comment. This version requires the ActiveX object to fire in IE. The script is VB, and needs to be embedded, not placed in the external file. Order of execution of scripts is important, too, so be sure to load the AC javascript code first. More than this I cannot say, just now, but I'll bet you will find lots on the subject with a little looking. Ciao! Last edited by weegillis; 05-21-2009 at 11:59 PM. |
|
|||
|
An additional note:
HTML Code:
document.write('<\/embed><\/object>');
Code:
// document.write('</embed>');
// document.write('</object>');
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| YouTube Videos & CPA Programs | highbids | Marketing Strategies Discussion Forum | 0 | 02-21-2008 08:11 PM |
| YouTube Deleting Videos | incrediblehelp | Google Discussion Forum | 2 | 10-31-2006 11:52 AM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |