class Tourmaline::InputStoryContentVideo

Overview

Describes a video to post as a story.

Included Modules

Defined in:

tourmaline/types/api.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(type : String, video : String, duration : Float64 | Nil = nil, cover_frame_timestamp : Float64 | Nil = nil, is_animation : Bool | Nil = nil) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def cover_frame_timestamp : Float64 | Nil #

Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0.


[View source]
def cover_frame_timestamp=(cover_frame_timestamp : Float64 | Nil) #

Optional. Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0.


[View source]
def duration : Float64 | Nil #

Optional. Precise duration of the video in seconds; 0-60


[View source]
def duration=(duration : Float64 | Nil) #

Optional. Precise duration of the video in seconds; 0-60


[View source]
def is_animation=(is_animation : Bool | Nil) #

Optional. Pass True if the video has no sound


[View source]
def is_animation? : Bool | Nil #

Optional. Pass True if the video has no sound


[View source]
def type : String #

Type of the content, must be video


[View source]
def type=(type : String) #

Type of the content, must be video


[View source]
def video : String #

The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass "attach://<file_attach_name>" if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files


[View source]
def video=(video : String) #

The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass "attach://<file_attach_name>" if the video was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files


[View source]