Table of Contents

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

client IRequestClient
data JsonObject

Properties

AspectRatio

アスペクト比。

public (int Width, int Height)? AspectRatio { get; }

Property Value

(int Width, int Height)?

DurationMillis

再生時間(ミリ秒)。

public long? DurationMillis { get; }

Property Value

long?

Streams

動画ストリームの一覧(content_type が video/ のもの)。

public List<Stream> Streams { get; }

Property Value

List<Stream>

VideoInfo

public JsonObject? VideoInfo { get; }

Property Value

JsonObject

Methods

GetSubtitlesAsync()

動画の字幕を取得します。字幕が無ければ null。

public Task<List<WebVttCaption>?> GetSubtitlesAsync()

Returns

Task<List<WebVttCaption>>