InputStoryContent.video constructor

const InputStoryContent.video({
  1. @JsonKey(name: 'type') @Default(StoryContentType.video) StoryContentType type,
  2. @JsonKey(name: 'video') @InputFileConverter() required InputFile video,
  3. @JsonKey(name: 'duration') double? duration,
  4. @JsonKey(name: 'cover_frame_timestamp') double? coverFrameTimestamp,
  5. @JsonKey(name: 'is_animation') bool? isAnimation,
})

Describes a video to post as a story.

Implementation

const factory InputStoryContent.video({
  /// Type of the content, always "video"
  @JsonKey(name: 'type')
  @Default(StoryContentType.video)
  final StoryContentType type,

  /// 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.
  @JsonKey(name: 'video') @InputFileConverter() required InputFile video,

  /// Optional. Precise duration of the video in seconds; 0-60
  @JsonKey(name: 'duration') double? duration,

  /// Optional. Timestamp in seconds of the frame that will be used as the
  /// static cover for the story. Defaults to 0.0.
  @JsonKey(name: 'cover_frame_timestamp') double? coverFrameTimestamp,

  /// Optional. Pass True if the video has no sound
  @JsonKey(name: 'is_animation') bool? isAnimation,
}) = InputStoryContentVideo;