TargetVideoPlayer class
Constructors
- TargetVideoPlayer({required String playerReference, bool? controlAutoplay, bool? scrollOnAd, String? creditsLabelColor, int? setCornerRadius, String? localization, int? doubleTapSeek, int? seekPreview})
-
Constructor for creating a TargetVideoPlayer instance.
All parameters except
playerReferenceare optional and nullable.
Properties
- controlAutoplay ← bool?
-
Sets the controlAutoplay property.
This enables the client to take control over autoplay.
no getter
- creditsLabelColor ← String?
-
Sets the creditsLabelColor property.
To achieve color modification for credits label, it is necessary to provide a sequence of six hexadecimal characters, excluding the '#' symbol.
no getter
- doubleTapSeek ← int?
-
Sets the doubleTapSeek property.
This property set seek seconds for double tap seek player UI.
no getter
- hashCode → int
-
The hash code for this object.
no setterinherited
- localization ← String?
-
Sets the localization property.
This allows selecting the language in which the player and IMA will operate.
no getter
- playerReference → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollOnAd ← bool?
-
Sets the scrollOnAd property.
This option enables scrolling during ad and is specific to the iOS platform. By default, Android has scrolling enabled during ads.
no getter
- seekPreview ← int?
-
Sets the seekPreview property.
When set to 1, the feature is enabled and will be visible in all operational modes of the player. When set to 2 the thumbnail image preview during seeking will be available exclusively when the player is in fullscreen mode.
no getter
- setCornerRadius ← int?
-
Sets the setCornerRadius property.
This property enables setting the corner radius to the player itself. Its value is in pixels.
no getter
Methods
-
destroyPlayer(
) → Future< void> - Destroys the player instance and releases associated resources.
-
getAdDuration(
) → Future< num?> - Gets the duration of the currently playing ad.
-
getPlayerCurrentTime(
) → Future< num?> - Gets the current playback time of the player.
-
getVideoDuration(
) → Future< num?> - Gets the duration of the currently loaded video.
-
handleAllPlayerEvents(
dynamic onEvent(dynamic event)) → void -
Listens to all player events and triggers the provided
onEventcallback Returns dictionary with'playerReference','type'and'event'or'ad'keys. -
hideControls(
) → Future< void> - Hides the player's controls.
-
isAdPlaying(
) → Future< bool?> - Checks if an ad is currently playing.
-
isAutoplay(
) → Future< bool?> - Checks if the player is in autoplay mode.
-
isPaused(
) → Future< bool?> - Checks if the player is currently paused.
-
isRepeated(
) → Future< bool?> - Checks if the player is in repeat mode.
-
load(
{required int playerId, required int mediaId, required String typeOfPlayer, required int viewId}) → Future< void> - Loads media into the player.
-
mute(
) → Future< void> - Mutes the player's audio.
-
next(
) → Future< void> - Skips to the next media item in the playlist.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pauseVideo(
) → Future< void> - Pauses the currently playing video.
-
playVideo(
) → Future< void> - Resumes the paused video.
-
previous(
) → Future< void> - Skips to the previous media item in the playlist.
-
setFullscreen(
bool fullscreen) → Future< void> - Toggles fullscreen mode for the player.
-
showControls(
) → Future< void> - Displays the player's controls.
-
toString(
) → String -
A string representation of this object.
inherited
-
unMute(
) → Future< void> - Unmutes the player's audio.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited