HTML - Random Video Embed Code Help Requested
I have been using the script below to make it so that a random image is displayed every time the page is refreshed or accessed. It has worked very well, but what i am wondering is does anyone know how to make this code adapt to embedding video urls, so a random video would be displayed from the list whenever the site was accessed or reloaded? I have tried several variations without luck. I am not really a coder so most of what i do is trial by error, but i was hoping someone else might be able to point me in the right direction. Thank you!
Here is the code i am using for the random image generator: HTML Code: <SCRIPT language="Javascript"><!-- function image() { }; image = new image(); number = 0; // imageArray image[number++] = "<img src='First Image url' border='0'>" image[number++] = "<img src='Second Image url' border='0'>" increment = Math.floor(Math.random() * number); document.write(image[increment]); //--> </SCRIPT> Similar TutorialsI am trying to grab a video from an html page. Its not a normal piece of embed code that would be used with youtube. Any help is appreciated. --> Begin code if(typeof(_evpLoad) === 'undefined') { var _evpAssetsLoaded = false; function _evpLoad(url, callback) { if(_evpAssetsLoaded === true) { callback(); return; } var script = document.createElement('script'); script.type = 'text/javascript'; if(script.readyState) { script.onreadystatechange = function() { if (script.readyState == 'loaded' || script.readyState == 'complete') { script.onreadystatechange = null; _evpAssetsLoaded = true; callback(); } }; } else { script.onload = function() { _evpAssetsLoaded = true; callback(); }; } script.src = "http://player.affiliatedotcom.com/player/"+url; document.getElementsByTagName("head")[0].appendChild(script); } } if(typeof(_evpStorage) === 'undefined') var _evpStorage = {}; _evpStorage['bWVkaWEtbWVudG9ycy13ZWVrLTMtd2ViaW5hci0xLm1wNA=='] = {"absolute":"http:\/\/player.affiliatedotcom.com\/","id":"evp-6792edc2f91c81a8da6278a028e3ea1e","div_id":"evp-094b566ec1a42cdc6eecad88387a3342","bucket_name":"evp-4c6a35f2d8d64-1432ff204174466a210d20e6fae5c4c3","file_id":"bWVkaWEtbWVudG9ycy13ZWVrLTMtd2ViaW5hci0xLm1wNA==","type ":"video","skin":{"tooltipColor":"#5F747C","buttonColor":"#808080","buttonOverColor":"#7d7d7d","bord erRadius":"5","volumeSliderGradient":"none","backgroundGradient":"none","tooltipTextColor":"#ffffff" ,"sliderColor":"#000000","timeBgColor":"#555555","sliderGradient":"none","durationColor":"#ffffff"," progressGradient":"medium","progressColor":"#46a8ec","bufferGradient":"none","timeColor":"#80cbff"," volumeSliderColor":"#000000","backgroundColor":"#212121","bufferColor":"#454545","height":24,"opacit y":1},"finish":"0","local":null,"cloudfront":"d1y9lu9mznaao3.cloudfront.net","splash":true,"splash_i mage":"http:\/\/evp-4c6a35f2d8d64-1432ff204174466a210d20e6fae5c4c3.s3.amazonaws.com\/media-mentors-week-3-webinar-1-splash.png","data":{"width":"640","height":"360","affiliate_id":"","button_text_color":"#FFFFFF","bu tton_body_color":"#000000","html_body_color":"#000000","simple_page_name":"","button_body_translucen t":"true","html_body_translucent":"true","skin":"electric_blue","target":"bWVkaWEtbWVudG9ycy13ZWVrLT Mtd2ViaW5hci0xLm1wNA==","scaling":"orig","shadows":"true","autoPlay":true,"autoBuffering":"true","al low_fullscreen":"true","control_type":"show","promote_software":"","finish":"0","simple_page":"","us e_conversions":"0","use_upsells":"0","source":"bW9kdWxlNHBhcnQxNS0xLmZsdg==","splash":"http:\/\/evp-4c6a35f2d8d64-1432ff204174466a210d20e6fae5c4c3.s3.amazonaws.com\/media-mentors-week-3-webinar-1-splash.png"}}; _evpStorage['bWVkaWEtbWVudG9ycy13ZWVrLTMtd2ViaW5hci0xLm1wNA=='].embed_code = "<div id="evp-094b566ec1a42cdc6eecad88387a3342-wrap" class="evp-video-wrap"></div><script type="text/javascript" src="http://player.affiliatedotcom.com/fr...><script type="text/javascript">_evpInit('bWVkaWEtbWVudG9ycy13ZWVrLTMtd2ViaW5hci0xLm1wNA==');</script>"; _evpStorage['bWVkaWEtbWVudG9ycy13ZWVrLTMtd2ViaW5hci0xLm1wNA=='].div_id = 'evp-f7be0555750712ba6518ac333444e0d8'; _evpStorage['bWVkaWEtbWVudG9ycy13ZWVrLTMtd2ViaW5hci0xLm1wNA=='].alternate_embed = false; _evpStorage['bWVkaWEtbWVudG9ycy13ZWVrLTMtd2ViaW5hci0xLm1wNA=='].file_extension = 'mp4'; _evpStorage['bWVkaWEtbWVudG9ycy13ZWVrLTMtd2ViaW5hci0xLm1wNA=='].local_assets = ""; _evpStorage['bWVkaWEtbWVudG9ycy13ZWVrLTMtd2ViaW5hci0xLm1wNA=='].project_name = "EasyVideoPlayer Pro"; _evpStorage['bWVkaWEtbWVudG9ycy13ZWVrLTMtd2ViaW5hci0xLm1wNA=='].affiliate_url = "http://%s.webactix.hop.clickbank.net/"; if(typeof(_evpInit) === 'undefined') { function _evpInit(id) { _evpLoad('assets.php?v=1.1.14', function() { _evpGo(id); }); } } ---> end code Hi there!! Please I need help. I am embeding videos to mu blog, but are videos from a TV station so I took the code but is strange I can't make them stop. My users start to be upset about it. <p align="left"><script type="text/javascript"></script> <div id="flashcontent" style="width: 570px; text-align: center;"><script src="http://v.cctv.com/playcfg/js/common.js" type="text/javascript"></script> <object id="flvEmbed" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="360" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowScriptAccess" value="always" /><param name="wmode" value="window" /><param name="flashvars" value="id=/2009/2009/09/01/yingshikantaixi_h264418000nero_aac32_20090901_1251767366337&site=http://v.cctv.com&method=http&share=1" /><param name="src" value="http://v.cctv.com/playcfg/CCTVvideoplayer.swf" /><param name="allowfullscreen" value="true" /><embed id="flvEmbed" type="application/x-shockwave-flash" width="480" height="360" src="http://v.cctv.com/playcfg/CCTVvideoplayer.swf" allowfullscreen="true" flashvars="id=/2009/2009/09/01/yingshikantaixi_h264418000nero_aac32_20090901_1251767366337&site=http://v.cctv.com&method=http&share=1" wmode="window" allowscriptaccess="always"></embed></object> I will appreciate your help. thanks! How do I embed a flv and also an ivr file in html? Index of /assets/video By the way, right click and save those while you can. http://www.gelsana.com/assets/video/...logy_video.flv http://www.gelsana.com/assets/video/gm.ivr Hi: I have a videos embed in a html page like the code below. <EMBED TYPE="application/x-mplayer2" SRC="videos/bienvenido.avi" NAME="MediaPlayer" WIDTH="190" HEIGHT="190" ShowControls="1" ShowStatusBar="1" ShowDisplay="0" autostart="1" align="right"> </EMBED> Is there a way I can figure out when a user has clicked on the play of the video or when the video has been played until the end ? ( In html / javascript or php may be ) Thanks, Michael. saw some web pages where the video inside came from youtube The whole page was from their own site but the window that showed the video was from youtube. almost like a window into youtube for just that 1 part of the page can this be done with just html? area maps? I really need to do this. My host server gives problems when I embed a video, It would be great just to use youtube please help -marksmolen@mail.com Hi folks, I have two related questions so I'll ask both in the same post. My first question is I have a video that I show using the <embed> tag. For example <embed width="540" height="350" src='../media/movies/police_chief_intro.wmv' autostart=true> Now, the video plays fine but what I experience is one of the frames near the beginning is displayed first and the video played over top of it. The pain is the image is larger than the video. Another pain is it only really does this in Firefox. My second question is how do I remove the controls from the video player? I use the same code as above but add controller=false. They don't show in FF and perhaps some others but in Safari they are still displayed. Thanks in advance for any advice! Hello, I've done alot of seaching and haven't found to many articles on this. I would like to embed a youtube video on my site, but don't want to play the audio that goes with it. I tried adding &volume=0 after the tag, but this doesn't work. Any ideas!! Much thanks in advanced! here's the code used: <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" height="540" width="650"> <param name="allowScriptAccess" value="never" /> <param name="allowNetworking" value="internal" /> <param name="movie" value="http://www.youtube.com/v/aKuFww3ljM&ap=%2526fmt%3D18&loop=1&autoplay=1&volume=0" /> <param name="wmode" value="transparent" /> <embed type="application/x-shockwave-flash" allowScriptAccess="never" allowNetworking="internal" src="http://www.youtube.com/v/aKuFww3ljM&ap=%2526fmt%3D18&loop=1&autoplay=1&volume=0" height="540" width="650" wmode="transparent" /> </object> Hello, I have a client were working with. He uses myspace. He wants a youtube video to autoplay from youtube. He wants it to look sleek and doesn't want the controls buttons to show. I've read this is possible but can't get the div code right. It's an HD video and it's height="480" width="720". We came across this url: http://www.createblog.com/myspace-sc...eo-top_bottom/ and We found this code as an example it says: Where it says YOUTUBE URL HERE insert your youtube embed url, not the url of the YouTube page. Change the first 380 and the 230 to change the video's size and the -90 to position the video. **** <div style="width:380px; height:230px; overflow:hidden!important; text-align:center;"><br /> <object type="application/x-shockwave-flash" allowScriptAccess="never" allowNetworking="internal" height="410" width="380" style="position:relative; top: -90 px;" data=" YOUTUBE URL HERE "> <param name="allowScriptAccess" value="never" /> <param name="allowNetworking" value="internal" /> <param name="movie" value="YOUTUBE URL HERE" /> <param name="wmode" value="transparent" /> </object> </div> **** This is our code were tried but it is not working? can you please help us. Thank you in advanced. Our code we tried: **** <div style="width: 720 px; height: 480 px; overflow:hidden!important; text-align:center;"><br /> <object type="application/x-shockwave-flash" allowScriptAccess="never" allowNetworking="internal" height=" 410 " width=" 380 " style="position:relative; top: -90 px;" data=" http://www.youtube.com/v/vaKuFww3ljM&ap=%2526fmt%3D18&loop=1&controls=0&showinfo=0&autoplay=1&&iv_load_policy=3 "> <param name="allowScriptAccess" value="never" /> <param name="allowNetworking" value="internal" /> <param name="movie" value=" http://www.youtube.com/v/vaKuFww3ljM&ap=%2526fmt%3D18&loop=1&controls=0&showinfo=0&autoplay=1&&iv_load_policy=3 " /> <param name="wmode" value="transparent" /> </object> </div> **** I have this task as part of an HTML class project. It has to be done using the <embed> tag, and must repeat a wav file twice (playing it three times total). This is the code I'm using: <p> <embed src="background.wav" width="145" height="100" hidden="true" autostart="true" playcount="3" loop="3" /> </p> It doesn't loop at all in firefox, and in IE it loops constantly. If I remove the loop="3" attribute, it works properly in IE. Is there any way to get this working across browsers using the embed tag, or would a more complex method be needed? (such as javascript browser detection with browser specific code). I'm really stuck on this, any help would be really appreciated. I could not, for the life of me figure out a way to phrase a google search for this. So hopefully someone here can help me. Is there any way to have an imbedded quicktime player, that will play a multitude of links? I.e. this page http://www.thenewmonarchs.com/video.html I want to code it so that every link you click on will play in the embedded video. So basically, whatever video you choose will be played through the same spot. Hopefully that makes sense? I'm terrible at wording html related questions, so please be forgiving! Im sure this question has been asked many a time so sorry for asking it again, i have my own web site and would like to add a video section were people can upload clips as well as myself, can someone give me the html code for doing this. Thanks well i want to be able to input code that places a watermark/logo on the top right of my video . So i dont have to go and embed watermarks on each video .if anyone can tell me how this can be done please help i have done it before but it's been a while and i forgot the code i use to place a video is the following: Code: <embed src="http://(-------)/player.swf?file=http://(-----------).flv&image=http://(------------------)png&skin=http://(-------)/schoon.swf" true="true" quality="high" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="480" height="360"> </div> Hey everyone i need to know what is the code for video and music to put on my website. I had music on there before but now that i have firefox, it keeps saying download additional plugins, and i have them all. When i click to search for additional plugins, it says,, "no plugins found" Please help , thanks Hello, I'm looking to create a page where you have a section of the page (predefined) to show a main video and then images at the bottom that will change the video in the section. For example, when the page is launched, you have an area where you can click on that will launch the important video. Then, bellow this video, I would have 8 small images and when clicked on one of the images, a new video would be shown in that same predefined area. Basically, I'm looking for something like this: http://video.itworldcanada.com/ An area where videos are shown and link at the bottom where you can select the next video you want to see. Thanks in advance for your time!!! I have uploaded a video on to putfile but they dont display anycode for me to embed th e video into my site. So i opend up the page source and found the code they are using to embed the video on there page and i copyed and pasted this code onto my site and it was working fine. About 20 minutes latter i checked the site again and the video was not working so i checked there page source again and they had changed the src url of the video. How come they do this? and is there any way round this? Before anyone says i cannot upload to sites like youtube because my video doesnt display properly since it has to open in a windows media player. Hello folks, I don't know almost anything about html code. I was using this simple html code for years, anytime I needed to stream one of my videos. <html> <head> <title></title> </head> <body bgcolor=="000000"> <table width="1280" height="736" align="center"> <tr> <td><embed src="BGI.mov" height="736" width="1280" align="middle"controller="true"></td> </tr> </table> </body> </html> Video file has name BGI.mov and is located in the same folder as html. The problem is, that it takes forever for video to download, sometimes 6-8 minutes. here is the URL of html page: http://www.bcoutback.com/videos/bgi.html I have talked to QuickTime guys and they did not find anything wrong with the file and they suggested that this HTML code is no longer good. Apparently, there is now completely different way of embeding video files and it has to do with applying functions. So I am wondering if someone could give me some simple advise how to write this simple code in the modern way. Please, keep in mind that I am complete html beginner. Thank you so much for your help. Hi All, I am having issues with the following code from a video file (in html). Hoping you can help, I need to make the video start automatically. This video is from Tube Chop (Tube Chop is a similar service than you tube) and you can copy and paste the code from any video and paste is onto a website as an embedded file. I am trying to get the file to start automatically as soon as any user goes to the page (as opposed to having to click on the video). I know for you tube all you have to do is add "&autostart=1 and it works fine. But I tried to put this code below and it still doesn't work. Can someone assist? FYI - Pls note that the part that reads "&start=0&end=26" below was included on purpose so the video starts at the beginning and end after 26 seconds. The website added the code. I need to keep this rule while still getting the video to autostart. Code: <p> <object width="500" height="344"><param name="movie" value="http://swf.tubechop.com/tubechop.swf?vurl=SJyCGltS95k&start=0&end=26&cid=227694"></param><embed src="http://swf.tubechop.com/tubechop.swf?vurl=SJyCGltS95k&start=0&end=26&cid=227694" type="application/x-shockwave-flash" allowfullscreen="true" width="500" height="344"></embed></object></p> Thanks very much. Hello, Using the Greasemonkey script on Facebook, I was able to embed a video on my website. However, the code is not XHTML compliant (includes embed tags). The code is below. I've struggled trying to convert this into code using the object tag. is it possible? Can someone show me where I need to move each part of the existing code into an "object" based code? Thanks, Josh Code: <embed type="application/x-shockwave-flash" src="http://b.static.ak.fbcdn.net/swf/mvp.swf?7:136764" width="576" height="432" style="" id="so_mvp_swf_4962e86f49d3b2a98429149" name="so_mvp_swf_4962e86f49d3b2a98429149" bgcolor="#000000" quality="high" allowScriptAccess="always" scale="showall" allowFullScreen="true" wmode="window" flashvars="video_src=http%3A%2F%2Fvideo.ll.facebook.com%2Fvideo-ll-sf2p%2Fv1182%2F26%2F116%2F58389155428_4899.mp4&stage_width=756&stage_height=567&motion_log=%2Fvideo%2Fmotion_log.php&video_id=553535535428&video_length=408440&video_seconds=408&video_category=0&video_rotation=0&video_href=http%3A%2F%2Fwww.facebook.com%2Fvideo%2Fvideo.php%3Fv%3D58389155428&fbt_play_again=Play+Again&fbt_go_to_video=Go+to+Video&fbt_next_video=Next+Video&fbt_share=Share&video_player_type=video_player_permalink&video_width=756&video_height=567&slate_src=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fswf%2Fmvp_slate.swf%3F7%3A134155&tail_slate_src=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fswf%2Fmvp_tail_slate.swf%3F7%3A134155&next_video_url=http%3A%2F%2Fwww.facebook.com%2Fvideo%2Fvideo.php%3Fv%3D6637075428&video_owner_name=Becky+Draper-Vilimek&video_owner_href=http%3A%2F%2Fwww.facebook.com%2Fprofile.php%3Fid%3D6545535428&video_timestamp=Added+on+Thursday&video_title=Our+Wedding+-+September+13%2C+2008&thumb_url=http%3A%2F%2Fvthumb.ak.facebook.com%2Fvthumb-ak-sf2p%2Fv643%2F101%2F68%2F682235428%2Fb682244448_58389155428_1292.jpg&highqual_src=http%3A%2F%2Fvideo.ll.facebook.com%2Fvideo-ll-sf2p%2Fv247%2F26%2F116%2F58389155428_44340.mp4&lowqual_src=http%3A%2F%2Fvideo.ll.facebook.com%2Fvideo-ll-sf2p%2Fv1182%2F26%2F116%2F55355355428_4899.mp4&fbt_lowqual=View+in+Regular+Quality&fbt_highqual=View+in+High+Quality&highqual_is_on=1&string_table=http://static.ak.fbcdn.net/js_strings.php/t85501/en_US&swf_id=so_mvp_swf_4962e55435442a98429149"/> I am an Admin for a PC gaming clan ( |ESF| ), and we have several game servers. Our goal is to have a random "server of the day" widget on the main page of the site. Here is what we need it to do: > Show the same server for all visitors to the page > Show the same server for a 24 hour period, say from 12am - 11:59pm > Have the code editable in case we change/add/remove a server I have some experience in Vb6 and Vb.Net, but not much HTML. I would assume the code would be something similar to: Dim SOTD As New String (Server of the Day) "Server List" Dim s1 As New String (Server 1) Dim s2 As New String (Server 2) Dim s3 As New String (Server 3) If TimeOfDay Is 12:00am Then Show SOTD(Random Server from List) Until TimeOfDay Is 11:59pm End If I know that isn't close to HTML, but it should help get the overall point across. Any help to get us closer to this goal is MUCH appreciated. If I wasn't specific enough with the above information, please let me know what else you need to know. It's very late and I'm super tired. Thank you in advance. |