f637c18e22
- Closed captions fixes - Merged to YoutubeExplode instead of MyToolkit for video sources - Video playback fixes - Internal links support - Subscription button fixed - Comments threads fixes and improvements (highlighting author's and user's names) - General bug fixes
34 lines
890 B
C#
34 lines
890 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace FoxTube.Classes
|
|
{
|
|
public class Caption
|
|
{
|
|
public TimeSpan Start { get; private set; }
|
|
public TimeSpan Duration { get; private set; }
|
|
public TimeSpan End
|
|
{
|
|
get { return Start + Duration; }
|
|
}
|
|
public string Text { get; private set; }
|
|
|
|
public Caption(int startTime, int duration, string text)
|
|
{
|
|
Start = TimeSpan.FromMilliseconds(startTime);
|
|
Duration = TimeSpan.FromMilliseconds(duration);
|
|
Text = text;
|
|
}
|
|
|
|
public Caption(double startTime, double duration, string text)
|
|
{
|
|
Start = TimeSpan.FromSeconds(startTime);
|
|
Duration = TimeSpan.FromSeconds(duration);
|
|
Text = text;
|
|
}
|
|
}
|
|
}
|