Created
May 11, 2013 03:30
-
-
Save jlewin/5558794 to your computer and use it in GitHub Desktop.
Extract the swf url from an embed tag at screencast.com:
http://www.screencast.com/users/jlewin/folders/Jing/media/fb0eb212-aab2-44fa-a3e1-f3de484ba5c0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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