When i load a local site in my webView, no sound is played
I use this code to play the sound in the index.html :
var audio = new Audio('AUDIO PATH');
audio.play();
And this code in the ViewController.swift to load HTML :
let localfilePath = Bundle.main.url(forResource: "www/index", withExtension: "html")
let myRequest = NSURLRequest(url: localfilePath!);
webView.loadRequest(myRequest as URLRequest);
Maybe i forgot to check a option to enable sound in the Main.storyboard or there is a secret line i dont know about.
Thanks for the help !