mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
FInishing support of webvtt (subrip transcoded).
This commit is contained in:
parent
cb306d6a34
commit
6534ea2e99
@ -1,4 +1,5 @@
|
||||
@import "../../libraries/subtitles";
|
||||
@import "./vtt-subtitles";
|
||||
|
||||
.player
|
||||
{
|
||||
|
@ -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 = () =>
|
||||
{
|
||||
|
5
Kyoo/ClientApp/src/app/player/vtt-subtitles.scss
Normal file
5
Kyoo/ClientApp/src/app/player/vtt-subtitles.scss
Normal 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;
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user