-
Notifications
You must be signed in to change notification settings - Fork 1
virtucamera.VCBase Server Feedback Methods
shycats edited this page May 14, 2021
·
5 revisions
- client_connected( vcserver, client_ip, client_port )
- client_disconnected( vcserver )
- current_camera_changed( vcserver, current_camera )
- server_did_stop( vcserver )
Optional, this method is called whenever a client app
connects to the server. Usefull to give the user
feedback about a successfull connection.
Parameters
----------
vcserver : virtucamera.VCServer object
Instance of virtucamera.VCServer calling this method.
client_ip : str
ip address of the remote client
client_port : int
port number of the remote client
Optional, this method is called whenever a client app
disconnects from the server, even if it's disconnected by calling
stop_serving() with the virtucamera.VCServer API. Usefull to give
the user feedback about the disconnection.
Parameters
----------
vcserver : virtucamera.VCServer object
Instance of virtucamera.VCServer calling this method.
Optional, this method is called when the user selects
a different camera from the app. Usefull to give the user
feedback about the currently selected camera.
Parameters
----------
vcserver : virtucamera.VCServer object
Instance of virtucamera.VCServer calling this method.
current_camera : str
Name of the new selected camera
Optional, calling stop_serving() on virtucamera.VCServer
doesn't instantly stop the server, it is done in the background
due to the asyncronous nature of some of its processes.
This method is called when all services have been completely
stopped.
Parameters
----------
vcserver : virtucamera.VCServer object
Instance of virtucamera.VCServer calling this method.
Related: VCServer.stop_serving()