From 64543786789ed1362565bcfdcdf0ad231aad10b1 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 1 Oct 2013 21:23:57 +0200 Subject: [PATCH] Add m3u8_android url too --- raitv.user.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/raitv.user.js b/raitv.user.js index f361dab..71b176e 100644 --- a/raitv.user.js +++ b/raitv.user.js @@ -35,7 +35,8 @@ function() { if (list && list[0]) { return list[0].content; } else { - var altname = name.toUpperCase().replace('VIDEO','video'); + var altname = name.toUpperCase().replace('VIDEO', + 'video').replace('ANDROID', 'android'); console.log(name, altname); console.log(window[name], window[altname]); return window[altname]; @@ -48,16 +49,21 @@ function() { wmv: getURL('videourl_wmv'), h264: getURL('videourl_h264'), m3u8: getURL('videourl_m3u8'), + m3u8_android: getURL('videourl_m3u8_android'), } function srctag(url, av, fmt) { if (!url) return '' ; - return '' + var f = null; + if (fmt != 'std') { + f = fmt.replace('_android',''); + } + return '' } function H5video(fmt) { - return srctag(urls[fmt], 'video', (fmt == 'std' ? null : fmt)); + return srctag(urls[fmt], 'video', fmt); } // create a link element for one of the page-wide media streams @@ -128,8 +134,8 @@ function() { // prevent other JS with messing with this element further sch.id = 'html5mediaHost'; sch.innerHTML = ""; console.log(sch, 'hacked'); -- 2.32.0.93.g670b81a890