Archived
1
0
This repository has been archived on 2026-04-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
FoxTube/FoxTube/Classes/Caption.cs
T
Michael Gordeev f637c18e22 Merged PR 17: Version 0.2.181021
- 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
2018-10-20 22:03:04 +00:00

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;
}
}
}