Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

JavaScript

Name: Anonymous 2010-12-25 20:02

I'm writing a basic streaming video downloader as an extension for Google Chrome and I'm trying to get the src url from an embedded object that plays a video using JavaScript.

I can get the <object> by doing document.getElementById("videoplayer"); but that's about as far as I can get. The embed doesn't have an ID or name, unfortunately. The object has several <param> tags and one of them is named "src" and it's value is the url I need. I've tried everything.

My first time trying to write anything JavaScript related. I'd appreciate any help you can offer.

Name: Anonymous 2010-12-25 20:06


<object id="videoplayer" classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab" width="720" height="300">
                        <param name="custommode" value="none">
                        <param name="autoPlay" value="true">
                        <param name="src" value="url">
                        <param name="showpostplaybackad" value="false" />
                        <param name="disableDimmer" value="false">
                        <param name="watchx" value="">
                        <param name="ref" value="">
                        <param name="movieTitle" value="4500282.avi" />

                        <param name="previewImage" value="http://s3.amazonaws.com/img.veehd.com/4500282_l2.jpg" />
                        <embed type="video/divx" src="url" previewImage="http://s3.amazonaws.com/img.veehd.com/4500282_l2.jpg" movieTitle="4500282.avi" custommode="none" showpostplaybackad="false" disabledimmer="true" autoplay="true" pluginspage="http://go.divx.com/plugin/download/" width="720" height="300">
</object>


This is an example of the object.

Name: Anonymous 2010-12-25 20:59

(function(){

  var params = document.getElementsByTagName("param"),
      urls = [];

  for (var i = 0, l = params.length; i < l; i++)
  {
    var elm = params[i],
        hasUrl = elm.getAttribute("src");

    if (hasUrl != null)
    {
      urls.push( elm.getAttribute("value") );
    }
  }

})();

Name: Anonymous 2013-01-19 23:06

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Name: Anonymous 2013-09-02 13:04


Don't change these.
Name: Email:
Entire Thread Thread List