Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing <on-connect> with <event> in my Icecast.xml config file #72

Open
eelcohn opened this issue Jan 24, 2024 · 1 comment
Open

Comments

@eelcohn
Copy link

eelcohn commented Jan 24, 2024

The Changelog states that

within <mount> <on-connect> and <on-disconnect> has been replaced by <event>

, but I can' really find any documentation or examples on that. Currently I'm using the <on-connect> statement to call a script, which issues a curl command to make an API call:

<mount>
	<mount-name>/test/mount</mount-name>
	<password>xxxxxxxx</password>
	<burst-size>65536</burst-size>
	<no-yp>1</no-yp>
	<on-connect>/on-connect.sh</on-connect>
	<on-disconnect>/on-disconnect.sh</on-disconnect>
</mount>

This works perfectly, but I'm trying to do the same thing with the <event> statement.

I've tried the following code, but it does not seem to make any HTTP request to the API endpoint:

<mount>
	<mount-name>/test/event</mount-name>
	<password>xxxxxxxx</password>
	<burst-size>65536</burst-size>
	<no-yp>1</no-yp>
	<event-bindings>
		<event type="url" trigger="source-connect">
			<option name="url" value="http://127.0.0.1/api/v1/icecast" />
			<option name="action" value="mount_add" />
		</event>
		<event type="url" trigger="source-disconnect">
			<option name="url" value="http://127.0.0.1/api/v1/icecast" />
			<option name="action" value="mount_remove" />
		</event>
	</event-bindings>
</mount>

How can I use <event> to make a HTTP call to the API endpoint at http://127.0.0.1/api/v1/icecast?

@eelcohn eelcohn changed the title Moving from <on-connect> to <event> Replacing <on-connect> with <event> in my Icecast.xml config file Jan 24, 2024
@eelcohn
Copy link
Author

eelcohn commented May 23, 2024

Anyone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant