Android WebView Failed to execute 'play' on 'HTMLMediaElement': error playing mp3 file -


in html file when html loading plays mp3 file in background. not playing file give following error. failed execute 'play' on 'htmlmediaelement':

got solution. occurs because of playing audio file without making click or not doing action in webview. overcome need set below property webview  if (build.version.sdk_int >= build.version_codes.jelly_bean_mr1)  {    mwebview.getsettings().setmediaplaybackrequiresusergesture(false); } 

Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -