Skip to content
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

trying to access RTSP feed From AXIS cam... getting Error WEBSOCKET connection faild.. #705

Open
parthverma68 opened this issue Jul 29, 2022 · 0 comments
Labels
bug Something isn't working player Related to player (media-stream-player-js package)

Comments

@parthverma68
Copy link

was working with axis cam integration in my application.....with simple code

return (
<BasicPlayer
key={${streamIp}${streamUsername}${resolution}${secure}}
hostname={root:sicksick@10.102.11.237}
format={'RTP_H264'}
vapixParams={{ resolution: resolution }}
autoPlay
secure={secure}
/>
)

error =>{

WebSocket connection to 'wss://root%40sicksick@10.102.11.237/rtsp-over-websocket' failed:
(anonymous) @ media-stream-library.min.js:2
media-stream-library.min.js:2 Uncaught DOMException: Failed to construct 'WebSocket': The URL contains a fragment identifier ('000000%22/%3E%3Clink%20rel=%22manifest%22%20href=%22/manifest.json%22/%3E%3Ctitle%3EField%20Analytics%3C/title%3E%3Cscript%20defer=%22defer%22%20src=%22/static/js/main.e89f4b02.js%22%3E%3C/script%3E%3Clink%20href=%22/static/css/main.9ef56f58.css%22%20rel=%22stylesheet%22%3E%3C/head%3E%3Cbody%3E%3Cnoscript%3EYou%20need%20to%20enable%20JavaScript%20to%20run%20this%20app.%3C/noscript%3E%3Cdiv%20id=%22root%22%3E%3C/div%3E%3C/body%3E%3C/html%3E'). Fragment identifiers are not allowed in WebSocket URLs.
at XMLHttpRequest. (https://localhost:3003/static/js/bundle.js:482150:27)
}

is it because internally : is converted to % => root:sicksick => root%sicksick

i have seen the same code working for WS or http ...but having issue in https or WSS

@parthverma68 parthverma68 added the bug Something isn't working label Jul 29, 2022
@steabert steabert transferred this issue from AxisCommunications/media-stream-player-js Jan 25, 2023
@steabert steabert added the player Related to player (media-stream-player-js package) label Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working player Related to player (media-stream-player-js package)
Projects
None yet
Development

No branches or pull requests

2 participants