text: import { __decorate } from "tslib";
  import { Injectable } from '@angular/core';
  import { BehaviorSubject } from 'rxjs';
  let AudioPlayerService = class AudioPlayerService {
      constructor() {
          // Dynamic update of playlist
          this.tracks = [];
          this.playlistSubject$ = new BehaviorSubject(this.tracks);
          // Get the current track
          this.currentTrack = null;
          this.currentTrackSubject$ = new BehaviorSubject(this.currentTrack);
          // Get the current time
          this.currentTime = null;
          this.currentTimeSubject$ = new BehaviorSubject(this.currentTime);
      }
      setPlaylist(tracks) {
          this.tracks = tracks;
          this.playlistSubject$.next(this.tracks);
      }
      getPlaylist() {
          return this.playlistSubject$.asObservable();
      }
      setCurrentTrack(currentTrack) {
          this.currentTrack = currentTrack;
          this.currentTrackSubject$.next(this.currentTrack);
      }
      getCurrentTrack() {
          return this.currentTrackSubject$.asObservable();
      }
      setCurrentTime(currentTime) {
          this.currentTime = currentTime;
          this.currentTimeSubject$.next(this.currentTime);
      }
      getCurrentTime() {
          return this.currentTimeSubject$.asObservable();
      }
  };
  AudioPlayerService = __decorate([
      Injectable({
          providedIn: 'root',
      })
  ], AudioPlayerService);
  export { AudioPlayerService };
  //# sourceMappingURL=audio-player.service.js.map