Commit ce9e5bf6 authored by Lukáš Krupčík's avatar Lukáš Krupčík
Browse files

test ttyrec anselm login cluster

parent 560b431c
This diff is collapsed.
.terminal{font-family:monospace,monospace;cursor:text;line-height:initial}tty-player{border:2px solid #285577;border-top:1px solid #4c7899}tty-player .title{background:#285577;border-bottom:1px solid #4c7899;color:#fff;font-family:sans-serif;font-weight:bold;padding:.2em;line-height:1;height:1em;cursor:default}tty-player menu{display:none}tty-player{display:inline-block;position:relative}tty-player:not([controls]) tty-player-controls{display:none}tty-player-poster{background:rgba(53,47,47,0.5);opacity:.5;transition:opacity .2s linear;background-repeat:no-repeat;background-position:center;background-image:url("data:image/svg+xml,%3C?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3E%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='66'%20height='66'%3E%3Cfilter%20id='f'%3E%3CfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20.5%200'/%3E%3CfeGaussianBlur%20result='r'%20stdDeviation='2'/%3E%3CfeComposite%20in='SourceGraphic'%20in2='r'/%3E%3C/filter%3E%3Cpath%20fill='%23ddd'%20stroke='%23ccc'%20stroke-width='1'%20d='M33,5.5A27.5,27.5%200%200%200%205.5,33%2027.5,27.5%200%200%200%2033,60.5%2027.5,27.5%200%200%200%2060.5,33%2027.5,27.5%200%200%200%2033,5.5Zm-9.5,13%2025,14.5-25,14.5%200,-29z'%20filter='url(%23f)'/%3E%3C/svg%3E");position:absolute;top:0;left:0;right:0;bottom:0}tty-player[controls] tty-player-poster{bottom:28px}tty-player:hover tty-player-poster{opacity:1}tty-player-controls{position:absolute;left:0;right:0;bottom:0;background:rgba(53,47,47,0.5);opacity:0;display:flex;flex-direction:row;transition:opacity .2s linear;cursor:default}tty-player-controls.poster,tty-player:hover tty-player-controls{opacity:1}tty-player-controls input[type=range],tty-player-controls button{margin:0;padding:0;border:0;background:0;font:inherit;line-height:inherit;-moz-appearance:none;-webkit-appearance:none}tty-player-controls button{padding:0;background:0;opacity:.75;flex:0 1 auto;line-height:1;width:28px;height:28px}tty-player-controls button:hover{color:#777;opacity:1}tty-player-controls input[type=range]{flex:1;height:8px;margin:10px 5px}tty-player-controls button{background-repeat:no-repeat;background-position:center}tty-player-controls button.play{background-image:url("data:image/svg+xml,%3C?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3E%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='16'%3E%3Cpath%20fill='%23ccc'%20d='M0,0%200,16%2014,8Z'/%3E%3C/svg%3E")}tty-player-controls button.pause{background-image:url("data:image/svg+xml,%3C?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3E%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='16'%3E%3Cpath%20fill='%23ccc'%20d='M1,0L1,16L5,16L5,0L0,0zM9,0L9,16L13,16L13,0L9,0z'/%3E%3C/svg%3E")}tty-player-controls input[type=range]:focus{box-shadow:none;outline:0}tty-player-controls input[type=range]::-moz-range-track,tty-player-controls input[type=range]::-moz-range-thumb,tty-player-controls input[type=range]::-moz-range-progress{border-radius:4px;height:8px}tty-player-controls input[type=range]::-moz-range-track{background:rgba(255,255,255,0.5)}tty-player-controls input[type=range]::-moz-range-thumb{-moz-appearance:none;width:0;background:transparent;border:0;border-radius:0;box-shadow:0;position:relative}tty-player-controls input[type=range]::-moz-range-progress{background:#fff}input[type=range]{overflow:hidden}tty-player-controls input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;height:8px;background:rgba(255,255,255,0.5);//border-radius:4px}tty-player-controls input[type=range]::-webkit-slider-thumb:before{position:absolute;top:0;right:50%;left:-9999px;background:#fff;content:'';height:8px;pointer-events:none}tty-player-controls input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:0;height:0;position:relative}tty-player-controls .current-time{position:absolute;color:#ddd;background:#888;font-family:sans-serif;font-size:12px;display:block;box-shadow:0 1px rgba(0,0,0,0.5),0 1px 2px rgba(0,0,0,0.5),inset 0 1px rgba(255,255,255,0.2);padding:0 5px;line-height:16px;border-radius:4px;top:-7px}tty-player-controls .current-time::after{content:"";position:absolute;width:8px;height:8px;background:linear-gradient(-45deg,#888 50%,transparent 50%);box-shadow:1px 1px rgba(0,0,0,0.5),1px 1px 1px rgba(0,0,0,0.5);bottom:-3px;left:50%;margin-left:-5px;transform:rotate(45deg)}tty-player-controls .duration{font-family:sans-serif;font-size:12px;color:#999;line-height:18px;padding:5px}
\ No newline at end of file
This diff is collapsed.
var EVENTS = [
// HTMLMediaElement
"loadstart",
"progress",
"suspend",
"abort",
"error",
"emptied",
"stalled",
"loadedmetadata",
"loadeddata",
"canplay",
"canplaythrough",
"playing",
"waiting",
"seeking",
"seeked",
"ended",
"durationchange",
"timeupdate",
"play",
"pause",
"ratechange",
"resize",
"volumechange",
// HTMLTTYPlayerElement
"titlechange"
];
var PROPERTIES = [
// HTMLMediaElement
["error", null],
["src", "string"],
["currentSrc", null],
["crossOrigin", "string", 10],
["networkState", null],
["preload", "string", 8],
["buffered", null],
["readyState", null],
["seeking", null],
["currentTime", "number", "15ex"],
["duration", null],
["paused", null],
["defaultPlaybackRate", "number", "15ex"],
["playbackRate", "number", "15ex"],
["played", null],
["seekable", null],
["ended", null],
["autoplay", "boolean"],
["loop", "boolean"],
["mediaGroup", "string", 10],
["controller", "unsupported"],
["controls", "boolean"],
["volume", "number", "15ex"],
["muted", "boolean"],
["defaultMuted", "boolean"],
["audioTracks", null],
["videoTracks", null],
["textTracks", null],
// HTMLTTYPlayerElement
["defaultTitle", "string"],
["title", "string"],
["cols", null],
["rows", null],
["poster", "string"]
];
function makePropertyWidget(player, name, widgetType, extra) {
switch (widgetType) {
case "unsupported":
case null:
var span = document.createElement("span");
return [span, function() { span.textContent = player[name]; }];
case "string":
var input = document.createElement("input");
input.type = "text";
if (extra) {
input.size = extra;
}
input.onchange = function() {
player[name] = input.value;
};
return [input, function() { if (document.activeElement !== input) input.value = player[name]; }];
case "number":
var input = document.createElement("input");
input.type = "number";
input.step = "any";
if (extra) {
input.style.width = extra;
}
input.onchange = function() {
player[name] = +input.value;
};
return [input, function() { if (document.activeElement !== input) input.value = player[name]; }];
case "boolean":
var input = document.createElement("input");
input.type = "checkbox";
input.onclick = function() {
player[name] = input.checked;
};
return [input, function() { if (document.activeElement !== input) input.checked = player[name]; }];
}
}
function makePropertiesTable(player) {
var updaters = [];
var table = document.createElement("table");
table.className = "internals media-properties";
var caption = document.createElement("caption");
caption.textContent = "Media properties";
table.appendChild(caption);
var tbody = document.createElement("tbody");
table.appendChild(tbody);
var tr;
for (var i = 0; i < PROPERTIES.length; i++) {
if (i % 3 == 0) {
tr = document.createElement("tr");
tbody.appendChild(tr);
}
var name = PROPERTIES[i][0];
var th = document.createElement("th");
th.textContent = name;
var td = document.createElement("td");
if (name in player) {
td.className = "true";
var widget = makePropertyWidget(player, name, PROPERTIES[i][1], PROPERTIES[i][2]);
td.appendChild(widget[0]);
updaters.push(widget[1]);
} else {
td.className = "false";
}
tr.appendChild(th);
tr.appendChild(td);
}
setInterval(function() {
for (var i = 0; i < updaters.length; i++) {
updaters[i]();
}
}, 250);
return table;
}
function makeEventsTable(player) {
var table = document.createElement("table");
table.className = "internals media-events";
var caption = document.createElement("caption");
caption.textContent = "Media events";
table.appendChild(caption);
var tbody = document.createElement("tbody");
table.appendChild(tbody);
var tr;
for (var i = 0; i < EVENTS.length; i++) {
if (i % 5 == 0) {
tr = document.createElement("tr");
tbody.appendChild(tr);
}
var name = EVENTS[i];
var th = document.createElement("th");
th.textContent = name;
var td = makeEventCounter(player, name);
tr.appendChild(th);
tr.appendChild(td);
}
return table;
}
function makeEventCounter(element, name) {
var td = document.createElement("td");
var count = 0;
td.textContent = "0";
td.className = "false";
element.addEventListener(name, function() {
count++;
td.textContent = count;
td.className = "true";
});
return td;
}
addEventListener("DOMContentLoaded", function() {
var label = document.createElement("label");
label.id = "show-internals";
label.title = "Add with each <tty-player> element tables showing the event counts and property values.";
var toggle = document.createElement("input");
toggle.type = "checkbox";
toggle.onclick = function() {
document.body.classList[toggle.checked ? "add" : "remove"]("show-internals");
};
label.appendChild(toggle);
label.appendChild(document.createTextNode(" Show internals"));
document.querySelector("header h1").appendChild(label);
Array.prototype.forEach.call(document.querySelectorAll("tty-player"), function(player) {
var eventsTable = makeEventsTable(player);
var propertiesTable = makePropertiesTable(player);
player.parentNode.insertBefore(propertiesTable, player.nextSibling);
player.parentNode.insertBefore(eventsTable, player.nextSibling);
});
});
This diff is collapsed.
(function(){function G(a){return a instanceof Array||!q?decodeURIComponent(Array.prototype.map.call(a,function(a){return"%"+("0"+a.toString(16)).substr(-2)}).join("")):q.decode(a)}function y(a){a=/^data:([^,]*),([^#]+)/.exec(a);if(null===a)return null;var b=decodeURIComponent(a[2]),d=a[1].replace(/;base64$/,"");return[d,d===a[1]?b:atob(b)]}function H(a){if(!a)return{type:null};switch(/^(?:(.*):)?/.exec(a)[1]){case "npt":return(a=(a=/^(?:npt:)?(?:(?:(\d+):)?(\d+):)?(\d+(?:\.\d+)?)$/i.exec(a))?3600*
(a[1]||0)+60*(a[2]||0)+a[3]:null)?{type:"npt",time:a}:{type:null};case "data":if(a=y(a),/^text\/plain$/i.test(a[0]))return{type:"text",data:a[1]}}return{type:null}}function E(a){a|=0;var b=a/60|0;a=("0"+a%60).substr(-2);if(60<=b){var d=b/60|0,b=("0"+b%60).substr(-2);return d+":"+b+":"+a}return b+":"+a}function m(a){return{get:function(){return this.hasAttribute(a)},set:function(b){b?this.setAttribute(a,""):this.removeAttribute(a)}}}function I(a){function b(a,b){f.label=a;f.icon="data:image/svg+xml,%3C?xml version='1.0' encoding='UTF-8' standalone='no'?%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath stroke='%23999' stroke-width='1' fill='%23eee' d='"+
b+"'/%3E%3C/svg%3E"}function d(){b("Play","m2.5,2 0,12 11,-6z")}var c=document.createElement("menu");if(!("type"in c))return null;try{c.type="context"}catch(e){}if("context"!==c.type)return null;c.id="treplay-contextmenu-"+J++;var f=document.createElement("menuitem");f.onclick=function(){a.paused?a.play():a.pause()};d();a.addEventListener("play",function(){b("Pause","m2.5,1.5 0,13 4,0 0,-13zm7,0 0,13 4,0 0,-13z")});a.addEventListener("pause",d);var n=document.createElement("menuitem");c.aa=function(){n.label=
a.controls?"Hide Controls":"Show Controls"};c.aa();n.onclick=function(){a.controls=!a.controls};c.appendChild(f);c.appendChild(n);return c}function F(a){this.B=a}var q="TextDecoder"in window?new TextDecoder:null,r,k;r=function(a){Object.defineProperty(this,"code",{value:a})};r.prototype=Object.create(MediaError.prototype);var l=document.createElement("video").played;k=function(a){Object.defineProperty(this,"length",{value:a.length});this._=a};k.prototype=Object.create(TimeRanges.prototype);k.prototype.start=
function(a){return a<this.length?this._[a][0]:l.end(0)};k.prototype.end=function(a){return a<this.length?this._[a][1]:l.end(0)};var K={1:["MEDIA_ERR_ABORTED","The fetching process for the media resource was aborted by the user agent at the user's request."],2:["MEDIA_ERR_NETWORK","A network error of some description caused the user agent to stop fetching the media resource, after the resource was established to be usable."],3:["MEDIA_ERR_DECODE","An error of some description occurred while decoding the media resource, after the resource was established to be usable."],
4:["MEDIA_ERR_SRC_NOT_SUPPORTED","The media resource indicated by the \u001b[4msrc\u001b[24m attribute was not suitable."]},J=0,L=Terminal.prototype.reset;Terminal.prototype.reset=function(){L.call(this);"useFocus"in this.options&&!this.options.useFocus&&this.showCursor()};var c=F.prototype;c.ga=function(){var a=this,b=a.B;a.N=document.createElement("div");a.N.className="title";b.appendChild(a.N);a.D=new Terminal({useFocus:!1});a.D.on("title",function(a){b.title=a});a.D.open(b);b.addEventListener("error",
function(){var b=K[a.error.code];a.D.reset();a.D.write("\u001b]2;Error :-(\u0007\r\n\u001b[1mMediaError.\u001b[31m"+b[0]+"\u001b[m (numeric value "+a.error.code+")\r\n\r\n "+b[1]+"\r\n\r\n(Sorry \u2019bout that.)")});var d=+b.getAttribute("rows"),c=+b.getAttribute("cols");b.resize(0<c?c:b.cols,0<d?d:b.rows);a.defaultPlaybackRate=a.playbackRate=1;a.S=0;a.currentSrc="";a.readyState=0;a.networkState=0;a.paused=!0;a.duration=NaN;a.T=b.getAttribute("window-title")||"";a.V=document.createElement("tty-player-poster");
a.V.onclick=function(){b.play()};a.D.on("resize",function(){a.A("resize")});a.K=I(b);a.K&&(b.appendChild(a.K),b.setAttribute("contextmenu",a.K.id));a.G=document.createElement("tty-player-controls");var e=document.createElement("button");e.className="play";e.onclick=function(){b.paused?b.play():b.pause()};b.addEventListener("play",function(){e.className="pause"});b.addEventListener("pause",function(){e.className="play"});a.H=document.createElement("span");a.H.className="current-time";a.H.textContent=
"0:00";a.M=document.createElement("span");a.M.className="duration";a.M.textContent="0:00";a.C=document.createElement("input");a.C.type="range";a.C.value=0;a.C.min=0;a.C.step="any";var f=!1;a.C.addEventListener("input",function(){f||(f=!0,a.I=!0,b.currentTime=a.C.value,a.O(),f=!1)});a.C.addEventListener("change",function(){f||(f=!0,a.I=!1,b.currentTime=a.C.value,a.O(),f=!1)});b.addEventListener("durationchange",function(){a.C.max=a.duration;a.M.textContent=E(a.duration)});b.addEventListener("timeupdate",
function(){f||(f=!0,a.C.value=a.currentTime,a.O(),f=!1)});a.G.appendChild(e);a.G.appendChild(a.H);a.G.appendChild(a.C);a.G.appendChild(a.M);b.appendChild(a.V);b.appendChild(a.G);a.J=!0};Object.defineProperties(c,{J:{get:function(){return this.P},set:function(a){var b=this,d=b.P;a=!!a;var c=H(b.B.poster);b.P=!!a;var e=a&&!b.error;b.V.style.display=e?"":"none";b.G.classList[e?"add":"remove"]("poster");b.C.disabled=a;b.R();if(d!==a||b.da!==c)if(b.da=c,(d||a)&&b.L(),a)switch(c.type){case "npt":b.L();
var f=function(){if(a===b.P&&a){var d=b.currentTime,e=b.I;b.I=!0;b.currentTime=c.time;b.F=0;b.ba();b.I=e;b.currentTime=d}};if(b.data)f();else{var n=function(){b.B.removeEventListener("canplaythrough",n);f()};b.B.addEventListener("canplaythrough",n);b.Z()}break;case "text":b.L(),b.D.write(c.data)}}}});c.A=function(a){var b=document.createEvent("HTMLEvents");b.initEvent(a,!1,!1);a=this.B["on"+a];"function"===typeof a&&a(b);this.B.dispatchEvent(b)};c.R=function(){this.O();this.K&&this.K.aa()};c.O=function(){this.H.textContent=
E(this.currentTime);var a=this.C.offsetLeft-this.H.offsetWidth/2;isNaN(this.duration)||(a+=this.currentTime/this.duration*this.C.offsetWidth);this.H.style.left=a+"px"};c.Y=0;c.ba=function(){0<this.F&&this.data[this.F-1][1]>this.currentTime&&(this.L(),this.F=0);for(;this.F<this.data.length&&this.data[this.F][1]<=this.currentTime;)this.D.write(this.data[this.F][0]),this.F++;if(!this.I)if(this.currentTime>=this.duration&&0<this.playbackRate||0>=this.currentTime&&0>this.playbackRate)this.B.loop?this.B.currentTime=
0<this.playbackRate?0:this.duration:(this.A("timeupdate"),this.B.pause(),this.A("ended"));else{var a=+new Date;100<=a-this.Y&&(this.Y=a,this.A("timeupdate"))}};c.L=function(){this.D.reset();this.B.title=this.T};c.Z=function(){2>this.networkState&&this.$()};c.$=function(){this.L();this.W&&this.W.abort();2!==this.networkState&&1!==this.networkState||this.A("abort");if(0!==this.networkState){this.A("emptied");this.readyState=0;this.paused=!0;clearInterval(this.ca);var a=this.currentTime;this.F=this.currentTime=
0;0!==a&&this.A("timeupdate");this.data=null;this.duration=NaN}this.playbackRate=this.defaultPlaybackRate;this.error=null;this.fa()};c.fa=function(){var a=this;a.networkState=3;a.J=!0;var b=a.B.getAttribute("src");null===b?a.networkState=0:(a.networkState=2,a.A("loadstart"),""===b?a.X():(b=new URL(b.trim(),a.B.baseURI),a.currentSrc=b.toString(),setTimeout(function(){a.ea()},0)))};c.X=function(){this.error=new r(4);this.networkState=3;this.J=!0;this.A("error")};c.ea=function(){function a(){delete d.W}
function b(b,c){if(200===b.status){var e;try{var h;if(c){var f=b.responseText;h=[];for(var p=0;p<f.length;p++)h.push(f.charCodeAt(p)&255)}else h=b.response;for(var k=h instanceof Array,f=!0,p=null,m=[],g=0,l=0,r=k?h.length:h.byteLength;g<r;){var z,A,t;if(k)z=h[g]+(h[g+1]<<8)+(h[g+2]<<16)+(h[g+3]<<24),A=h[g+4]+(h[g+5]<<8)+(h[g+6]<<16)+(h[g+7]<<24),t=h[g+8]+(h[g+9]<<8)+(h[g+10]<<16)+(h[g+11]<<24);else{var B=new DataView(h,g);z=B.getUint32(0,!0);A=B.getUint32(4,!0);t=B.getUint32(8,!0)}var w=z+A/1E6,
g=g+12,u=k?h.slice(g,g+t):new Uint8Array(h,g,t),C;if(f)C=G(u);else{for(var D=u,q=[],v=0;v<D.length;v+=32768)q.push(String.fromCharCode.apply(null,D["subarray"in D?"subarray":"slice"](v,v+32768)));C=q.join("")}u=C;if(12===g){var l=w,x=/^\x1b%(G|@)\x1b\[8;([0-9]+);([0-9]+)t$/.exec(u);x&&(f="G"===x[1],p={rows:+x[2],cols:+x[3]})}w-=l;g+=t;m.push([u,w])}e={ia:1E8<=l?new Date(1E3*l):null,U:p,data:m}}catch(y){a();d.X();return}d.currentTime=0;d.F=0;d.data=e.data;d.duration=0===e.data.length?0:e.data[e.data.length-
1][1];d.A("durationchange");e.U&&d.B.resize(e.U.cols,e.U.rows);d.readyState=1;d.A("loadedmetadata");0<d.S&&(d.currentTime=d.S);d.S=0;d.A("progress");d.networkState=1;d.A("suspend");d.readyState=4;d.A("loadeddata");d.A("canplay");d.A("canplaythrough");a()}else a(),d.X()}var d=this,c;c=y(d.currentSrc);if(null!==c)b({status:200,responseText:c[1]},!0);else{var e=new XMLHttpRequest;"use-credentials"===d.B.crossOrigin?e.withCredentials=!0:"anonymous"===d.B.crossOrigin&&"mozAnon"in e&&(e.ha=!0);e.onabort=
a;e.open("GET",d.currentSrc);c=!("responseType"in e);e.responseType="arraybuffer";"arraybuffer"!==e.responseType&&(c=!0);c?(e.overrideMimeType("text/plain; charset=x-user-defined"),e.onreadystatechange=function(){4===e.readyState&&b(e,!0)}):e.onload=e.onerror=function(){b(e,!1)};d.W=e;try{e.send()}catch(f){b(e,void 0)}}};c=Object.create(HTMLElement.prototype);c.createdCallback=function(){this._=new F(this);this._.ga();"none"!==this.preload&&this.load();this.autoplay&&this.play()};c.attributeChangedCallback=
function(a){"src"===a&&this.hasAttribute("src")?(this.pause(),this.load()):"controls"===a&&this.hasAttribute("controls")?this._.R():"poster"===a&&(this._.J=this._.J)};c.attachedCallback=function(){this._.R()};Object.defineProperties(c,{error:{get:function(){return this._.error}},src:{get:function(){return this._.currentSrc},set:function(a){this.setAttribute("src",a)}},currentSrc:{get:function(){return this._.currentSrc}},crossOrigin:{get:function(){var a=this.getAttribute("crossorigin");return null===
a||"anonymous"===a||"use-credentials"===a?a:"anonymous"},set:function(a){null===a?this.removeAttribute("crossorigin"):"use-credentials"===a?this.setAttribute("crossorigin",a):this.setAttribute("crossorigin","anonymous")}},NETWORK_EMPTY:{value:0},NETWORK_IDLE:{value:1},NETWORK_LOADING:{value:2},NETWORK_NO_SOURCE:{value:3},networkState:{get:function(){return this._.networkState}},preload:{get:function(){var a=this.getAttribute("preload");return"none"===a||"metadata"===a||"auto"===a?a:"auto"},set:function(a){"none"===
a||"metadata"===a||"auto"===a?this.setAttribute("metadata",a):this.removeAttribute("metadata")}},buffered:{get:function(){return this.seekable}},HAVE_NOTHING:{value:0},HAVE_METADATA:{value:1},HAVE_CURRENT_DATA:{value:2},HAVE_FUTURE_DATA:{value:3},HAVE_ENOUGH_DATA:{value:4},readyState:{get:function(){return this._.readyState}},seeking:{value:!1},currentTime:{get:function(){return this._.currentTime},set:function(a){if(!this._.data)throw document.createElement("video").currentTime=1,void 0;this._.currentTime=
Math.max(0,Math.min(a,this.duration));this._.ba()}},duration:{get:function(){return this._.duration}},paused:{get:function(){return this._.paused}},defaultPlaybackRate:{get:function(){return this._.defaultPlaybackRate},set:function(a){a=+a;var b=this._.defaultPlaybackRate!==a;this._.defaultPlaybackRate=a;b&&this._.A("ratechange")}},playbackRate:{get:function(){return this._.playbackRate},set:function(a){a=+a;var b=this._.playbackRate!==a;this._.playbackRate=a;b&&this._.A("ratechange")}},played:{value:l},
seekable:{get:function(){return 4===this.readyState?new k([0,this.duration]):l}},ended:{get:function(){return this.paused&&this.currentTime===(0>this.playbackRate?0:this.duration)}},autoplay:m("autoplay"),loop:m("loop"),controls:m("controls"),defaultMuted:m("muted"),textTracks:{get:function(){return document.createElement("video").textTracks}},title:{get:function(){return this._.N.textContent},set:function(a){this._.N.textContent=a;this._.A("titlechange")}},defaultTitle:{get:function(){return this._.T},
set:function(a){this._.T=a;this._.A("titlechange")}},cols:{get:function(){return this._.D.cols}},rows:{get:function(){return this._.D.rows}},poster:{get:function(){return(this.getAttribute("poster")||"").trim()},set:function(a){this.setAttribute("poster",a)}}});c.load=function(){this._.$()};c.canPlayType=function(){return"maybe"};c.play=function(){function a(){c.ended&&(c.currentTime=0>c.playbackRate?c.duration:0);c._.J=!1;c._.paused=!1;var a=new Date;c._.ca=setInterval(function(){var b=new Date;
c._.I||(c.currentTime+=(b-a)/1E3*c.playbackRate);a=b},16);c._.A("play")}function b(){c.removeEventListener("loadeddata",b);a()}var c=this;this._.paused&&(this._.data?a():(this.addEventListener("loadeddata",b),this._.Z()))};c.pause=function(){this._.paused||(this._.paused=!0,clearInterval(this._.ca),this._.A("pause"))};c.volume=1;c.muted=!1;c.addTextTrack=function(){return null};c.ontitlechange=null;c.resize=function(a,b){this._.D.resize(a,b)};c.pretendToBeAVideo=function(){Object.defineProperties(this,
{tagName:{value:"VIDEO"},width:{get:function(){return this.offsetWidth},set:function(a){this.style.fontSize="100%";this.style.fontSize=a/this.offsetWidth*100+"%"}},height:{get:function(){return this.offsetHeight},set:function(a){this.style.fontSize="100%";this.style.fontSize=a/this.offsetHeight*100+"%"}},videoWidth:{get:function(){return this.width}},videoHeight:{get:function(){return this.height}}})};document.registerElement("tty-player",{prototype:c})})();
......@@ -2,6 +2,16 @@ site_name: Documentation
theme_dir: 'it4i_theme'
docs_dir: docs.it4i
extra_css:
- css/tty-player.css
- css/asciinema-player.css
extra_javascript:
- js/webcomponents-lite.min.js
- js/term.min.js
- js/tty-player.js
- js/asciinema-player.js
# Copyright
copyright: Copyright (c) 2016 IT4Innovations
......@@ -200,13 +210,6 @@ extra:
prev: 'Previous'
next: 'Next'
extra_css:
- css/tty-player.css
extra_javascript:
- js/webcomponents-lite.min.js
- js/tty-player.js
markdown_extensions:
- codehilite(css_class=code)
- admonition
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment