Skip to content

Instantly share code, notes, and snippets.

@jlewin
Created May 11, 2013 03:30
Show Gist options
  • Select an option

  • Save jlewin/5558794 to your computer and use it in GitHub Desktop.

Select an option

Save jlewin/5558794 to your computer and use it in GitHub Desktop.
function extractContentUrlFromFlashVars(){
var segments = $('#scPlayer param[name=flashVars]').attr('value').split('&'),
flashVars = {},
segment,
index;
for (var i = 0; i < segments.length; i++)
{
segment = segments[i];
index = segment.indexOf('=');
flashVars[segment.substring(0, index)] = segment.substring(index + 1);
}
return flashVars.content
}
extractContentUrlFromFlashVars();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment