Message Overlays plugin

This plugin allows you to send overlay messages to the player.

Installation

Include the plugin next to the core player:

Copy
Copied
<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>

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 purposes only).

Copy
Copied
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 live stream reconnect script.