Skip to content

gstwebrtc-api: address issues raised by mix matrix support

1c48d706 was mistakenly merged too early, and there were concerns about the implementation and API design:

The fact that the frontend had to expose a text area specifically for sending over a mix matrix, and had to manually edit in floats into the stringified JSON was suboptimal.

Said text area was always present even when remote control was not enabled.

The sendControlRequest API was made more complex than needed by accepting an optional stringifier callback.

This patch addresses all those concerns:

The deserialization code in webrtcsink is now made more clever and robust by first having it pick a numerical type to coerce to when deserializing arrays with numbers, then making sure it doesn't allow mixed types in arrays (or arrays of arrays as those too must share the same inner value type).

The frontend side simply sends over strings wrapped with a request message envelope to the backend.

The request text area is only shown when remote control is enabled.

Merge request reports

Loading