Video (html5) does not start in android. Ok for ios


#1

Hi all, I have this code in my

<ion-slide ng-repeat="item in lista track by item.nid">
          <div id="immaginiBox" >
              <div class="titolo">{{item.titolo}}</div>
              <blockquote class="desc" ng-show="item.desc != null"> {{item.desc}}</blockquote>
                <img id="thumb_{{$index}}" ng-click="playVideo($index)" style="width:100%;">
                <video style="display:none;" video-reset id="video_{{$index}}" controls="" width="100%" height="300px"></video>
          </div>
      </ion-slide>

And this is my playVideo() function:

$scope.playVideo = function($index) {
        $ionicLoading.show(
            { 'template' : '<ion-spinner ng-hide="spinnerHide"></ion-spinner>'}
        );


        var video = document.getElementById('video_'+$index);
        video.src = $scope.lista[$index].videoT;
        $timeout(function() {video.play();});
    }

Under IOS all works. Under Android (I have test only via emulator for the moment) video does not start because the call to video src is done but immediately cancelled (I can see this in chrome developer tools).

Why this ? Is there an alternative ?

Thanks. M.