PlayspacePlayerController class

Constructors

PlayspacePlayerController.new({required int viewId})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
viewId int
The view identifier associated with this PlayspacePlayerController instance
final

Methods

disableAdvertising() Future<void>
Pauses player advertising, note that a running ad will finish if this method is called
enableAdvertising() Future<void>
If advertising was previously disabled by the disableAdvertising call, it will enable it back
getLayout() Future<int?>
Returns an int representing the current story player layout
getQuality() Future<int?>
Returns the current resolution of the video
getStoryId() Future<String?>
Returns the ID of the currently playing story
getStoryMetadata() Future<List?>
Returns a List containing story metadata from each slide
getStoryPosition() Future<int?>
Returns the current slide index. int value starting with 0 from the first slide
getStoryTimeline() Future<List?>
Returns a List of int with the durations of all slides. Each item from the list represents the duration in seconds
listenFor(String event, bool once) Future<void>
Listens to a single player event. Can be done once or as long as the player is alive
listenForAllEvents() → void
Listens to all available player events. Please check the documentation for all the possible event types
listenForMore(List<String> events) Future<void>
Listens to a String array of player event
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() Future<void>
Sets the player state to "pause"
play() Future<void>
Sets the player state to "play"
registerListener(PlayspacePlayerControllerDelegate? delegate) → dynamic
Registers the delegate as the listener for player events
remove(String event) Future<void>
Removes the listener for the specified player String event type
removeAllEvents() → void
Removes the listeners for all player events
removeListener() → dynamic
Removes the listener for player events
setCtaLabel(int slideIndex, String label) Future<void>
Updates the label of the Call to Action button for the provided slide
setLayout(int layoutType) Future<void>
Forces the story player to render in chosen orientation mode. Orientation mode will be changed based on the parameter received
setMacros(String macrosJsonString) Future<void>
Sets custom macros. The method uses key value pairs of macros { key: value }. Please note that Connatix Macros will NOT we overridden
setPlayspaceConfig(String config) Future<void>
Sets the configuration for the Playspace player
setPostRollBreak(int seconds) Future<void>
Dynamically set the post-roll break duration. This method needs to be called with the duration in seconds. To disable the break call this with 0 value
setPreRollBreak(int seconds) Future<void>
Dynamically set the pre-roll break duration. This method needs to be called with the duration in seconds. To disable the break call this with 0 value
setQuality(int videoQuality) Future<void>
Sets the resolution of the video to the specified videoQuality
setStoryPosition(int index) Future<void>
Sets the current slide to the provided index
setVolume(double volume) Future<void>
Sets the player volume to the specified value
stopPlayer() → void
Stops every function of the player, including the ad session. The player will need to be restarted after this
toString() String
A string representation of this object.
inherited

Operators

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