-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
RTC: Supports Firefox and mobile access. Also fixes some memory leak bugs. #1998
Conversation
Feature/rtc
…into feature/rtc
Feature/rtc
…into feature/rtc
Feature/rtc
…into feature/rtc
rtc:fix memory leak
👍 I took a quick look and didn't see any issues. I will find time to examine the merge in detail. Thank you, thank you.
|
I tried it in detail, the PT in Answer must be in Offer. For RTMP, currently SRS defaults to Chrome's PT (Opus/111, H264/102), while Firefox (Opus/109, H264/126) is different. For RTC, SRS generates the Player's PT based on the Publisher's PT. So, if Chrome is used for streaming and playback, there are no issues. Similarly, if Firefox is used for both streaming and playback, there are no problems (confirmed). However, when Chrome is used for streaming and Firefox for playback, or vice versa, there may be situations where packets are received but cannot be played. Therefore, the solution to this problem should be: The PT of the Answer should be generated based on the Offer, it should not be set as default or use the PT of the Publisher.
|
Yes, please merge and process it quickly.
|
In addition, fmtp is also necessary, otherwise decoding will fail.
|
Firefox still has an issue where the Candidate cannot be configured as a domain name, it must be configured as an IP address.
You can change the domain name to an IP address in the configuration.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firefox still has an issue, Candidate cannot be configured as a domain name, it must be configured as an IP address:
- Firefox works fine: http://ossrs.net/players/rtc_player.html?vhost=d.ossrs.net&server=d.ossrs.net&api=11985&autostart=true&target=39.107.238.185
- Firefox cannot play when Candidate is a domain name: http://ossrs.net/players/rtc_player.html?vhost=d.ossrs.net&server=d.ossrs.net&api=11985&autostart=true&target=d.ossrs.net
You can change the domain name to an IP address in the configuration.
rtc_server { enabled on; listen 8000; # Firefox doesn't work with domain. #candidate d.ossrs.net; candidate 39.107.238.185; }
The approach to solving this problem is what? Can someone give me some guidance? I will give it a try.
TRANS_BY_GPT3
@@ -1355,6 +1362,7 @@ SrsMediaPayloadType SrsAudioPayload::generate_media_payload_type() | |||
format_specific_param << ";usedtx=1"; | |||
} | |||
media_payload_type.format_specific_param_ = format_specific_param.str(); | |||
media_payload_type.format_specific_param_ = media_payload_type.format_specific_param_.substr(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line of code is used to remove the first semicolon. The purpose of having the first semicolon is to avoid formatting errors that may occur when the first parameter is missing.
TRANS_BY_GPT3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
Fix the bug that the new version does not support Firefox and mobile access to WebRTC.
Reason
The payload type in the RTP header is inconsistent with the one in the SDP.
Solution
Save the payload type negotiated during SDP negotiation in the track. When calling
send_packets
, update this PT in each RTP header.Test Results
issue
Resolve the issues of the following 2 items.
Others
SrsRtcConnection::add_player
function.generate_media_payload_type
function when the first parameter is missing, such asa=fmtp 111 ;useinbandfec=1
.stereo
andmaxplaybackrate
.TRANS_BY_GPT3