Commit 8f8a5b99 authored by Olivia Madrid's avatar Olivia Madrid
Browse files

(fix): replace video console errors with logs

parent 59c943e0
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -121,7 +121,7 @@ export class MindsVideoDirectHttpPlayer
    try {
    try {
      player.play();
      player.play();
    } catch (e) {
    } catch (e) {
      console.error(e);
      console.log(e);
    }
    }
  }
  }


@@ -131,7 +131,7 @@ export class MindsVideoDirectHttpPlayer
    try {
    try {
      player.pause();
      player.pause();
    } catch (e) {
    } catch (e) {
      console.error(e);
      console.log(e);
    }
    }
  }
  }


@@ -146,13 +146,14 @@ export class MindsVideoDirectHttpPlayer
  }
  }


  resumeFromTime(time: number = 0) {
  resumeFromTime(time: number = 0) {
    // TODO detect if it's still transcoding
    const player = this.getPlayer();
    const player = this.getPlayer();


    try {
    try {
      player.currentTime = time;
      player.currentTime = time;
      this.play();
      this.play();
    } catch (e) {
    } catch (e) {
      console.error(e);
      console.log(e);
    }
    }
  }
  }


+4 −3
Original line number Original line Diff line number Diff line
@@ -195,7 +195,7 @@ export class MindsVideoTorrentPlayer
        this.loadTorrent();
        this.loadTorrent();
      }
      }
    } catch (e) {
    } catch (e) {
      console.error(e);
      console.log(e);
    }
    }
  }
  }


@@ -205,7 +205,7 @@ export class MindsVideoTorrentPlayer
    try {
    try {
      player.pause();
      player.pause();
    } catch (e) {
    } catch (e) {
      console.error(e);
      console.log(e);
    }
    }
  }
  }


@@ -220,6 +220,7 @@ export class MindsVideoTorrentPlayer
  }
  }


  resumeFromTime(time: number = 0) {
  resumeFromTime(time: number = 0) {
    // TODO detect if it's still transcoding
    const player = this.getPlayer();
    const player = this.getPlayer();


    try {
    try {
@@ -234,7 +235,7 @@ export class MindsVideoTorrentPlayer
        }
        }
      }
      }
    } catch (e) {
    } catch (e) {
      console.error(e);
      console.log(e);
    }
    }
  }
  }


+1 −1
Original line number Original line Diff line number Diff line
@@ -183,7 +183,7 @@ export class MindsVideoComponent implements OnDestroy {
  }
  }


  onError({ player, e }: { player?; e? } = {}) {
  onError({ player, e }: { player?; e? } = {}) {
    console.error('Received error when trying to reproduce video', e, player);
    console.log('Received error when trying to reproduce video', e, player);


    setTimeout(() => this.fallback(), 0);
    setTimeout(() => this.fallback(), 0);
  }
  }
+1 −4
Original line number Original line Diff line number Diff line
@@ -18,7 +18,7 @@ m-overlay-modal {
  .m-overlay-modal--backdrop {
  .m-overlay-modal--backdrop {
    z-index: 9999995;
    z-index: 9999995;
    @include m-theme() {
    @include m-theme() {
      background-color: rgba(themed($m-black-always), 0.85);
      background-color: rgba(themed($m-black-always), 0.8);
    }
    }
  }
  }


@@ -144,9 +144,6 @@ m-overlay-modal {
      left: unquote('calc(50% - 50px)');
      left: unquote('calc(50% - 50px)');
    }
    }
    m-video--progress-bar {
    m-video--progress-bar {
      .seeker-ball {
        top: 4px;
      }
      .progress-bar {
      .progress-bar {
        margin-right: 8px;
        margin-right: 8px;
      }
      }