From 465f4c199a1a5acef632126d9f5cb60031646227 Mon Sep 17 00:00:00 2001 From: PeterTheOne Date: Wed, 28 Feb 2018 10:58:31 +0100 Subject: short direct-links --- contrib/site/index.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'contrib/site/index.html') diff --git a/contrib/site/index.html b/contrib/site/index.html index 19e2580..4cf4c4c 100644 --- a/contrib/site/index.html +++ b/contrib/site/index.html @@ -177,9 +177,13 @@ return this.baseUrl + '/' + this.path + '?' + parametersTmp.join('&'); }; - Model.prototype.getStreamUrl = function (thing, cache) { + Model.prototype.getStreamUrl = function (thing, cache, noBaseUrl) { cache = cache || false; - var url = this.config.streamBaseUrl + '/'; + noBaseUrl = noBaseUrl || false; + var url = ''; + if (!noBaseUrl) { + url += this.config.streamBaseUrl + '/'; + } switch(thing) { case 'webm': url += this.parameters.src + '-webm-' + @@ -293,11 +297,11 @@ function setDirectLinks(model) { $('#footer .direct-links') - .append('' + model.getStreamUrl('webm', true) + '
') - .append('' + model.getStreamUrl('hls', true) + '
') - .append('' + model.getStreamUrl('flash', true) + '
') - .append('' + model.getStreamUrl('ogg', true) + '
') - .append('' + model.getStreamUrl('mp3', true) + '
'); + .append('.../' + model.getStreamUrl('webm', true, true) + '
') + .append('.../' + model.getStreamUrl('hls', true, true) + '
') + .append('.../' + model.getStreamUrl('flash', true, true) + '
') + .append('.../' + model.getStreamUrl('ogg', true, true) + '
') + .append('.../' + model.getStreamUrl('mp3', true, true) + '
'); } var uri = parseLocationHref(); -- cgit v1.2.3