You can use the Media Action to control a component's media playback when the component is interacted with in the specified way.
Creating a Media Action
Select the component to trigger the action. Go to the Actions tab in Inspector and click the button below the Actions list. Then select the Media Action from the pop-up menu.
You can now select the Event, Receiver, and other general settings for the action. For more information on general settings of actions, see Using Actions.
If a component that keeps no assets acts as the Receiver, a provisional Media Player is created when the action is triggered. You need to specify an Asset and an Action that starts playback, otherwise nothing will happen. To remove the provisional Media Player, you also need to provide some action that closes it.
Media Action Settings
The following settings are available with a Media Action.
Asset: Select the asset to be used when the Media Action is triggered. Select None if you are providing means to skip the playback on an existing Media Player. If you have an asset selected, Previous and Next actions will just skip to the selected asset.
Action: Select the kind of action triggered. The following actions are available.
- Play: Starts the playback.
- Pause: Stops the playback temporarily, but keeps the current playback position.
- Stop: Stops the playback.
- Close Stops the playback and closes the Media Player.
- Toggle Play: Toggles the mode, i.e. if playback is already running, it stops, and if not, it starts.
- Toggle Play Close: Combines the last two actions, if running playback is stopped. In this case, the Media Player is closed. If playback is not running, it starts, runs as long as assets are available, then it stops without closing the Media Player.
- Next: Skips to the next asset, playback mode is not changed.
- Previous: Skips to the previous asset, playback mode is not changed.
Note: Media Players are only closed with the Close and Toggle Play Close actions. With other actions, the Media Player stays visible, even if the playback of the last asset is finished.
Positioning: Select the position the corresponding Media component will be placed when the Media Action is triggered. The following settings are available.
- Click Position: Places the center of the Media Player at the position of the triggering click.
- Center of Receiver: Places the Media Player at the center of the Receiver.
- Original Position: Leaves the Media Player at its original position.
Note: The Positioning settings take effect whenever playback is started. Actions that stop the playback have no effect on the position of the corresponding Media Player.
Using Media Actions
You can use Media Actions with any other components. However, they best work with Media Player components, for instance for playing or pausing a video or skipping to the next clip in a playlist. This is useful for presentations, but it may also be used if you want to provide your own controls for a Media Player component without using the built-in remote.
With a Media Action assigned to a Media Player component, you have full control over what happens, since the component was created and configured by yourself.
Media Actions work differently when you assign them to other components. In this case, the action will dynamically create a Media Player component at runtime. Except for the settings mentioned above, i.e. Asset, Action and Positioning, you have little control over the configuration of this dynamic component.