We're missing a few important pieces in our model and service to really polish off our implementation. Let's start with handling completion and error conditions with our track player instances. Open TrackPlayerModel at app/modules/shared/models/track-player.model.ts and add the following:
...export interface IPlayerError { trackId: number; error: any;}export class TrackPlayerModel implements ITrackPlayer { ... private _completeHandler: (number) => void; private _errorHandler: (IPlayerError) => void; ... public load( track: ITrack, complete: (number) => void, error: (IPlayerError) => void ): Promise<number> { return new Promise((resolve, reject) => { ... this._completeHandler = complete; this._errorHandler = ...