Removed extrenuous .bak files, ensured newline at the end of files, and changed thrimbletrimmer to be separate from services.

pull/75/head
mg 5 years ago
parent 6edd224395
commit ae3d82026e

@ -21,7 +21,6 @@
thrimshim: true,
nginx: true,
postgres: true,
thrimbletrimmer: true,
},
// Twitch channel to capture
@ -65,6 +64,8 @@
authentication:: true, // set to false to disable auth in thrimshim
thrimbletrimmer:: "true", // set to "" to not have nginx serve thrimbletrimmer pages.
// Connection args for the database.
// If database is defined in this config, host and port should be postgres:5432.
db_args:: {
@ -87,7 +88,7 @@
google_creds:: "./google_creds.json",
// The URL to write to the sheet for edit links, with {} being replaced by the id
edit_url:: "http://thrimbletrimmer.codegunner.com/{}",
edit_url:: "http://thrimbletrimmer.codegunner.com/?id={}",
// The timestamp corresponding to 00:00 in bustime
bustime_start:: "1970-01-01T00:00:00Z",
@ -225,7 +226,6 @@
[if $.enabled.nginx then "nginx"]: {
# mapping of services to internal ports for nginx to forward
local forward_ports = {
thrimbletrimmer: 80,
restreamer: 8000,
downloader: 8001,
backfiller: 8002,
@ -242,6 +242,7 @@
for service in std.objectFields(forward_ports)
if service in $.enabled && $.enabled[service]
]),
THRIMBLETRIMMER: $.thrimbletrimmer
},
},

@ -14,11 +14,10 @@ LOCATIONS=$(
[ "$name" == "restreamer" ] && generate_location / "http://restreamer:$port"
# thrimshim takes any calls to thrimshim/
[ "$name" == "thrimshim" ] && generate_location /thrimshim "http://thrimshim:$port"
# thrimbletrimmer takes any calls to thrimbletrimmer/; serves content from /etc/nginx/html/thrimbletrimmer; requests to the plain URL get redirect to the dashboard page.
[ "$name" == "thrimbletrimmer" ] && echo -e "\t\tlocation = / { return 301 \$scheme://\$host/thrimbletrimmer/dashboard.html; }\n\t\tlocation /thrimbletrimmer { }"
# all services have metrics under /metrics/SERVICE, except for thrimebletrimmer
[ "$name" != "thrimbletrimmer" ] && generate_location "/metrics/$name" "http://$name:$port/metrics"
generate_location "/metrics/$name" "http://$name:$port/metrics"
done
[ -n "$THRIMBLETRIMMER" ] && echo -e "\t\tlocation = / { return 301 \$scheme://\$host/thrimbletrimmer/dashboard.html; }\n\t\tlocation /thrimbletrimmer { }"
)
cat > /etc/nginx/nginx.conf <<EOF

@ -244,4 +244,4 @@
getEvents().then(populateFilters).then(filterEvents).then(populateTable);
</script>
</body>
</html>
</html>

@ -160,4 +160,4 @@
}
</script>
</body>
</html>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,7 +0,0 @@
/**
* videojs-hls-quality-selector
* @version 0.0.8
* @copyright 2018 Chris Boustead (chris@forgemotion.com)
* @license MIT
*/
.video-js.vjs-hls-quality-selector{display:block}

File diff suppressed because one or more lines are too long

