I have got the variables returning correctly. I can't figure out how to update the source URL with $policy and $signature.
Get PHP variables via AJAX call to controller and insert them into HTML?
I feel like this should be straight forward, but I'm struggling with it.
My app plays audio files. As such I have a list of sources to the files that are made up of various dynamic parts eg
{{$Url}}?policy={{$policy}}&signature={{$signature}}
The above, when rendered looks something like this:
https://cdn.mycdn.com/7Ap219k0TTmiQLric24S?policy=eyJleHBpcnkiOjE2MjA1OTg4NDh9&signature=f2100a68da21bc627a5249373a9fd2eff13435efce27a9013d09cc60187e50b4
I only want to generate the $policy and $signature parts at the moment the user clicks the PLAY button.
I already have an onclick function that is doing some other AJAX stuff such as updating play counts but I also want - at the moment of clicking "play" - to hit a controller, generate those $policy and $signature variables and insert them into the audio source.
Could someone point me in the right direction here. Like I said, I feel like this should be straightforward but my head just isn't working tonight.
Please or to participate in this conversation.