Introduction:
Player integration in sunbird-portal data exchange and telemetry log using window.postMessage()
and window.addEventListener()
Problem statement:
As per the web standards, the communication between iframe and window should be done via post messages.
...
For Listening event: window.addEventListener("message", (event) => { }, false);
Dispatch events list from portal to player:
Event name/Signature | Description | Data(Sender) |
---|---|---|
| Initialize player and player its self start | Player Config |
Listener events list from player to portal:
Event name/Signature | Description | Data(Receiver) |
---|---|---|
| For Logging assessment | Assess event object for Score |
| Where we can log | Telemetry object |
...