Skip to content

Commit

Permalink
removed analytics from video-player
Browse files Browse the repository at this point in the history
  • Loading branch information
OchiengPaul442 committed Feb 25, 2024
1 parent ee0b944 commit c40ca9c
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component, ElementRef, HostBinding, Input, OnDestroy } from '@angular/core';
import { Capacitor } from '@capacitor/core';
import { ScreenOrientation } from '@capacitor/screen-orientation';
import { AnalyticsService } from '@picsa/shared/services/core/analytics.service';
import { CapacitorVideoPlayer, CapacitorVideoPlayerPlugin, capVideoPlayerOptions } from 'capacitor-video-player';

// Fix listeners missing from type
Expand Down Expand Up @@ -54,7 +53,7 @@ export class VideoPlayerComponent implements OnDestroy {

private pauseTime: number = 0;

constructor(private elementRef: ElementRef<HTMLDivElement>, private analyticsService: AnalyticsService) {}
constructor(private elementRef: ElementRef<HTMLDivElement>) {}

async ngOnDestroy() {
await this.videoPlayer.stopAllPlayers();
Expand All @@ -75,8 +74,6 @@ export class VideoPlayerComponent implements OnDestroy {
if (Capacitor.isNativePlatform()) {
this.initialised = false;
}
// track video play event
this.analyticsService.trackVideoPlay(this.playerId);
// Initialise player any time playback triggered in case url updated (e.g. downloaded after init)
await this.initPlayer();
this.videoPlayer.play({ playerId: this.playerId }).then(() => {
Expand Down

0 comments on commit c40ca9c

Please sign in to comment.