private void OnInterrupted(object sender, PlaybackInterruptedEventArgs e)
 {
     // TODO: Insert code to handle the interrupted event.
     // This event is triggered when the application is interrupted by another applications.
     // The player is paused or moved to the Idle state according to the audio session manager (ASM) policy.
     // You need to check the current state of player before taking an action.
     // For more details, see https://docs.tizen.org/application/dotnet/guides/multimedia/media-playback.
 }
Esempio n. 2
0
        private void PlaybackInterruptedHandler(Object sender, PlaybackInterruptedEventArgs e)
        {
            LogClient.Instance.Logger.Error("Playback of track '{0}' was interrupted. Trying to play the next track anyway. Exception: {1}", this.playingTrack.Path, e.Message);

            // Try to play the next Track from the list automatically.
            // Use our context to trigger the work, because this event is fired on the Player's Playback thread.
            this.context.Post(new SendOrPostCallback(async(state) => await this.TryPlayNextAsync()), null);
        }
Esempio n. 3
0
 private void PlaybackInterruptedHandler(Object sender, PlaybackInterruptedEventArgs e)
 {
     // Playback was interrupted for some reason. Make sure we are in a correct state.
     // Use our context to trigger the work, because this event is fired on the Player's Playback thread.
     this.context.Post(new SendOrPostCallback((state) =>
     {
         LogClient.Info("Track interrupted: {0}", this.CurrentTrack.Value.Path);
         this.Stop();
     }), null);
 }
Esempio n. 4
0
 private void PlaybackInterruptedHandler(Object sender, PlaybackInterruptedEventArgs e)
 {
     // Playback was interrupted for some reason. Make sure we are in a correct state.
     // Use our context to trigger the work, because this event is fired on the Player's Playback thread.
     this.context.Post(new SendOrPostCallback((state) => this.Stop()), null);
 }
Esempio n. 5
0
 /// <summary>
 /// Invoked when an interruption occurs
 /// </summary>
 /// <param name="sender">object</param>
 /// <param name="e">PlaybackInterruptedEventArgs</param>
 private void Player_PlaybackInterrupted(object sender, PlaybackInterruptedEventArgs e)
 {
     Console.WriteLine(" Player_PlaybackInterrupted  :" + e.Reason);
 }
 private void PlaybackInterrupted(object sender, PlaybackInterruptedEventArgs e)
 {
     ((IElementController)Element).SetValueFromRenderer(MediaRenderingView.CurrentStatusProperty, PlayerStatus.Stopped);
 }