NodeMedia / react-native-nodemediaclient

8 stars 3 forks source link

Camera is not showing up in Android #11

Closed talhatsk closed 5 months ago

talhatsk commented 5 months ago

Camera is not showing in android

this is my code

<NodePublisher
        ref={cameraViewRef}
        style={{ flex: 1 }}
        audioParam={{
          codecid: NodePublisher.NMC_CODEC_ID_AAC,
          profile: NodePublisher.NMC_PROFILE_AUTO,
          samplerate: 48000,
          channels: 1,
          bitrate: 64 * 1000,
        }}
        videoParam={{
          codecid: NodePublisher.NMC_CODEC_ID_H264,
          profile: NodePublisher.NMC_PROFILE_AUTO,
          width: 720,
          height: 1280,
          fps: 30,
          bitrate: 2000 * 1000,
        }}
        HWAccelEnable={true}
        keyFrameInterval={2}
        // denoiseEnable={true}
        volume={1.0}
        videoOrientation={NodePublisher.VIDEO_ORIENTATION_PORTRAIT}
        url={url}
        frontCamera={frontCamera}
        torchEnable={true}
        // audio={{ bitrate: 32000, profile: 1, samplerate: 44100 }}
        // camera={{ cameraId: 0, cameraFrontMirror: true }}
      />
talhatsk commented 5 months ago

there was a fault in my code it, needed to add autopreview={true}