Darghon Posted August 13, 2010 Share Posted August 13, 2010 Title is pretty much what I want to achieve. so there's an iframe on a page, and I want to extract the embedded audio data within it, is this possible with javascript? any tutorials or tips and tricks? and also, if any more background information is needed, do ask. Quote Link to comment https://forums.phpfreaks.com/topic/210641-extracting-sound-from-an-iframe/ Share on other sites More sharing options...
RussellReal Posted August 13, 2010 Share Posted August 13, 2010 is this iframe pointed to a document under your domain? javascript implements a sort of "security feature" for developers to prevent data being parsed/modified thru javascript unless it is across the same domain.. however.. if you're looking to parse an embed tag from another website.. you can do the parsing from php and then request that data with javascript via an XMLHttpRequest object (AJAX) Quote Link to comment https://forums.phpfreaks.com/topic/210641-extracting-sound-from-an-iframe/#findComment-1099005 Share on other sites More sharing options...
Darghon Posted August 16, 2010 Author Share Posted August 16, 2010 The source of the IFrame is on the same domain, and what I want to do, is fetch that data into javascript and submit it to localhost or whatever so I can manipulate the data. the headers of the iframe are as follows (not sure if they'll be helpfull): Proxy-Connection Keep-Alive Connection Keep-Alive Content-Length 9874 Via 1.1 INTRACTO-FW Expires Thu, 19 Nov 1981 08:52:00 GMT Date Mon, 16 Aug 2010 06:11:16 GMT Content-Type audio/mepeg Server nginx Pragma no-cache Cache-Control no-store, no-cache, must-revalidate Content-Disposition attachment; filename="validate.mp3" Content-Transfer-Encoding binary Quote Link to comment https://forums.phpfreaks.com/topic/210641-extracting-sound-from-an-iframe/#findComment-1099730 Share on other sites More sharing options...
RussellReal Posted August 16, 2010 Share Posted August 16, 2010 uhm.. you shouldn't do the iframe method then well the way you want to you shouldn't .. you could however load the iframe and use the bgsound attribute.. or make a very simple flash mp3 player, and actually PLAY it with the iframe.. because with an iframe you can manipulate the DOM of the iframe but you can't take just the data within it.. and even if you could find a way you can't use the source of an mp3 to play that file Quote Link to comment https://forums.phpfreaks.com/topic/210641-extracting-sound-from-an-iframe/#findComment-1099795 Share on other sites More sharing options...
Darghon Posted August 16, 2010 Author Share Posted August 16, 2010 It's more like comparing the data, than listening to it. so I basicly want the, in this case, swf file, so I can compare what data is in it Quote Link to comment https://forums.phpfreaks.com/topic/210641-extracting-sound-from-an-iframe/#findComment-1099796 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.