Ionic video update the currentTime

Hi guys,

I try to set a specific currentTime position for a video, my code below works on ionic serve but once I push my code on my android phone, the currentTime update method doesn’t work :frowning:

import { Component, ViewChild } from '@angular/core';
import { NavController, AlertController, Platform } from 'ionic-angular';
import { HomePage } from '../home/home';

  selector: 'page-workout',
  templateUrl: 'workout.html'
export class WorkoutPage {
  @ViewChild('videoPlayer') mVideoPlayer: any;
  @ViewChild('audioPlayer') maudioPlayer: any;
  audioMuted : boolean = false;

  constructor(public navCtrl: NavController, public alertCtrl : AlertController, public platform: Platform) {

    this.mVideoPlayer.nativeElement.ontimeupdate = null;
    this.maudioPlayer.nativeElement = null;

    this.mVideoPlayer.nativeElement = null; = 'flex';

    this.mVideoPlayer.nativeElement.currentTime = this.mVideoPlayer.nativeElement.currentTime - 10; //back to 10 sec

    this.audioMuted = !this.audioMuted;
    this.maudioPlayer.nativeElement.muted = !this.maudioPlayer.nativeElement.muted;


What’s the solution of this issue ?

Thanks :slight_smile: