Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70432

HTML5 video not work

$
0
0

@atanet wrote:

Hi, I’ve a problem with

This is my code

.html file:

<video type="video/mp4" *ngIf="viewVideo" (ended)="completeVideo()" preload="metadata" #myVideo overflow-scroll="false" data-tap-disable="true" webkit-playsinline="webkit-playsinline" class="videoPlayer" width="1080" height="960">
  </video>

.ts file:

@ViewChild('myVideo', {static: false}) set content(content: ElementRef) {
    console.log('Content: ' + content);
      this.myVideo = content;
      this.videoElement = this.myVideo.nativeElement;
      // this.tmpVideo = "https://www.mysite.ext/video/file.mp4"; // WORK
      this.videoElement.src = this.webview.convertFileSrc(this.videoFile); // NOT WORK

      this.videoElement.load();
      this.videoElement.play();
  }
  videoElement: HTMLVideoElement;

Property “this.videoFile” contains: “https://localhost/app_file/data/data/biz.myapp.player/files/mydirectory/2485.mp4”

Android version where i’m trying to play the app is 4.4. If I try it on Android 5 (or Android 9) it works properly.
There is a solution to this?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70432

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>