The post below outlines how to set up the sidebar which can play a sound on Google Sheets
How can I play a sound as part of a triggered function
It works, sidebar opens up with the sheet and makes the sound when I press the play button.
However I haven't been able to trigger a play action from a function on a script.
I need a trigger function like this one -
function playme() {
('#player.play')
}
Update (Solved) -
There's no need to use IFRAME sandbox for my requirement, complicates the matters unnecessarily.
The post below provides an elegant solution (without the use of IFRAME), where the sidebar script runs a simple poll for the selected range and triggers a sound if there's change compared to previous poll values.
Google Script: Play Sound when a specific cell change the Value