JavaScript - Embed Videos - Different Url Based On Source Ip
I want to be able to display an embedded video on a web page but i want the URL to be different based on the source IP visting the web page.
Can this be done in javascript? Example: If someone from inside our network (one IP address on the outside) visits our external web page (hosted externally) visits a web page with one of the embedded videos the URL and code will serve up a locally hosted video. (WMV format) If someone outside our network (any other IP) visits our web site, they'll see embedded videos hosted on YouTube. Similar TutorialsHi, I would like to embed 2 or 3 videos in sequence in my orkut profile using the tags <embed>. It is possible? Code: 1<embed src="http://www.youtube-nocookie.com/v/iuczE8vIujc&autoplay=1"loop="true"type="application/x-shockwave-flash"allowscriptaccess="always" allowfullscreen="true" width="400" height="250"></embed>1 2<embed src="http://www.youtube-nocookie.com/v/UqqZm-D6WPo&autoplay=2" type="application/x-shockwave-flash"allowscriptaccess="always" allowfullscreen="true" width="400" height="250"></embed>2 For playing automatically? Regards FG hi to all i need an event based calender using open source how can i create is there any free open source event based calender is there user need to boook and block his dates and edit and book the dates for his requirements please suggest me regards kiran recently i noticed that all of my embedded JavaScript code and external style sheets are being shown IN "view source." this happens in all browsers ( IE, FF, Chrome, and Safari [windows]) ... oddly enough it only happens when viewing on my vista or win2k3 machines. is this something added to these OS's or the result of an installed program? has anyone seen this before? Very new to Javascript (been a HTML/CSS guy for a while, but never really got into more than tinkering with other other people's Javascript coding), but I came across a situation I can't find canned coding for, and trying to create it from bits and pieces I Googled has led me to a dead-end. In summary, I have a website that I frequently visit (FWIW, Firefox 3.x is my browser of choice) with many image sources referring to URLs that end with "-thumbnail.jpg". However, for better image quality, I am trying to use Greasemonkey to replace all instances of "-thumbnail.jpg" in the source of images on this site with "-bigthumbnail.jpg". The closest I could think of was to somehow use getElementsByTagName and innerHTML.replace, but realized that innerHTML does not do HTML, only content. Below is as far as I tried to get on my own, I appreciate any assistance from the folks here to help a JS novice like myself, thanks! Code: (function() { var as,ae; as = document.getElementsByTagName("img"); for (var i = 0; i < as.length; i++) { ae = as[i]; ae.innerHTML = ae.innerHTML.replace(/-thumbnail/gi, "-bigthumbnail"); } })(); please i want to know how to Upload video file of any extention and it converts to .flv like U-Tube?
I have an HTML document with an <embed> tag in order to play a video. <code> <embed src="someMovie.mpeg" autostart="false"</embed> </code> I want to be able to click on an image that is also in the document, and play the video that is associated with that image with an onclick action. In other words I want to load a different video than "someMovie.mpeg". I tried simply setting the src and autostart attributes of the embed tag to the new movie and true, but this does not play the new video. Is there a way I can do this? Hello everyone. I just came across a customer that wants me to place 1 video and 1 swf image player in the same place on there website. I tried this with a div layer where i put the video over the swf image but with a different monitor it would move. I did have a time out process of 2.1 mins. Does anyone know of any code that i could put in that would show the video for the time and when it finished it would show the swf images? If so can you tell me how to do this or help me with the code? If you need to see the current code it is simple just straight html done by a different coder. I would of done it with a css but he didn't want to. If you know of a way let me know. Hi Java is becoming big. Can I ask what is the best resources to learn java besides lynda.com? Thanks. R Hello, glad to be here!! So I am curious about a simple script to play a main video, with thumbnails below. What I am wanting is when you click on a thumb, it plays in the main video spot. Hope this isn't much, but donations are allowed if it is. Hello, I am trying to search some information about how to do a concept website like this: http://unfold.no/ Exactly what I want is something similar with vertical scroll but instead of images or the map I want that when you are going down the page you find a background video for example in the first area with an autoplay and if you are continue going down the video stops automatically. Not sure if there is any type of "control" when you can say: "When Video is on your screen auto-play and when dissapear from you screen stop. I am not sure if this is posible to do with Javascript or maybe with Flash. I have not found any example similar than this so not really sure if is a imposible fact. Thank you for your time hello Devs, i have a website that has lots of videos on it, the other day i saw a mouse over that showed a snippet of the youtube video, it had microsoft across the front it's since been deleted so i cannot show you an example, does anyone know where i can obtain this script please?
Hi guys.. I am just starting to learn JavaScript. I wanted to know how to have multiple hyperlinks (Containing links to Youtube Videos) that when clicked, cause the corresponding videos to play on the Youtube Player Embedded on the site. I hope my question is not too confusing. Thank you in advance! P.S. I saw some Source Code relating to this on StackOverflow and copied it and couldn't get it to work.. Here's my source code. Code: <html> <head> <title> Sample Page </title> <script> // Get element holding the video (embed or object) var player = document.getElementById("MOVIE"); //Create a simple function and check if player exists function play() { if(player) { player.playVideo(); } } </script> </head> <body> <object width="420" height="315"><param name="MOVIE" value="http://www.youtube.com/v/HsQIoPyfQzM?version=3&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/HsQIoPyfQzM?version=3&hl=en_US" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object> </br></br> <a href="http://youtu.be/sPvqNMb4StI" onclick="play()"> THIS IS FIRST Video Link </a></br></br> <a href="http://youtu.be/w7_Ccu21QVs" onclick="play()"> THIS IS SECOND Video Link </a> </body> </html> Is it possible to embed a pls link in javascript? I tried this but doesnt seem to work, what can i do? Code: function Play () { var path = '<embed src="http://www.link.com/music.pls" autostart="true" loop="false" hidden="true" height="0" width="0">'; document.getElementById (file).innerHTML = path + '<img src="images/stop.gif" style="cursor:pointer;" onclick="Stop(' + "'" + file + "'" + ')">'; } function Stop (file) { document.getElementById (file).innerHTML = '<img src="images/play.gif" style="cursor:pointer;" onclick="Play(' + "'" + file + "'" + ')">'; } My Problem is i have done following code document.getElementById('d').innerHTML = '<embed src="' + a + '" autostart="true" width="320" height="260" id="HelpVideos">' var y; y = this.document.getElementById('HelpVideos'); but as soon as i click the alert ok button the ebed tag takes its origenal values as it is in origenal html page please solve this i m messed up with this............. thanks in advance Hello all, I'm looking for a Market stock bar similar to http://www.bloomberg.com/ I've been looking around and can't find any API's or examples. Could someone point me in the right direction? I have the following code for an embed that I would like to add to my site. However, the embed is too large for the box I am trying to put it in on my social network. I tried to add height/width parameters, but it did not work. Is there a way to modify the size? Thanks!!! <div id="wb-9ez75d"></div><script type="text/javascript" src="http://flockdraw.com/embed/9ez75d"></script> I have a piece of code which I suppose to click on to activate: Code: <a href ="javascript:(function() { newwindow = window.open(); newwindow.document.write('<html><head><title>Your new title here</title></head>'); newwindow.document.write('<body><embed src = 'http://www.flashppt.com/images/tangramone.swf' height='100%' width='100%'></embed></body></html>'); } )();"> Run flash popup </a> I have spent a very long time looking at it but I still can't figure it out. The problem is with line with <embed> tag. My purpose is to open a swf flash in a new popup window such that it must have a Pretty title name (instead of its addresss). Since opening that SWF directly does not leave me the option of change the popup title , so I use the above method... I appreciate much if you can help ! Help! I am trying to get a ball within an image and then send the x, y coordinates to paypal. I'm almost there but the BALL.GIF wont go into the picture. Can anyone help me do this? The second script (getting the coordinates works perfectly.... I just cant figure out how to get the ball in the picture!!) Here's my code: [code] <script language="JavaScript"> function placeCrosshair(e) { var ch = document.getElementById('ball'); var pic = document.getElementById('myImg'); ch.style.left = e.x + 11; ch.style.top = e.y + 11; </script> <script language="JavaScript"> javascript&colonself.resizeTo(900,screen.availHeight);self.moveTo(40,0); var d = document; //Get the img X and Y positions with an onMouseOver event function getCoor(imgId) { x = event.offsetX?(event.offsetX):event.pageX-document.getElementById("clickImage").offsetLeft; y = event.offsetY?(event.offsetY):event.pageY-document.getElementById("clickImage").offsetTop; document.mypaypalform.item_name.value = "Ball position: x=" + x + "\ny=" + y; //this section writes out the coordinates on the page. var data = "<br><h3>Your selected ball position is: x =" + x + " and y =" + y + "</h3>"; if (mypaypalform.layers) { mypaypalform.layers.cust.document.write(data); mypaypalform.layers.cust.document.close(); } else { if (mypaypalform.all) { cust.innerHTML = data; } } } </script> <p></p> <a href="#" onClick="placeCrosshair(event)> <img src="ball.jpg" width="21" height="21" id="ball" /> <a href="#" onclick="getCoor('myImg')"> <img src="picture.jpg" alt="" border="0" height="600" width="850" name="myImg" ismap></a> <br><br> <h3>Click on the payment button to enter.</h3> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="mypaypalform"> <!-- Placeholder for dynamic form contents --> <span name=cust id=cust style="position:relative;"></span> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="buy@buy.co.uk"> <input type="hidden" name="item_name" value="Game - "> <input type="hidden" name="item_number" " value="1"> <input type="hidden" name="amount" value="0.50"> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="bn" value="PP-BuyNowBF"> <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_paynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> Thank you Al Hi All, I have a python script on server that automates a certain procedure. It is working fine on the server machine. But for accessing it I need to have a javascript for that. I have a python script named test.py Code: class autoTest(): def auto_ftp_download { } It automates a particular application when run through command line. I have an apache server setup on window XP. I want to have a python code (with embedded javascript on server) to launch this code on client machine once remotely accessed. Clicking on this script on server (test.py) shall start the automated procedure. I used subprocess.Popen but it wont work if remotely accessed. How can I use javascript to launch it? I tried opening notepad.exe using a javascript along with ActiveX object. So on server there was a script named runnotepad.py. Clicking on it reads another file(open("htdocs/test/Upload/wsgi_app/notepad.html", "rb").read()) in the same directory named as notepad.html (with javascript embedded). It worked fine. But I do not know how to make it available to a client to launch that python script (that automates the procedure) from the server?? Regards, Ejaz Shah I am using a javascript replace code to embed youtube videos in my forum. It works fine except users on iPhone or iPad can't see the videos. I would like to added the url to the video under the embed code - so these users can just click the link and see the vid on youtube. Here is the script in question: Code: z[x].innerHTML = z[x].innerHTML.split("[YOUTUBE]").join("<iframe width=560 height=410 src='").split("/watch?v=").join("/v/").split("[/YOUTUBE]").join("' frameborder=0 allowfullscreen></iframe>"); I am not very good with the split & join functions. Can someone help me out.. I would like the code to place the you tube video link like so: Code: z[x].innerHTML = z[x].innerHTML.split("[YOUTUBE]").join("<iframe width=560 height=410 src='").split("/watch?v=").join("/v/").split("[/YOUTUBE]").join("' frameborder=0 allowfullscreen></iframe>< br><a href="youtube video link">View on YouTube</a> "); |