Player
Firework Player is a component directly rendered by widgets (storyblock, hero unit, player) or initiated after user interaction (carousel, storylink). All players on a scene are registered for programmatic access as soon as they are rendered under a _fwn.players
map.
Programmatic control
window._fwn.players
is a map of all players on a scene referenced by a parent widget name.
window._fwn.player
is a reference to a player currently in fullscreen or floating.
Attributes
video
Current video loaded
currentTime
Returns current time. Assigning a new value will seek to that position.
muted
Flag indicating muted state
Methods
play
Trigger play
pause
Pause the video
mute
Change mute status
unmute
Unmute
close
Close the player
minimize
Minimize to floating layout
fullscreen
Switch to fullscreen layout
on
Subscribe to an event with async callback to control certain behavior. More on events bellow.
off
Unsubscribe from an event
Events
Events provides a way to subscribe to certain player UI interactions with the intention to interrupt them. E.g.: Allow authenticated only to post a livestream chat message.
livestream-enter
Fired when user clicks "Tap to enter livestream" with the first livestream they try to enter.
livestream-chat-input-focus
Clicking on livestream chat input.
livestream-interaction-giveaway-enter
Clicking on a livestream giveaway interaction.
livestream-interaction-trivia-giveaway-enter
Clicking on a trivia giveaway.
livestream-interaction-poll-enter
Clicking on a poll.
livestream-interaction-question-enter
Clicking on a question interaction.
livestream-interaction-heart
Clicking on a "heart" interaction
Last updated
Was this helpful?