Мы пытаемся использовать трансляцию по умолчанию через веб-страницу WebRTC, которая поставляется с сервером Red5Pro
https://hostname -здесь / жить / broadcast.jsp? Хост = имя хоста-здесь
Клиентские журналы:
[live]:: Publish options:
{
"protocol": "wss",
"port": 8083,
"app": "live",
"streamMode": "live",
"mediaElementId": "red5pro-publisher",
"iceServers": [
{
"urls": "stun:stun2.l.google.com:19302"
}
],
"iceTransport": "udp",
"bandwidth": {
"audio": 56,
"video": 750
},
"mediaConstraints": {
"audio": true,
"video": {
"width": {
"min": 640,
"max": 640
},
"height": {
"min": 480,
"max": 480
},
"frameRate": {
"min": 8,
"max": 24
}
}
},
"host": "hostname-here",
"streamName": "teststream2"
}
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.931Z - [red5pro-sdk] debug: (RTCPublisher) [publish]
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.931Z - [red5pro-sdk] debug: (R5ProPublisherSocket) [websocket:setup] wss://hostname-here:8083/live?id=teststream2.
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.932Z - [red5pro-sdk] debug: (R5ProPublisherSocket) [teardown] >>
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.932Z - [red5pro-sdk] debug: (R5ProPublisherSocket) [WebSocket(wss://hostname-here:8083/live?id=teststream2)] close() >>
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.933Z - [red5pro-sdk] debug: (R5ProPublisherSocket) << [WebSocket(wss://hostname-here:8083/live?id=teststream2)] close()
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:16:58.933Z - [red5pro-sdk] debug: (R5ProPublisherSocket) << [teardown]
red5pro-sdk.min.js:formatted:255 WebSocket connection to 'wss://hostname-here:8083/live?id=teststream2' failed: Error during WebSocket handshake: Unexpected response code: 400
createWebSocket @ red5pro-sdk.min.js:formatted:255
t.create @ red5pro-sdk.min.js:formatted:1830
value @ red5pro-sdk.min.js:formatted:2196
value @ red5pro-sdk.min.js:formatted:5680
(anonymous) @ r5pro-publisher-failover.js:393
promisify @ r5pro-publisher-failover.js:338
publish @ r5pro-publisher-failover.js:377
(anonymous) @ r5pro-publisher-failover.js:198
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.727Z - [red5pro-sdk] warn: (R5ProPublisherSocket) [websocketerror]: Error from WebSocket. error.
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.728Z - [red5pro-sdk] debug: ([window:orientation]) [removeOrientationChangeHandler]:: onorientationchange removed.
3r5pro-publisher-failover.js:311 [Red5ProPublisher] Connect.Failure.
r5pro-publisher-failover.js:405 [live]:: Error in publish request: [object Event]
(anonymous) @ r5pro-publisher-failover.js:405
Promise.catch (async)
(anonymous) @ r5pro-publisher-failover.js:403
promisify @ r5pro-publisher-failover.js:338
publish @ r5pro-publisher-failover.js:377
(anonymous) @ r5pro-publisher-failover.js:198
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.731Z - [red5pro-sdk] warn: (R5ProPublisherSocket) [websocketclose]: 1006
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.732Z - [red5pro-sdk] debug: (RTCPublisher) RTCPublisher
red5pro-sdk.min.js:formatted:5033 2019-04-14T18:17:01.732Z - [red5pro-sdk] debug: (R5ProPublishPeer) [teardown]
Журналы сервера:
[WARN] [NioProcessor-20] org.red5.net.websocket.WebSocketConnection - Closing connection with status: 1002
[WARN] [NioProcessor-20] org.red5.net.websocket.codec.WebSocketDecoder - Handshake failed
org.red5.net.websocket.WebSocketException: Handshake failed, path not enabled
at org.red5.net.websocket.codec.WebSocketDecoder.parseClientRequest(WebSocketDecoder.java:302)
at org.red5.net.websocket.codec.WebSocketDecoder.doHandShake(WebSocketDecoder.java:186)
at org.red5.net.websocket.codec.WebSocketDecoder.doDecode(WebSocketDecoder.java:98)
at org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:180)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:253)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:641)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1114)
at org.apache.mina.filter.ssl.SslHandler.flushScheduledEvents(SslHandler.java:323)
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:565)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:641)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1114)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:121)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:641)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:634)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:539)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$1200(AbstractPollingIoProcessor.java:68)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1242)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1231)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:683)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Сервер Red5Pro имеет действительный сертификат SSL и публичный IP. Версия 5.2.0, порты 8081 и 8083 открыты.
У нас есть библиотеки, упомянутые в этот ответ установлены