When joining a room sync video playback if playing

This commit is contained in:
Peter Stockings
2026-03-03 19:55:18 +11:00
parent 4665cf700e
commit 92aa926cf0
2 changed files with 7 additions and 3 deletions

View File

@@ -517,15 +517,17 @@ class VlcSyncApp(QMainWindow):
self.join_room_btn.setText("Join Room")
self.chat_messages.setHtml("Welcome to the room! 👋")
state = msg.get("state", {})
start_time_s = state.get("position", 0.0) if state else 0.0
if self.local_file_path:
self.vlc_player.load_media(self.local_file_path)
self.vlc_player.load_media(self.local_file_path, start_time_s)
self.vlc_player.set_volume(self.volume_slider.value())
users = msg.get("users", [])
if users:
self.on_users_updated(users)
state = msg.get("state", {})
if state:
self.on_sync_event(state)