return true;
};
},
- urlContainerXPath: '//div[@id="Player"]',
+ urlContainerXPath: '//div[@id="silverlightControlHost" or @id="SilverlightPlayer"]',
urlRegexp: /mediaUri=(http:\/\/[^,]*)/,
onEvent: { evt: 'DOMNodeInserted', targetElement: 'object' },
processURL: _rai_get_actual_url,
- linkDestXPath: '//div[@id="Player"]',
+ linkDestXPath: '//div[@id="silverlightControlHost" or @id="SilverlightPlayer"]',
},
{
locationRegexp: /^http:\/\/soundcloud.com\/.*$/,
parser = new DOMParser();
xmlDoc = parser.parseFromString(text, "text/xml");
- ref = xmlDoc.getElementsByTagName('REF');
- if (ref.length > 0) {
- href = ref[0].getAttribute('HREF');;
+ // MMS streams
+ elems = xmlDoc.getElementsByTagName('REF');
+ if (elems.length > 0) {
+ href = elems[0].getAttribute('HREF');;
+
+ var evt = document.createEvent('Event');
+ evt.initEvent('UrlFetched', true, true);
+ evt.site = site;
+ evt.URL = href;
+ document.dispatchEvent(evt);
+ }
+ // SmoothStreaming streams
+ elems = xmlDoc.getElementsByTagName('playListItem');
+ if (elems.length > 0) {
+ href = elems[0].getAttribute('mediaSource');;
var evt = document.createEvent('Event');
evt.initEvent('UrlFetched', true, true);