mirror of
				https://github.com/onyx-and-iris/OBS-to-XAir.git
				synced 2025-11-03 23:11:51 +00:00 
			
		
		
		
	read mixer kind from config.toml
update readme
This commit is contained in:
		
							parent
							
								
									96f0e0f789
								
							
						
					
					
						commit
						5327d6a57b
					
				@ -27,9 +27,9 @@ pip install .
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
-   Configure websocket settings within `OBS->Tools->obs-websocket Settings`
 | 
					-   Configure websocket settings within `OBS->Tools->obs-websocket Settings`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   Open the included `config.toml` and set OBS host, port and password as well as the xair mixers ip.
 | 
					-   Open the included `config.toml` and set OBS host, port and password as well as the xair mixers kind and ip.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    -   You may also set the kind of mixer in the script. (`XR12, XR16, XR18, MR18, X32`)
 | 
					    -   Mixer kind may be any one of (`XR12, XR16, XR18, MR18, X32`)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   Set the scene to channel mutes mapping in `mapping.toml`.
 | 
					-   Set the scene to channel mutes mapping in `mapping.toml`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -61,7 +61,9 @@ class Observer:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def main():
 | 
					def main():
 | 
				
			||||||
    kind_mixer = "XR18"
 | 
					    filepath = Path.cwd() / "config.toml"
 | 
				
			||||||
 | 
					    with open(filepath, "rb") as f:
 | 
				
			||||||
 | 
					        kind_mixer = tomllib.load(f)["connection"].get("mixer")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    with xair_api.connect(kind_mixer) as mixer:
 | 
					    with xair_api.connect(kind_mixer) as mixer:
 | 
				
			||||||
        o = Observer(mixer)
 | 
					        o = Observer(mixer)
 | 
				
			||||||
 | 
				
			|||||||
@ -4,5 +4,6 @@ host = "localhost"
 | 
				
			|||||||
port = 4455
 | 
					port = 4455
 | 
				
			||||||
password = "strongpassword"
 | 
					password = "strongpassword"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# xair mixer ip
 | 
					# mixer kind and ip
 | 
				
			||||||
 | 
					mixer = "XR18"
 | 
				
			||||||
ip = "mixer.local"
 | 
					ip = "mixer.local"
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user