FInishing support of webvtt (subrip transcoded).

This commit is contained in:
Zoe Roux 2019-09-19 23:16:41 +02:00
parent cb306d6a34
commit 6534ea2e99
4 changed files with 13 additions and 2 deletions

View File

@ -1,4 +1,5 @@
@import "../../libraries/subtitles";
@import "./vtt-subtitles";
.player
{

View File

@ -189,7 +189,7 @@ export class PlayerComponent implements OnInit
document.getElementById("hover").classList.add("idle");
document.documentElement.style.cursor = "none";
}
}, 2000);
}, 1000);
document.addEventListener("fullscreenchange", () =>
{
@ -313,6 +313,7 @@ export class PlayerComponent implements OnInit
$(document).unbind();
$(window).unbind();
document.exitFullscreen();
$('[data-toggle="tooltip"]').hide();
}
@ -419,6 +420,7 @@ export class PlayerComponent implements OnInit
track.label = subtitle.displayName;
track.srclang = subtitle.language;
track.src = subtitle.link.replace(".srt", ".vtt");
track.classList.add("subtitle_container");
track.default = true;
track.onload = () =>
{

View File

@ -0,0 +1,5 @@
::cue
{
background-color: transparent;
text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

View File

@ -12,7 +12,7 @@ using System.Threading.Tasks;
namespace Kyoo.Controllers
{
[Route("api/[controller]")]
//[ApiController]
[ApiController]
public class SubtitleController : ControllerBase
{
private readonly ILibraryManager libraryManager;
@ -133,7 +133,10 @@ namespace Kyoo.Controllers
line = null;
if (lastLine == null) //The line is a timecode only if the last line is an index line and we already set it to null.
{
line = line.Replace(',', '.');
line += " line:93%";
}
return line;
}