Files
2025-02-28 13:29:30 +01:00

15 lines
303 B
JavaScript

// API methods
function play(data) {
// ...
}
function pause(data) {
// ...
}
window.addEventListener("message", (ev) => { // $ Source
let message = JSON.parse(ev.data);
// Let the parent frame call the 'play' or 'pause' function
window[message.name](message.payload); // $ Alert
});