Initially that is an idea, but it would not work as it sets the variable only once. After initiation, when you would push the controls on the webobject, the variable won’t change no more since it has no trigger. In that case you would need an extra visual lectora trigger (e.g. button) beside the player to control the Lectora variable. This would be UX wise not wishable or acceptable. Nor that it would in the way that Andrew eventually has intended?
Beside that you also need to think of the question of autoplay or not. In that case you need to think about scenarios, guides and triggers that could initiate on diferent (interactions/) moments.
This would require to add a script to player element that sets and triggers a variable. Then build a script in Lectora to acquire/pass the value of that variable, or when triggered that it sets a lectora variable.
Also it much easier to think of a working UX solution if we know what Andrew eventually wants to achieve by changing the variable? (e.g. when clicked on pause a text box will pop-up telling the user that audio is paused and needs to click ok…… Very oldskool UX ;). )
In any case good luck.