示例#1
0
            ///	<summary>
            ///	Register a callback to be called when the file player reading has
            /// reached the end of file, or when the file reading has reached the
            /// end of file of the last file for a playlist.If the file or playlist
            /// is set to play repeatedly, then the callback will be called multiple
            /// times.
            ///	</summary>
            /// <returns>If the callback returns false, the playback
            /// will stop.Note that if application destroys
            /// the player in the callback, it must return
            /// false here.</returns>
            public override bool onEof()
            {
                bool eof = true;

                // Invoke the call back event.
                OnPlayerEndOfFile?.Invoke(this, eof);

                // Return the value.
                return(eof);
            }
示例#2
0
        /// <summary>
        /// On player end of file.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _player_OnPlayerEndOfFile(object sender, bool e)
        {
            if (_player != null)
            {
                try
                {
                    // Call end of file.
                    OnPlayerEndOfFile?.Invoke(this, new EventArgs());

                    // Close the player.
                    _player.Dispose();
                }
                catch { }
                _player = null;
            }
        }
示例#3
0
 ///	<summary>
 ///	Register a callback to be called when the file player reading has
 /// reached the end of file, or when the file reading has reached the
 /// end of file of the last file for a playlist.If the file or playlist
 /// is set to play repeatedly, then the callback will be called multiple
 /// times.
 ///	</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void _pjAudioMediaPlayer_OnPlayerEndOfFile(object sender, bool e)
 {
     OnPlayerEndOfFile?.Invoke(this, e);
 }