This message was deleted.
# helpdesk
s
This message was deleted.
d
Hey Ray, have you taken a look at our example app?
c
Hi David, I did and I wrote my code based on that. I noticed the video subscribe field is false and track is null. Do I need to do something else to subscribe the video? I created the same subscribe token from the doc.
d
subscription is automatic by default (unless you've set autoSubscribe to false)
c
Any of these are required for camera feed to show up?
Copy code
roomOptions: RoomOptions(
          adaptiveStream: _adaptiveStream,
          dynacast: _dynacast,
          defaultAudioPublishOptions:
              const AudioPublishOptions(name: 'custom_audio_track_name'),
          defaultVideoPublishOptions: VideoPublishOptions(
            simulcast: _simulcast,
          ),
          defaultScreenShareCaptureOptions: const ScreenShareCaptureOptions(
              useiOSBroadcastExtension: true,
              params: VideoParameters(
                  dimensions: VideoDimensionsPresets.h1080_169,
                  encoding: VideoEncoding(
                    maxBitrate: 3 * 1000 * 1000,
                    maxFramerate: 15,
                  ))),
          e2eeOptions: e2eeOptions,
          defaultCameraCaptureOptions: const CameraCaptureOptions(
              maxFrameRate: 30,
              params: VideoParameters(
                  dimensions: VideoDimensionsPresets.h720_169,
                  encoding: VideoEncoding(
                    maxBitrate: 2 * 1000 * 1000,
                    maxFramerate: 30,
                  ))),
        ),
        fastConnectOptions: _fastConnect
            ? FastConnectOptions(
                microphone: const TrackOption(enabled: true),
                camera: const TrackOption(enabled: true),
              )
            : null,
      );
I figured it out. It is this line. setState(track = t) has to be in room.addListener then inside InitState. It cannot be called directly inside initState
Copy code
widget.room.addListener(setState(track = t));
🙌 1
d
Great to hear! Could you share a snippet of what you ended up doing so it might be helpful for others that are finding this thread? 🙂