Skip to content

Commit

Permalink
Merge pull request #97 from mujik-tigers/dev
Browse files Browse the repository at this point in the history
feat: 재생중인 영상이 종료되면 (stop 메서드 호출) END 메세지 보내도록 수정
  • Loading branch information
ghkdgus29 authored Jun 10, 2024
2 parents f9912bc + 71f33c0 commit 32f81d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ protected void createTimer(double playerRate) {
@Override
public void run() {
if (currentTime >= totalTime) {
messageService.sendVideoSyncInfo(
new VideoSyncInfoMessage(roomCode, videoNumber, videoId, PlayerState.END, totalTime, playerRate)
);
try {
playlistService.callNextVideoByTimer(roomCode);
} catch (PlaylistEmptyException ignored) {
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/site/youtogether/playlist/PlayingVideo.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public void pauseAt(double time) {
public void stop() {
timer.cancel();
timer.purge();
messageService.sendVideoSyncInfo(
new VideoSyncInfoMessage(roomCode, videoNumber, videoId, PlayerState.END, currentTime, playerRate)
);
}

public void changeRate(double playerRate) {
Expand Down

0 comments on commit 32f81d9

Please sign in to comment.