0

According to the APIs I should be able to skip grooveshark using the following...

window.Grooveshark.next()

However, I get that Grooveshark is undefined... Could this have something to do with me embedding it?

<object id="groovy" type="text/html" data="http://grooveshark.com/" style="width:100%; height:400px; margin:1%;">
</object>

Any ideas?

Diodeus - James MacFarlane
  • 112,730
  • 33
  • 157
  • 176
Jackie
  • 21,969
  • 32
  • 147
  • 289

1 Answers1

0

From the documentation:

You can use a bookmarklet or extension/addon to inject JS into the page and use the methods available.

It looks like you are trying to access the API through JS in a page that embeds http://grooveshark.com/. This won't work.

You would need to access the window object of the embedded page, not the outer page. There are methods for communicating across frames, but since the page is on a different domain, you run into security restrictions.

You cannot access the API when it is embedded in a regular webpage. You have to use an extension (which has different security privileges) or a bookmarklet (which executes in the context of the page the user is viewing).

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335