K kohlenbach Member Licensed User Dec 27, 2023 #1 Hi, I have a small test php script which auto plays a sound when i open it. In chrome browser this autoplay sound works after I added in the setup/website setting/ton allowed for this domain. PHP: Copy <?php echo("Hello, World 2!"); $audio_file = "https://mydomain.de/sound.wav"; echo '<audio autoplay="true" style="display:none;"> <source src="'.$audio_file.'" type="audio/wav"> </audio>'; ?> When I open the site in a webview, there is no sound. General sound works, I tried youtube. B4X: Copy Activity.LoadLayout("Layout") Dim webview1 As WebView webview1.initialize("wv") Activity.addview(webview1,0%x,0%x,100%x,100%y) webview1.loadurl("https://mydomain.de/test_sound.php") It looks like a permission problem. Can somebody help me. Thanks. rgs Jürgen
Hi, I have a small test php script which auto plays a sound when i open it. In chrome browser this autoplay sound works after I added in the setup/website setting/ton allowed for this domain. PHP: Copy <?php echo("Hello, World 2!"); $audio_file = "https://mydomain.de/sound.wav"; echo '<audio autoplay="true" style="display:none;"> <source src="'.$audio_file.'" type="audio/wav"> </audio>'; ?> When I open the site in a webview, there is no sound. General sound works, I tried youtube. B4X: Copy Activity.LoadLayout("Layout") Dim webview1 As WebView webview1.initialize("wv") Activity.addview(webview1,0%x,0%x,100%x,100%y) webview1.loadurl("https://mydomain.de/test_sound.php") It looks like a permission problem. Can somebody help me. Thanks. rgs Jürgen
aeric Expert Licensed User Longtime User Dec 28, 2023 #2 Web page is not auto play streams you can try this link http://glzwizzlv.bynetcdn.com/glglz_mp3?awCollectionId=misc&awEpisodeId=glglz on windows it will auto play, on android webview it will not www.b4x.com WebApp Play Sound Good morning everyone, I have created a test web app with web sockets that will play a sound in given events with this sub in the script section of the webapp in index.html : function playSound(url) { const audio = new Audio(url); audio.play(); }... www.b4x.com Upvote 0
Web page is not auto play streams you can try this link http://glzwizzlv.bynetcdn.com/glglz_mp3?awCollectionId=misc&awEpisodeId=glglz on windows it will auto play, on android webview it will not www.b4x.com WebApp Play Sound Good morning everyone, I have created a test web app with web sockets that will play a sound in given events with this sub in the script section of the webapp in index.html : function playSound(url) { const audio = new Audio(url); audio.play(); }... www.b4x.com
K kohlenbach Member Licensed User Dec 28, 2023 #3 My example was only to explain the basic problem. Its a webpage, which refresh every 15sec , showing data from a database table, and if new data arrives there should be a sound. What I want is fullscreen and sound, but Chrome can do it, but has no fullscreen on android. Opera mini has fullscreen but no sound. Its a mess. So I thought to build a small app. Looks like I stuck here too. Upvote 0
My example was only to explain the basic problem. Its a webpage, which refresh every 15sec , showing data from a database table, and if new data arrives there should be a sound. What I want is fullscreen and sound, but Chrome can do it, but has no fullscreen on android. Opera mini has fullscreen but no sound. Its a mess. So I thought to build a small app. Looks like I stuck here too.