When joining a room sync video playback if playing
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user