Skip to content

[BUG] Data Channel send not working with C WebRTC SDK Master and JS viewer #1752

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

Closed
hassanctech opened this issue Jul 14, 2023 · 4 comments
Closed
Labels
bug Something isn't working needs-triage

Comments

@hassanctech
Copy link
Contributor

Describe the bug
Running the latest release C SDK as master and the JS test page viewer: https://awslabs.github.io/amazon-kinesis-video-streams-webrtc-sdk-js/examples/index.html

If you send a message from the JS viewer, it is received by the C SDK and the C SDK sends a message back to the JS, but it not received.

If you reverse the setup and run the C SDK viewer with JS test page master, there is a startup message sent from the C SDK to the JS page it is received successfully, but all subsequent messages are not.

SDK version number
Latest release: v1.7.3

Open source building
If it is a build issue, include 3rd party library version and steps to how you are building it

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
Messages should go through from C SDK --> JS test page and JS test page --> C SDK both permutations:

  • C SDK master and JS test page viewer
  • C SDK Viewer and JS test page Master

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@hassanctech hassanctech added bug Something isn't working needs-triage labels Jul 14, 2023
@sirknightj
Copy link
Contributor

May or may not be related to awslabs/amazon-kinesis-video-streams-webrtc-sdk-android#69

@yuma-m
Copy link
Contributor

yuma-m commented Jul 27, 2023

@hassanctech
I recently encountered the same issue.
In case of C SDK master and JS SDK viewer, C SDK will send back a message on the data channel created by JS SDK viewer.
However, JS SDK viewer doesn't have a callback function to the data channel created by itself.
You may need to define a callback function in JS SDK viewer sample application like this: viewer.dataChannel.onmessage = onRemoteDataMessage; or create a data channel in C SDK master.

@niyatim23
Copy link
Contributor

This was an issue on the JS SDK-side. It was fixed and merged into develop in this PR but since we use master with GitHub pages, it is not available yet. It will be available in the next release

@hassanctech
Copy link
Contributor Author

Thanks I've verified it works for me as well on theupdate-producer-dep branch. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage
Projects
None yet
Development

No branches or pull requests

4 participants