Message

Allows to send overlay messages to the player.

Manual Javascript setup

This plugin is mostly useful in standalone manual Javascript embeds as it requires API code to work. It is not available for OVP managed iframe embeds.

Include the plugin next to the core player.

<script src="//cdn.flowplayer.com/releases/native/3/stable/flowplayer.min.js"></script>
<script src="//cdn.flowplayer.com/releases/native/3/stable/plugins/message.min.js"></script>

Player and plugins exist in different release versions. Please see the release channel documentation.

API

Messages are displayed by emitting the message:show event to the player instance.

    • Element
    • Description
    • message string
    • message to be displayed. The message is dismissed after 3 seconds.
    • sticky boolean
    • message will remain visible for full player life cycle. Default: false
    • timeout integer
    • time in milliseconds the message will stay visible before fading out, unless sticky: true is set. Default: 3000

The event name message:show is exposed at flowplayer.message.events.SHOW_MESSAGE.

Sample code

This sample shows "Hello there!" and sets the timeout to 5 seconds (sticky: false is set for demonstration purpose only)

var player = flowplayer('#container', {
  src: '//edge.flowplayer.org/bauhaus.mp4'
})

player.emit(player.message.events.SHOW_MESSAGE, { message: "Hello there!", sticky: false, timeout: 5000})

Demo

An example implementation would be the the livestream reconnect script .

By using this website you agree to our privacy policy
Results