class Player { player : HTMLAudioElement ; constructor ( ) { this . player = new Audio ( ) ; } getInstance ( ) { return this . player ; } getDuration ( ) { return this . player . duration ; } play ( ) { this . player . play ( ) ; } pause ( ) { this . player . pause ( ) ; } replay ( ) { this . player . load ( ) ; this . play ( ) ; } reset ( ) { this . setAudioSrc ( '' ) ; } isMuted ( ) { return this . player . muted ; } isPaused ( ) { return this . player . paused ; } mute ( ) { this . player . muted = true ; } unmute ( ) { this . player . muted = false ; } getCurrentTime ( ) { return this . player . currentTime ; } setCurrentTime ( duration ) { this . player . currentTime = duration ; } getVolume ( ) { return this . player . volume ; } setVolume ( volume ) { this . player . volume = volume ; } getAudioSrc ( ) { return this . player . currentSrc ; } setAudioSrc ( src ) { this . player . src = src ; } } export default new Player ( ) ;