react-native-rtmp-publisher
react-native-rtmp-publisher copied to clipboard
stopStream() did not working
Describe the bug
The stopStream method does not successfully stop the live stream. When calling stopStream, the method hangs and eventually times out. The expected logs for stopping the stream are not shown, indicating that the method does not complete its execution.
To Reproduce
Steps to reproduce the behavior:
- Set up the RTMP publisher as described in the react-native-rtmp-publisher documentation.
- Start a live stream using the startStream method.
- Attempt to stop the stream with the following code:
const stopLive = async () => {
console.log('stopping live...');
if (publisherRef.current && typeof publisherRef.current.stopStream === 'function') {
console.log('Attempting to stop the stream...');
await publisherRef.current.stopStream();
console.log('live stopped');
} else {
console.error('publisherRef is not properly initialized or stopStream method is missing');
}
}
- Observe that "stopping live..." and "Attempting to stop the stream..." are logged, but "live stopped" is not, and a timeout error occurs.
Expected behavior
The stopStream method should successfully stop the live stream, and the log "live stopped" should be printed, indicating that the method completed its execution without hanging or timing out.
Version
^0.4.7
Smartphone info.
- Device : Samsung A05 (SM-A055F/DS)
- OS : Android 14 One UI 6.0
Additional context
No response
Screenshots
No response
Relevant log output
No response