Skip to content

[feature] type (operation type) in the StreamTextOptions #879

@bohdanudreambit

Description

@bohdanudreambit

Hello LiveKit dev team!

Is your feature request related to a problem? Please describe.

We have found type parameter in the StreamTextOptions class. According to the mapping function released in the recent package upgrade this type field can be mapped to lk_models.DataStream_OperationType:
https://github.com/livekit/client-sdk-flutter/blob/main/lib/src/participant/local.dart#L1156-L1168

How to get this operation type on the other participant's side?

Describe the solution you'd like

It would be great to retrieve the operation type in the listener:

_room.registerTextStreamHandler(
      topic,
      listener,
    )

...

Future<void> _textStreamListener(
    TextStreamReader reader,
    String participantIdentity,
  ) async {
    final LocalParticipant? localParticipant = _roomService.localParticipant;
    final TextStreamInfo? info = reader.info;
    if (info == null) {
      return;
    }
   ...
  }

Describe alternatives you've considered

An alternative option is to use custom data sent in the attributes dictionary of StreamTextOptions class, which works well.

Additional context

No additional context.

Could you please describe whether this function is ready and how to use it?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions