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

Unable to join room as publisher #2

Open
PerryDP opened this issue May 27, 2024 · 1 comment
Open

Unable to join room as publisher #2

PerryDP opened this issue May 27, 2024 · 1 comment

Comments

@PerryDP
Copy link

PerryDP commented May 27, 2024

First of all, thank you to the author for their contribution
I just encountered an issue using this library
I use plugin. coin (room_id=1111, Publisher_id=23456, display_name="test publish") If the room was successfully added, but did not join as a publisher
Print request details
10: 50:23: Send: {"janus": "message", "body": {"request": "join", "ptype": "publisher", "room": 1111, "display": "test publish", "publisher_id": 23456}, "transaction": "49cdf138a15749e98d2e0d9d30d2d4f0", "apisecret": "wetalk_janus", "session _id": 932189969595 30429, "handle_id": 5916266656752316}
Data returned by Janus server

10: 50:23: Received: {'janus': 'ack', 'session id': 932189969530429, 'transaction': '49cdf138a15749e98d2e0d9d30d2d4f0'}
10: 50:23: Received: {'janus': 'event', 'session id': 932189969530429, 'transaction': '49cdf138a15749e98d2e0d9d30d2d4f0', 'sender': 5916266656752316, 'plugindata': {'plugin ':' janus. plugin. videoroom ',' data ': {'videoroom': 'joined', 'room': 1111, 'description': 'Demo Room' ',' id ': 2664505253809310,' private_id ': 582534088,' publishers': []}}

It can be seen that the requested data is correct, but the publisher parameter and publisher_id parameter are not effective
The Janus server does not have any special settings for this room. I tried using other clients to create publishers normally. I don't understand where the problem lies
The second question,
As a publisher, Is await publish waiting for the stream to be sent? If so, is there any other fully asynchronous method for sending streams that can stop or switch streams at any time without waiting for all streams to be sent
The above is from automatic translation. We apologize for any inconvenience caused
Thank you to the author for answering

@josephlim94
Copy link
Owner

Hi, after joining the room (await plugin.join()) you will need to publish (await plugin.publish()) to start sending media. What do you mean the publisher parameter is not effective?

For second question, no it doesn't need to send until finish. The MediaPlayer class uses FFmpeg so "file names" supported by FFmpeg can be used. You can refer to the docstring on MediaPlayer class. In short, the webrtc implementation "takes" media frames from the media player and sends it. It will take until there is no more, or when you stop giving, or when the MediaPlayer.stop() is called.

You can also refer to test.BaseTestClass.TestClass.test_publish_and_unpublish on video room plugin usage.

You're very welcome.

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

2 participants