public ChatPageViewModel(ISoundHandler soundHandler)
        {
            this.soundHandler = soundHandler;

            // load sound file
            this.soundHandler.Load();

            this.EndTime = this.soundHandler.Duration();

            this.playPauseCommand = new MvxCommand(() =>
            {
                // start/stop UI updates if the audio is not playing
                if (soundHandler.IsPlaying)
                {
                    this.updating = false;
                }
                else
                {
                    this.Load();
                }

                soundHandler.PlayPause();
            });

            this.rewindCommand = new MvxCommand(() =>
            {
                // set current time to the beginning
                this.CurrentTime = 0;
                this.soundHandler.Rewind();
                this.updating = false;
            });

            this.forwardCommand = new MvxCommand(() =>
            {
                // set current time to the end
                this.CurrentTime = this.soundHandler.Duration();
                this.soundHandler.Forward();
                this.updating = false;
            });
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="T:AudioPlayer.Portable.ViewModels.AudioPlayerPageViewModel"/> class.
        /// </summary>
        /// <param name="soundHandler">Sound handler.</param>
        public AudioPlayerPageViewModel(ISoundHandler soundHandler)
        {
            _soundHandler = soundHandler;

            // load sound file
            soundHandler.Load();

            EndTime = soundHandler.Duration();

            _playPauseCommand = new MvxCommand(() =>
            {
                // start/stop UI updates if the audio is not playing
                if (soundHandler.IsPlaying)
                {
                    _updating = false;
                }
                else
                {
                    Load();
                }

                soundHandler.PlayPause();
            });

            _rewindCommand = new MvxCommand(() =>
            {
                // set current time to the beginning
                CurrentTime = 0;
                soundHandler.Rewind();
                _updating = false;
            });

            _forwardCommand = new MvxCommand(() =>
            {
                // set current time to the end
                CurrentTime = soundHandler.Duration();
                soundHandler.Forward();
                _updating = false;
            });
        }