How to fix: Uncaught (in promise) Error: Invalid elementID: Length of the string: [1,255]. ASCII characters only. in agora.io SDK
How to fix: Uncaught (in promise) Error: Invalid elementID: Length of the string: [1,255]. ASCII characters only. in agora.io SDK
我将我的 agora.io SDK 从“2.4”更新为“3.0.2”,以下消息出现在控制台日志中。
Uncaught (in promise) Error: Invalid elementID: Length of the string: [1,255]. ASCII characters only.
at s (AgoraRTCSDK.min.js:2)
at Object.t.play (AgoraRTCSDK.min.js:8)
有人可以帮我吗?
非常感谢
请确保在您的 stream.play 方法中传递了一个字符串。
如果您要将 agora uid
传递给 stream.play()
,请确保您的 uid
是一个字符串,或者您明确地像这样对其进行类型转换:stream.play(String(uid))
参考资料:
https://docs.agora.io/en/Video/API%20Reference/web/interfaces/agorartc.stream.html#play
我将我的 agora.io SDK 从“2.4”更新为“3.0.2”,以下消息出现在控制台日志中。
Uncaught (in promise) Error: Invalid elementID: Length of the string: [1,255]. ASCII characters only.
at s (AgoraRTCSDK.min.js:2)
at Object.t.play (AgoraRTCSDK.min.js:8)
有人可以帮我吗?
非常感谢
请确保在您的 stream.play 方法中传递了一个字符串。
如果您要将 agora uid
传递给 stream.play()
,请确保您的 uid
是一个字符串,或者您明确地像这样对其进行类型转换:stream.play(String(uid))
参考资料: https://docs.agora.io/en/Video/API%20Reference/web/interfaces/agorartc.stream.html#play