Problem
The subscriber video for the device is not added to the dom element after establishing an OpenTok session.
Expected Behavior
After OpenTok session
receives the event streamCreated
:
- subscription to the session
event.stream
, - passing in the dom target,
- Subscriber Properties
- providing callback
must initialize the subscriber stream and fill the provided dom element with the video stream or fail if an error occurs during the subscription process.
this.session.on({
streamCreated: event => {
console.log('----- Event Stream: ', event.stream);
let subscriberProperties = {
width: '100%',
height: '100%',
insertMode: 'append'
};
this.subscriber = this.session.subscribe(event.stream, 'subscriberContainer', subscriberProperties, err => {
if (err) {
console.log('----- Subscriber subscribe error: ', err);
}
else {
console.log('----- Subscriber added.....');
}
});
}
});
Actual behavior
streamCreated
triggered and a thread is created. OpenTok issues a warning:
RTCIceServer.url is deprecated, please use RTCIceServer.urls instead.
The following are these errors:
Error while setting RemoteDescription
-
DOMException: Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: rtcpMuxPolicy is 'require', but media description does not contain 'a=rtcp-mux'..
-
PeerConnection.offerProcessor Error while setting RemoteDescription: OperationError: Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: rtcpMuxPolicy is 'require', but media description does not contain 'a=rtcp-mux'.. in state
{
connectionState: undefined,
iceConnectionState: "new",
iceGatheringState: "new",
signalingState: "have-remote-offer"
}
-
OT.exception :: title: Connection Failed (1013) msg: OT.Subscriber PeerConnection Error: PeerConnection.offerProcessor Error while setting RemoteDescription: OperationError: Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: rtcpMuxPolicy is 'require', but media description does not contain 'a=rtcp-mux'..
-
Unhandled rejection null
-
OT_SET_REMOTE_DESCRIPTION_FAILED: SetRemoteDescription: Subscriber PeerConnection with connection (not found) failed: PeerConnection.offerProcessor Error while setting RemoteDescription: OperationError: Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: rtcpMuxPolicy is 'require', but media description does not contain 'a=rtcp-mux'..
Subscription error is returned:
{
code: 1501,
message:"SetRemoteDescription: Subscriber PeerConnection with
connection (not found) failed:
PeerConnection.offerProcessor Error while setting
RemoteDescription: OperationError: Failed to set remote offer
sdp: Session error code: ERROR_CONTENT. Session error
description: rtcpMuxPolicy is 'require', but media description
does not contain 'a=rtcp-mux'.."
name:"OT_SET_REMOTE_DESCRIPTION_FAILED"
stack:"Error: SetRemoteDescription: Subscriber PeerConnection with
connection (not found) failed: PeerConnection.offerProcessor
Error while setting RemoteDescription: OperationError: Failed
to set remote offer sdp: Session error code: ERROR_CONTENT.
Session error description: rtcpMuxPolicy is 'require', but
media description does not contain 'a=rtcp-mux'..↵ at
file:///android_asset/www/src/scripts/opentok.min.js:1:365616
at S.it
(file:///android_asset/www/src/scripts/opentok.min.js:1:545734)
at
file:///android_asset/www/src/scripts/opentok.min.js:1:252654
}
. . , .
. -. .