Detecting if background audio is playing

Closed
0
0

Hello, I’m wondering what the best method is to checking if an audio is already playing. I have background audio playing on a button click using Application.Play, and I have it working using javascript.

My idea was to create a static audio element in my Default.html, and then load my base64 audio into that as needed and play it/check if it’s paused which worked in a standalone html page using the chrome dev tools console.. but my element isn’t there when I start the wisej application, why could this be?


// method 1
Application.Play("data:audio/wav;base64," & Base64Wav)

// method 2
Dim Js As New JavaScript()
Js.Eval($"var snd = new Audio('data:audio/x-wav;base64, {Base64Wav}');snd.play();")

// the html audio element I tried using, I tried placing this in the head and the body, and it isn't there when I start the wisej app. this did work in a separate html page, setting my audio with js and playing it with js.


  • Kurt
    • Kurt
    • Jun 23, 2023 - 6:20 pm
    I fixed this. Thanks
  • You must to post comments
Showing 0 results