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 "../../libraries/subtitles";
|
||||||
|
@import "./vtt-subtitles";
|
||||||
|
|
||||||
.player
|
.player
|
||||||
{
|
{
|
||||||
|
@ -189,7 +189,7 @@ export class PlayerComponent implements OnInit
|
|||||||
document.getElementById("hover").classList.add("idle");
|
document.getElementById("hover").classList.add("idle");
|
||||||
document.documentElement.style.cursor = "none";
|
document.documentElement.style.cursor = "none";
|
||||||
}
|
}
|
||||||
}, 2000);
|
}, 1000);
|
||||||
|
|
||||||
document.addEventListener("fullscreenchange", () =>
|
document.addEventListener("fullscreenchange", () =>
|
||||||
{
|
{
|
||||||
@ -313,6 +313,7 @@ export class PlayerComponent implements OnInit
|
|||||||
|
|
||||||
$(document).unbind();
|
$(document).unbind();
|
||||||
$(window).unbind();
|
$(window).unbind();
|
||||||
|
document.exitFullscreen();
|
||||||
$('[data-toggle="tooltip"]').hide();
|
$('[data-toggle="tooltip"]').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -419,6 +420,7 @@ export class PlayerComponent implements OnInit
|
|||||||
track.label = subtitle.displayName;
|
track.label = subtitle.displayName;
|
||||||
track.srclang = subtitle.language;
|
track.srclang = subtitle.language;
|
||||||
track.src = subtitle.link.replace(".srt", ".vtt");
|
track.src = subtitle.link.replace(".srt", ".vtt");
|
||||||
|
track.classList.add("subtitle_container");
|
||||||
track.default = true;
|
track.default = true;
|
||||||
track.onload = () =>
|
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
|
namespace Kyoo.Controllers
|
||||||
{
|
{
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
//[ApiController]
|
[ApiController]
|
||||||
public class SubtitleController : ControllerBase
|
public class SubtitleController : ControllerBase
|
||||||
{
|
{
|
||||||
private readonly ILibraryManager libraryManager;
|
private readonly ILibraryManager libraryManager;
|
||||||
@ -133,7 +133,10 @@ namespace Kyoo.Controllers
|
|||||||
line = null;
|
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.
|
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.Replace(',', '.');
|
||||||
|
line += " line:93%";
|
||||||
|
}
|
||||||
|
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user