Skip to content

Commit

Permalink
synchronize isPlaying state in media_player
Browse files Browse the repository at this point in the history
  • Loading branch information
gin7773 committed Feb 5, 2025
1 parent 2c34b74 commit 2f9a5b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/video_player_avplay/tizen/src/media_player.cc
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ bool MediaPlayer::Play() {
LOG_ERROR("[MediaPlayer] player_start failed: %s.", get_error_message(ret));
return false;
}
SendPlayStateUpdate(true);
return true;
}

Expand All @@ -253,6 +254,7 @@ bool MediaPlayer::Pause() {
LOG_ERROR("[MediaPlayer] player_pause failed: %s.", get_error_message(ret));
return false;
}
SendPlayStateUpdate(false);
return true;
}

Expand Down Expand Up @@ -684,6 +686,8 @@ void MediaPlayer::OnPlayCompleted(void *user_data) {

void MediaPlayer::OnInterrupted(player_interrupted_code_e code,
void *user_data) {
MediaPlayer *self = static_cast<MediaPlayer *>(user_data);
self->SendPlayStateUpdate(false);
LOG_ERROR("[MediaPlayer] Interrupt code: %d.", code);
}

Expand Down

0 comments on commit 2f9a5b9

Please sign in to comment.