srs
srs copied to clipboard
stop stream when close publisher
!!! Before submitting a new feature request, please ensure you have searched for any existing features and utilized
the Ask AI feature at https://ossrs.io or https://ossrs.net (for users in China). Duplicate issues or
questions that are overly simple or already addressed in the documentation will be removed without any
response.
When I called srs.sdk.js to close the pc, I found that the browser page was still using the camera
What is the business background? Please provide a description. Who are the users? How do they utilize this feature? What problem does this feature address?
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like A clear and concise description of what you want to happen. // Close the publisher. stop stream when close publisher self.close = function () { self.pc && self.pc.close() self.pc = null // If a local stream exists, stop all of its tracks. if (self.stream) { console.log('close publisher stream') self.stream.getTracks().forEach(track => track.stop()) self.stream = null } } Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
TRANS_BY_GPT4