Class Video
- Namespace
- Twikit
- Assembly
- Twikit.dll
動画。
public sealed class Video : Media
- Inheritance
-
Video
- Inherited Members
Examples
var tweet = await client.GetTweetByIdAsync("00000000000");
var video = (Video)tweet.Media[0];
await video.Streams[0].DownloadAsync("output.mp4");
Constructors
Video(IRequestClient, JsonObject)
public Video(IRequestClient client, JsonObject data)
Parameters
clientIRequestClientdataJsonObject
Properties
AspectRatio
アスペクト比。
public (int Width, int Height)? AspectRatio { get; }
Property Value
DurationMillis
再生時間(ミリ秒)。
public long? DurationMillis { get; }
Property Value
- long?
Streams
動画ストリームの一覧(content_type が video/ のもの)。
public List<Stream> Streams { get; }
Property Value
VideoInfo
public JsonObject? VideoInfo { get; }
Property Value
Methods
GetSubtitlesAsync()
動画の字幕を取得します。字幕が無ければ null。
public Task<List<WebVttCaption>?> GetSubtitlesAsync()