1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update login

This commit is contained in:
Luke Pulverenti 2016-02-24 22:15:07 -05:00
parent 3c9e6e0374
commit 08122a5e93
36 changed files with 2845 additions and 2228 deletions

View file

@ -25,27 +25,28 @@ class CEA708Interpreter {
{
var VTTCue = window.VTTCue || window.TextTrackCue;
this.cue = new VTTCue(-1, -1, '');
this.cue.text = '';
this.cue.pauseOnExit = false;
var cue = this.cue = new VTTCue(-1, -1, '');
cue.text = '';
cue.pauseOnExit = false;
// make sure it doesn't show up before it's ready
this.startTime = Number.MAX_VALUE;
cue.startTime = Number.MAX_VALUE;
// show it 'forever' once we do show it
// (we'll set the end time once we know it later)
this.cue.endTime = Number.MAX_VALUE;
cue.endTime = Number.MAX_VALUE;
this.memory.push(this.cue);
this.memory.push(cue);
}
clear()
{
if (this._textTrack && this._textTrack.cues)
var textTrack = this._textTrack;
if (textTrack && textTrack.cues)
{
while (this._textTrack.cues.length > 0)
while (textTrack.cues.length > 0)
{
this._textTrack.removeCue(this._textTrack.cues[0]);
textTrack.removeCue(textTrack.cues[0]);
}
}
}
@ -59,15 +60,15 @@ class CEA708Interpreter {
var count = bytes[0] & 31;
var position = 2;
var byte, ccbyte1, ccbyte2, ccValid, ccType;
var tmpByte, ccbyte1, ccbyte2, ccValid, ccType;
for (var j=0; j<count; j++)
{
byte = bytes[position++];
tmpByte = bytes[position++];
ccbyte1 = 0x7F & bytes[position++];
ccbyte2 = 0x7F & bytes[position++];
ccValid = ((4 & byte) === 0 ? false : true);
ccType = (3 & byte);
ccValid = ((4 & tmpByte) === 0 ? false : true);
ccType = (3 & tmpByte);
if (ccbyte1 === 0 && ccbyte2 === 0)
{
@ -287,9 +288,9 @@ class CEA708Interpreter {
}
}
_fromCharCode(byte)
_fromCharCode(tmpByte)
{
switch (byte)
switch (tmpByte)
{
case 42:
return 'á';
@ -325,7 +326,7 @@ class CEA708Interpreter {
return '█';
default:
return String.fromCharCode(byte);
return String.fromCharCode(tmpByte);
}
}
@ -343,11 +344,11 @@ class CEA708Interpreter {
this._has708 = true;
}
for (var i=0; i<this.memory.length; i++)
for(let memoryItem of this.memory)
{
this.memory[i].startTime = timestamp;
this._textTrack.addCue(this.memory[i]);
this.display.push(this.memory[i]);
memoryItem.startTime = timestamp;
this._textTrack.addCue(memoryItem);
this.display.push(memoryItem);
}
this.memory = [];
@ -356,9 +357,9 @@ class CEA708Interpreter {
_clearActiveCues(timestamp)
{
for (var i=0; i<this.display.length; i++)
for (let displayItem of this.display)
{
this.display[i].endTime = timestamp;
displayItem.endTime = timestamp;
}
this.display = [];