mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
fix vtt with chrome
This commit is contained in:
parent
fc6af0506c
commit
cd59799340
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
@ -10,9 +11,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||||||
{
|
{
|
||||||
public void Write(SubtitleTrackInfo info, Stream stream, CancellationToken cancellationToken)
|
public void Write(SubtitleTrackInfo info, Stream stream, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var writer = new StreamWriter(stream);
|
using (var writer = new StreamWriter(stream, Encoding.UTF8, 1024, true))
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
var index = 1;
|
var index = 1;
|
||||||
|
|
||||||
@ -34,12 +33,6 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
|
||||||
{
|
|
||||||
writer.Dispose();
|
|
||||||
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
@ -9,9 +10,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||||||
{
|
{
|
||||||
public void Write(SubtitleTrackInfo info, Stream stream, CancellationToken cancellationToken)
|
public void Write(SubtitleTrackInfo info, Stream stream, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
var writer = new StreamWriter(stream);
|
using (var writer = new StreamWriter(stream, Encoding.UTF8, 1024, true))
|
||||||
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
writer.WriteLine("WEBVTT");
|
writer.WriteLine("WEBVTT");
|
||||||
writer.WriteLine(string.Empty);
|
writer.WriteLine(string.Empty);
|
||||||
@ -30,12 +29,6 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||||||
writer.WriteLine(string.Empty);
|
writer.WriteLine(string.Empty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
|
||||||
{
|
|
||||||
writer.Dispose();
|
|
||||||
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user