Skip to content

Commit

Permalink
Merge pull request #6777 from ThibaultNocchi/fix/webvtt_region
Browse files Browse the repository at this point in the history
  • Loading branch information
cvium committed Nov 4, 2021
2 parents e3e6953 + f91839d commit a870f4c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions MediaBrowser.MediaEncoding/Subtitles/VttWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@ public void Write(SubtitleTrackInfo info, Stream stream, CancellationToken cance
{
writer.WriteLine("WEBVTT");
writer.WriteLine();
writer.WriteLine("REGION");
writer.WriteLine("id:subtitle");
writer.WriteLine("width:80%");
writer.WriteLine("lines:3");
writer.WriteLine("regionanchor:50%,100%");
writer.WriteLine("viewportanchor:50%,90%");
writer.WriteLine("Region: id:subtitle width:80% lines:3 regionanchor:50%,100% viewportanchor:50%,90%");
writer.WriteLine();
foreach (var trackEvent in info.TrackEvents)
{
Expand All @@ -39,7 +34,7 @@ public void Write(SubtitleTrackInfo info, Stream stream, CancellationToken cance
endTime = startTime.Add(TimeSpan.FromMilliseconds(1));
}

writer.WriteLine(@"{0:hh\:mm\:ss\.fff} --> {1:hh\:mm\:ss\.fff} region:subtitle", startTime, endTime);
writer.WriteLine(@"{0:hh\:mm\:ss\.fff} --> {1:hh\:mm\:ss\.fff} region:subtitle line:90%", startTime, endTime);

var text = trackEvent.Text;

Expand Down

0 comments on commit a870f4c

Please sign in to comment.