Dave's Brain

Browse - Programming Tips - How can I play a video in a webpage without user interaction?

Date: 2018mar28
OS: Android
Language: Java
Keywords: autoplay

Q.  How can I play a video in a webpage without user interaction?

A.
wv.setWebChromeClient(new WebChromeClient()); wv.getSettings().setMediaPlaybackRequiresUserGesture(false); wv.getSettings().setJavaScriptEnabled(true);

Add a comment

Sign in to add a comment
Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.