A way to control play/pause, and get notified of song completion when using the iframe embed would be very helpful!
For example, I'm embedding a Spotify song using the instructions from the docs :
<iframe scrolling="no" allow="autoplay" src="https://open.spotify.com/embed/track/16HPj2zrjdSXCH5SGf0NY0?si=2584d6594f65412a" frameborder="no"></iframe>
For reference, YouTube (docs) and SoundCloud (docs) both support extensive APIs for this.
The simplest option might be to add embedly/player.js , which has an adapter for HTML Video elements which handles everything:
const video = document.getElementById('video');
video.load();
const adapter = playerjs.HTML5Adapter(video);
// Start accepting events
adapter.ready();
Then the parent site can pause, play, and be notified of playback ending!