Skip to content

WebRTC: Failed to push stream on HTTP page, Cannot read properties of undefined (reading 'getUserMedia') #2762

@okthomasren

Description

@okthomasren

Description

  1. SRS Version: registry.cn-hangzhou.aliyuncs.com/ossrs/srs:4
    Reproduction Steps:
  2. The configuration of SRS is as follows:
    Default rtc.conf configuration file.

Replay
Please make sure to maintain the markdown structure.

  1. Log in to an Alibaba Cloud ECS device.
  2. Pull the Docker image: docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:4
  3. Set the CANDIDATE: CANDIDATE="xx.xxx.xx.xxx"
  4. Start the Docker image: docker run --rm -it --env CANDIDATE=$CANDIDATE -p 1935:1935 -p 8080:8080 -p 1985:1985 -p 8000:8000/udp registry.cn-hangzhou.aliyuncs.com/ossrs/srs:4 objs/srs -c conf/rtc.conf

Please make sure to maintain the markdown structure.

Front-end error log:
?eip=x.x.x.x to overwrite candidate. Overwrite server candidate (public IP) configuration.

Please make sure to maintain the markdown structure.
rtc_publisher.html?autostart=true:104 TypeError: Cannot read properties of undefined (reading 'getUserMedia')
at Object.SrsRtcPublisherAsync.self.publish (srs.sdk.js:50)
at startPublish (rtc_publisher.html?autostart=true:98)
at rtc_publisher.html?autostart=true:115
(anonymous) @ rtc_publisher.html?autostart=true:104
rtc_publisher.html?autostart=true:104 TypeError: Cannot read properties of undefined (reading 'getUserMedia')
at Object.SrsRtcPublisherAsync.self.publish (srs.sdk.js:50)
at HTMLButtonElement.startPublish (rtc_publisher.html?autostart=true:98)
at HTMLButtonElement.dispatch (jquery-1.10.2.min.js:5)
at HTMLButtonElement.v.handle (jquery-1.10.2.min.js:5)

Expected Behavior (Expect)
The SRS4 service deployed on Alibaba Cloud ECS through Docker should be able to push RTC streams normally.

Please make sure to maintain the markdown structure.

TRANS_BY_GPT3

Metadata

Metadata

Assignees

Labels

TransByAITranslated by AI/GPT.WebRTCWebRTC, RTC2RTMP or RTMP2RTC.Won't fixWe won't fix it.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions