Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts

    Getting embedded Flash filename

    Anybody know how to get the name of a Flash (.flv) file from a downloaded object/embed code - when that code is loaded into an iframe? I'm referring to msnbc.com specifically: their video embeds use iframes (presumably to jam a viewport in everyone's client), and the iframe document spits out the proper object/embed element, generated via JS. You can view the filename via a FireFox extension or a DOM viewer, but I need to get it programmatically so the process can be automated (for non-techy users). Loading the url in a dummy iframe and attempting to parse the source violates same source restrictions. Would appreciate any suggestions!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    ::: bump :::

  • #3
    Regular Coder seco's Avatar
    Join Date
    Nov 2008
    Location
    Oregon
    Posts
    687
    Thanks
    6
    Thanked 79 Times in 77 Posts
    user firebug

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    Thanks ... that would be OK if the user - the poster who wished to embed the video in their response - had Firebug installed, or another Firefox utility which allowed them to read the filename. Problem is, I was hoping to automate the process, letting users run a favelet which would parse the embedding code (the one wrapped in the IFRAME, which the site's backend filters out) and get the .flv filename and insert it into a standard embedding "sandwich" (<object>..<embed>..</embed>..</object>) which could be added to the rest of the post. A standard third-party Flash player will be called to display the clip. Presumably this would all be done with JavaScript, regular expressions doing the parse/replace chores - bu JS can't simply read the filename from the IFRAME's document source (which appears to be generated by JavaScript as well) because of security restrictions. Here's a sample of the MSNBC embedding code that I need to eliminate the IFRAME from:

    Code:
    <div><iframe height="339" width="425" src="http://www.msnbc.msn.com/id/22425001/vp/32697037#32697037" frameborder="0" scrolling="no"></iframe><p style="font-size:11px; font-family:Arial, Helvetica, sans-serif; color: #999; margin-top: 5px; background: transparent; text-align: center; width: 425px;">Visit msnbc.com for <a style="text-decoration:none !important; border-bottom: 1px dotted #999 !important; font-weight:normal !important; height: 13px; color:#5799DB !important;" href="http://www.msnbc.msn.com">Breaking News</a>, <a href="http://www.msnbc.msn.com/id/3032507" style="text-decoration:none !important; border-bottom: 1px dotted #999 !important; font-weight:normal !important; height: 13px; color:#5799DB !important;">World News</a>, and <a href="http://www.msnbc.msn.com/id/3032072" style="text-decoration:none !important; border-bottom: 1px dotted #999 !important; font-weight:normal !important; height: 13px; color:#5799DB !important;">News about the Economy</a></p></div>
    ... and here's a sample of the JS in the served IFRAME document (view source on this):

    http://www.msnbc.msn.com/id/22425001...97037#32697037

    Nothing illicit going on here, just trying to bypass MSNBC's seizing a viewport on everyone's page instead of just making the object available for viewing ...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •