The createSession "custom" param gets issues to subscriber play video

Michael

Member
Hello

We recently updated Flashphoner to version 5.2.1070

The publish video stream still working with no issues.

But after the update, subscribing to play a video stopped working via WebRTC. HLS is still working.

We spent a lot of time debugging, checking what was different in our code and demo pages (WebSDK).

So we found out that the problem was the "custom" parameter. We use the "custom" param on creating session and creating stream, to validate streams via rest hooks.

But this param is causing some problem for subscribers to watch the video on WebRTC, even if we disable validation hooks at flashphoner.properties, and use default app, and default app config on database.yml.

Without the "custom" param at createSession, works well. But we can not use rest hooks to validate streams on our backend.

We haven't found any examples on the demo pages using param custom, but we can easily modify any example like "Streamer" or "Two Way Streaming" to reproduce the problem. Just changing:
session = Flashphoner.createSession({urlServer: url})
To:
session = Flashphoner.createSession({urlServer: url, custom:"anything"})

And the video playback stream will not work.

Any advice to fix the issue? May be the "custom" param require some extra config option to work after this update?
 

Max

Administrator
Staff member
Good day.
We've tested the latest build 5.2.1070 on our test server, and cannot reproduce the issue both with defaultApp and custom backend. We've tweaked Two Way Streaming code to send custom token:
Code:
    Flashphoner.createSession({urlServer: url, custom: {token: "123456"}}).on(SESSION_STATUS.ESTABLISHED, function (session) {
        ...
    });
Please also try to tweak Two Way Streaming code. If the problem is not reproducing, modify TwoWay Streaming code to reproduce the problem and send the code using this form, we will check.
If the problem is reproducing with your server instance using Two Way Streaming example, please provide SSH access to the server using this form, we will check the server.
 

Michael

Member
Hello

Our custom param is a string (Using this way do not works):
custom: "hash"

You made a test using a javascript object (Using this way works):
custom:{token: "123456"}

This could be the change which broken on this newer version.

We will check how to handle this on our back end validation, see how this info comes from hook request.

Regards
 

Max

Administrator
Staff member
Our custom param is a string (Using this way do not works):
custom: "hash"

You made a test using a javascript object (Using this way works):
custom:{token: "123456"}
We reproduced the issue and raised the ticket WCS-3373 to allow string passing as custom parameter.
Aq workaround, you can pass custom object as recommended in REST hooks documentation.
 

Michael

Member
Hello

Thanks for the answer.

We changed our JavaScript to pass custom as object, and changed our backend server validation to handle the params.

Thanks.
 

Max

Administrator
Staff member
We fixed the issue with custom string passing to backend in build 5.2.1072. Please update and check.
 
Top