The pages structure has changed a little and smooth streaming links are
not behind the re-link infrastructure as well and so they need to be
processed.
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
- urlContainerXPath: '//div[@id="Player"]',
+ urlContainerXPath: '//div[@id="silverlightControlHost" or @id="SilverlightPlayer"]',
urlRegexp: /mediaUri=(http:\/\/[^,]*)/,
onEvent: { evt: 'DOMNodeInserted', targetElement: 'object' },
processURL: _rai_get_actual_url,
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\/.*$/,
},
{
locationRegexp: /^http:\/\/soundcloud.com\/.*$/,
parser = new DOMParser();
xmlDoc = parser.parseFromString(text, "text/xml");
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);
var evt = document.createEvent('Event');
evt.initEvent('UrlFetched', true, true);