@ -1,7 +0,0 @@
/**
* videojs-hls-quality-selector
* @version 0.0.8
* @copyright 2018 Chris Boustead (chris@forgemotion.com)
* @license MIT
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],e):t.videojsHlsQualitySelector=e(t.videojs)}(this,function(i){"use strict";i=i&&i.hasOwnProperty("default")?i.default:i;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=(function(){function s(t){this.value=t}function t(i){var r,u;function l(t,e){try{var n=i[t](e),o=n.value;o instanceof s?Promise.resolve(o.value).then(function(t){l("next",t)},function(t){l("throw",t)}):a(n.done?"return":"normal",n.value)}catch(t){a("throw",t)}}function a(t,e){switch(t){case"return":r.resolve({value:e,done:!0});break;case"throw":r.reject(e);break;default:r.resolve({value:e,done:!1})}(r=r.next)?l(r.key,r.arg):u=null}this._invoke=function(o,i){return new Promise(function(t,e){var n={key:o,arg:i,resolve:t,reject:e,next:null};u?u=u.next=n:(r=u=n,l(o,i))})},"function"!=typeof i.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(t){return this._invoke("next",t)},t.prototype.throw=function(t){return this._invoke("throw",t)},t.prototype.return=function(t){return this._invoke("return",t)}}(),function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}),s=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},c=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},r={},t=i.registerPlugin||i.plugin,l=function(){function n(t,e){a(this,n),this.player=t,this.player.qualityLevels&&this.getHls()&&(this.createQualityButton(),this.bindPlayerEvents())}return n.prototype.getHls=function(){return this.player.tech({IWillNotUseThisInPlugins:!0}).hls},n.prototype.bindPlayerEvents=function(){this.player.qualityLevels().on("addqualitylevel",this.onAddQualityLevel.bind(this))},n.prototype.createQualityButton=function(){var n=this.player,t=function(t){function e(){return a(this,e),c(this,t.call(this,n,{title:n.localize("Quality")}))}return s(e,t),e.prototype.createItems=function(){return[]},e}(i.getComponent("MenuButton"));this._qualityButton=new t;var e=n.controlBar.children().length-2,o=n.controlBar.addChild(this._qualityButton,{componentClass:"qualitySelector"},e);o.addClass("vjs-quality-selector"),o.menuButton_.$(".vjs-icon-placeholder").className+=" vjs-icon-hd",o.removeClass("vjs-hidden")},n.prototype.getQualityMenuItem=function(l){var t=this.player;return new(function(r){function u(t,e,n,o){a(this,u);var i=c(this,r.call(this,t,{label:l.label,selectable:!0,selected:l.selected||!1}));return i.item=e,i.qualityButton=n,i.plugin=o,i}return s(u,r),u.prototype.handleClick=function(){for(var t=0;t<this.qualityButton.items.length;++t)this.qualityButton.items[t].selected(!1);this.plugin.setQuality(this.item.value),this.selected(!0)},u}(i.getComponent("MenuItem")))(t,l,this._qualityButton,this)},n.prototype.onAddQualityLevel=function(){for(var n=this,t=this.player,o=t.qualityLevels().levels_||[],i=[],e=function(e){if(!i.filter(function(t){return t.item&&t.item.value===o[e].height}).length){var t=n.getQualityMenuItem.call(n,{label:o[e].height+"p",value:o[e].height});i.push(t)}},r=0;r<o.length;++r)e(r);i.sort(function(t,e){return"object"!==(void 0===t?"undefined":u(t))||"object"!==(void 0===e?"undefined":u(e))?-1:t.item.value<e.item.value?-1:t.item.value>e.item.value?1:0}),i.push(this.getQualityMenuItem.call(this,{label:t.localize("Auto"),value:"auto",selected:!0})),this._qualityButton&&(this._qualityButton.createItems=function(){return i},this._qualityButton.update())},n.prototype.setQuality=function(t){for(var e=this.player.qualityLevels(),n=0;n<e.length;++n){var o=e[n];o.enabled=o.height===t||"auto"===t}this._qualityButton.unpressButton()},n}(),e=function(n){var o=this;this.ready(function(){var t,e;t=o,e=i.mergeOptions(r,n),t.addClass("vjs-hls-quality-selector"),t.hlsQualitySelector=new l(t,e)})};return t("hlsQualitySelector",e),e.VERSION="0.0.8",e});

@ -165,4 +165,4 @@ thrimbletrimmerResetLink = function() {
.then(data => { console.log(data); setTimeout(() => { window.location.reload() }, 500); })
.catch(error => { console.log(error); alert(error); });
}
};
};

@ -74,4 +74,4 @@ document.addEventListener('keydown', (event) => {
}
}
});
});

@ -89,4 +89,4 @@ getRealTimeForPlayerTime = function(discontinuities, playbackIndex) {
}
return new Date(streamStart.getTime()+playbackIndex*1000).toISOString();
};
};

@ -34,4 +34,4 @@ body.ultrawide .my-player-dimensions { width:100% !important; }
*:focus {
outline:none;
}
}

Loading…
Cancel
Save