Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio Issue in android #1

Open
Arjit222830 opened this issue Mar 6, 2024 · 2 comments
Open

Audio Issue in android #1

Arjit222830 opened this issue Mar 6, 2024 · 2 comments

Comments

@Arjit222830
Copy link

I connected with rtmp url and video is working fine, but there is no audio.

<NodePublisher
ref={cameraRef}
style={{ flex: 1 }}
url={publishUrl}
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,
}}
frontCamera={frontCamera}
HWAccelEnable={true}
denoiseEnable={false}
torchEnable={torchEnable}
keyFrameInterval={2}
videoOrientation={NodePublisher.VIDEO_ORIENTATION_PORTRAIT}
onEvent={(e, msg) => {
console.log(e, msg)
}}
/>

@harrymelka
Copy link

Setup the volume

volume={mute ? 0.0 : 1.0}

@vjhameed
Copy link

For me video is not working. audio is working fine.

<View style={{flex: 1, minHeight: 400}}>
<NodePublisher
ref={np}
style={{flex: 1, backgroundColor: 'red'}}
url={streamUrl}
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,
}}
frontCamera={frontCamera}
HWAccelEnable={true}
denoiseEnable={false}
torchEnable={torchEnable}
keyFrameInterval={2}
volume={mute ? 0.0 : 1.0}
onEvent={(e, msg) => {
console.log(e, msg);
}}
videoOrientation={
NodePublisher.VIDEO_ORIENTATION_PORTRAIT
}>
<FloatingAction
actions={actions}
onPressItem={name => {
switch (name) {
case 'bt_start':
np.current.start();
break;
case 'bt_switch':
setFrontCamera(!frontCamera);
break;
case 'bt_torch':
setTorchEnable(!torchEnable);
break;
case 'bt_mute':
setMute(!mute);
break;
}
}}
/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants