Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

messages

eliranmal edited this page May 12, 2013 · 1 revision

JavaScript Messages

The widget posts and responds to several messages. In this page we will describe the messages it posts and receives.

Read about the JavaScript postMessage mechanism

Posted Messages

require login

This message fires when you configured the widget to require login and before you provided the widget with a user ID.

message = JSON.stringify({name:"requirelogin"})

play widget

This message fires when a user clicked "play" on the widget. This event does not fire if a login is required.

message = JSON.stringify({name:"playwidget"})

stop widget

This message fires when a user clicked "stop" on the widget.

message = JSON.stringify({name:"stopwidget"}

widget status

This message fires when the UI got a status result.

message = JSON.stringify({name:"widgetstatus", comment:"status_was_updated", status:data.status})