Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6982881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:20:47+00:00 2026-05-27T18:20:47+00:00

I making a script to convert all wmv avi mp3 wav mp4 etc links

  • 0

I making a script to convert all wmv avi mp3 wav mp4 etc links to play with the embedded jwplayer. The player loads but doesn’t play the video and instead displays the following error: Task Queue failed at step 5: Playlist could not be loaded due to cross-domain policy restrictions.

Searching online led me to realize that I need to have a file named crossdomain.xml or something like that hosted. Now since this is a script that is meant to run on any site I obviously can’t do that.

I thought of maybe inlining the entire player in a data uri. I tried that too like so: DEMO

This is the site that I took the player from: http://player.longtailvideo.com/player.swf

Is what I’m trying to do possible? I imagine it works like a data uri for an img. Am I missing something?

EDIT:!
Screen shot of the fabulous ;) GM script under test

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:20:48+00:00Added an answer on May 27, 2026 at 6:20 pm

    Data URIs do not work on <object> or <embed> nodes. That is why GM_getResourceURL() will not work for this either.

    Further, when using the direct <embed> method the player.swf file must reside on the same domain as the video or cross-site security will block the video load. This particular block may be built into this particular player.swf.

    However, when using Longtailvideo’s jwplayer.setup () function (which they recommend anyway), the player seems to work.

    You have to use a hosted version of the player, but luckily one is provided at http://player.longtailvideo.com/player.swf.
    It will give an NetworkError: 404 Not Found - http://someSite/crossdomain.xml error, but the video will play.

    Here’s a sample GM script that works:

    // ==UserScript==
    // @name     _Video embed fun
    // @include  http://YOUR_SITE/*
    // @require  http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
    // @require  http://player.longtailvideo.com/jwplayer.js
    // ==/UserScript==
    
    //--- Find all hyperlinks to select video files.
    var videoLinks  = $("a[href$='.mpg'], a[href$='.mp4'], a[href$='.wmv']");
    
    //--- For each video link, activate our video player.
    videoLinks.each ( function (J) {
        var jThis   = $(this);
        var vidURL  = jThis.attr ('href');
        var contID  = 'myVidContainer_' + J;
    
        jThis.after ('<div id="' + contID + '">Loading the player ...</div>');
    
        jwplayer (contID).setup ( {
            flashplayer:    "http://player.longtailvideo.com/player.swf",
            file:           vidURL,
            height:         344,
            width:          480
        } );
    } );
    


    Warnings:

    1. Certain media types (or that player) seem to have extra XSS “protection” built in. This means that .wmv files will not work, for example, while many .mp4 files do.

    2. The video file apparently must be in the exact same domain for this player. So target page foo.com\somepage.htm containing a video foo.com\somevid.mp4 will (usually) work, but if the video is cdn.foo.com\somevid.mp4, it won’t work.

    The only foolproof way to use this player, remains these two options:

    • Write your own Firefox addon that does not have the restriction against patching local files (player.swf), cross-domain, into the page. You could fork off of Greasemonkey or Scriptish code.

    • Have your GM script AJAX the video to your own server (which can be your local machine running XAMPP, etc.). Then said machine will serve the video and player.swf back to you, possibly in an <iframe>.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a script that convert rapidshare links to my domain links, example
im making some script with mechanize.browser module. one of problem is all other thing
I'm making a script that goes through a table that contains all the other
I'm making a script where I will be giving player numbers when the player
I am making a script that deletes all tables before recreating them with the
I'm making a script parser in python and I'm a little stuck. I am
I'm making the script for easy upload many files. I've tried fyneworks plugin ,
I'm making a script with ruby that must render frames at 24 frames per
Okay, so I am basically making a script to pass post data using cURL.
I'm making an automated script to read a list from a site posting the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.