undefined Custom attributes in remote stream - Owt.Base.RemoteStream in v5.0 #569
Description
Hi,
I have installed and setup OWT v5.0 on the server and OWT-client-javascript sdk on web. Running the demo app. Audio and video is working fine. But I have an issue with custom attribute.
I have added a Custom attribute to Owt.Base.LocalStream and publishing the stream using conferenceclinet.publish()
var customAttribute = {name:"test"};
localStream = new Owt.Base.LocalStream( mediaStream, new Owt.Base.StreamSourceInfo( 'mic', 'camera'),customAttribute); $('.local video').get(0).srcObject = stream;
conference.publish(localStream, publishOption).then(publication => {
publicationGlobal = publication;
mixStream(myRoom, publication.id, 'common')
publication.addEventListener('error', (err) => {
console.log('Publication error: ' + err.error.message);
});
});
it is published successfully
But in streamAdded event, in the RemoteStream object not able to access the custom attribute, i set while publishing the stream.
conference.addEventListener('streamadded', (event) => {
console.log("remote stream ",event.stream);
var remoteCustomAttributes = event.stream.attributes;
isSelf = isSelf?isSelf:event.stream.id != publicationGlobal.id;
subscribeForward && isSelf && subscribeAndRenderVideo(event.stream);
mixStream(myRoom, event.stream.id, 'common');
event.stream.addEventListener('ended', () => {
console.log(event.stream.id + ' is ended.');
});
});