VideoPlayerItem class final

A content item that plays video content from various sources.

Features:

  • Network video playback
  • File reference video playback (e.g., from CMS)
  • Autoplay, loop, and mute controls
  • Optional title/caption
  • Full-screen support
  • Playback controls

Example:

final player = VideoPlayerItem(
  title: 'My Video',
  linkType: VideoLinkType.url,
  url: 'https://example.com/video.mp4',
  autoplay: true,
  loop: true,
  muted: false,
);
Inheritance
  • Object
  • ContentItem
  • VideoPlayerItem
Annotations
  • @JsonSerializable.new()

Constructors

VideoPlayerItem({String? title, required VideoLinkType linkType, String? url, FileReference? file, bool loop = false, bool autoplay = false, bool muted = false, LayoutConfiguration<ContentItem>? layout, List<ContentModifierConfiguration>? modifiers})
VideoPlayerItem.fromJson(Map<String, dynamic> json)
factory

Properties

autoplay → bool
Whether the video should autoplay.
final
file → FileReference?
The File reference of the video.
final
hashCode → int
The hash code for this object.
no setterinherited
layout → LayoutConfiguration<ContentItem>?
The layout configuration for the content item.
finalinherited
linkType → VideoLinkType
The File reference of the video.
final
loop → bool
Whether the video should loop.
final
modifiers → List<ContentModifierConfiguration>?
finalinherited
muted → bool
Whether the video should be muted.
final
parent ↔ ContentItem?
The parent content item of this content item. This is used internally by the content system.
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
schemaType → String
The schema type of the content item.
finalinherited
title → String?
Optional title for the video that can be used as a caption
final
url → String?
The URL of the video.
final

Methods

getLayout() → LayoutConfiguration<ContentItem>?
Gets the layout to use for the ContentItem. By default its the layout itself. However this acts as an extension point for custom ContentItems that may have a different strategy for applying layouts.
inherited
getModifiers() → List<ContentModifierConfiguration>?
Gets the modifiers to use for the ContentItem. By default its the modifiers itself. However this acts as an extension point for custom ContentItems that may have a different strategy for applying modifiers.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setParent(Iterable<ContentItem?> children) → void
Sets the parent content item for the given list of children.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

contentBuilder → ContentBuilder<VideoPlayerItem>
final
typeDescriptor → TypeDescriptor<VideoPlayerItem>
final

Constants

schemaName → const String