5

I created a simple HTML page with multiple video tag & trying to play all video simultaneously on native WebView of Android 4.2.2. However it is working on Chrome browser of Android 4.2.2. also tried to chrome-webview bundle from GitHub in my application to use android-chrome WebView class object instead of native webkit-engine/webview. It display player on HTML page but any of video doesn't get played.

I do not understand why this is happen because i have even tried chrome-webview code and get same result, please suggest me some solution or alternative for same.

I can share my HTML code

<!DOCTYPE html>
<html>
<head>
  <script>
    function init() {
      enableVideoClicks();
    }

    function enableVideoClicks() {
      var videos = document.getElementsByTagName('video') || [];
      for (var i = 0; i < videos.length; i++) {
        // TODO: use attachEvent in IE
        videos[i].addEventListener('click', function(videoNode) {
          return function() {
            videoNode.play();
          };
        }(videos[i]));
      }
    }
  </script>
</head>
<body onload="init()">


  <video src="movie1.mp4" poster = "l.jpg" width="400" height="300" autoplay controls loop></video>
  <video src="movie2.mp4" poster = "l.jpg" width="400" height="300" autoplay controls loop></video>
  <video src="movie3.mp4" poster = "l.jpg" width="400" height="300" autoplay controls loop></video>



  ...

</body>
</html>
ligi
  • 39,001
  • 44
  • 144
  • 244
Narayan soni
  • 821
  • 1
  • 10
  • 28
  • perhaps this can help you: https://developer.chrome.com/devtools/docs/remote-debugging are you sure it finds video1-4 – ligi Jul 16 '14 at 14:41
  • I faced this issue and could not solve it. After some time, the requirements changed and I never came back on it. Here is a link to my question: http://stackoverflow.com/questions/19031908/unable-to-play-video-using-webview – Plinio.Santos Jul 16 '14 at 16:03
  • @ligi Yes, its find all video, i also have been tried on android 4.4.2 and its works fine but at in android 4.2.2 it can play on one video at a time – Narayan soni Jul 17 '14 at 05:06

1 Answers1

-1

Yes it possible. See the following answers for more information:

Enabling HTML5 video playback in android WebView?

Playing HTML5 video on fullscreen in android webview

WebView and HTML5 <video>

Community
  • 1
  • 1
QArea
  • 4,955
  • 1
  • 12
  • 22
  • I have been tried above links, they only works when we are using single video tag, but i want to use multiple video tag and play video simultaneously in android 4.2.2 – Narayan soni Jul 18 '14 at 12:13
  • @Narayansoni I don't see any possible solution here. have you found one? – QArea Aug 06 '14 at 09:43