Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

undefined Custom attributes in remote stream - Owt.Base.RemoteStream in v5.0 #569

Open
sravanpurumala opened this issue Jan 5, 2023 · 1 comment

Comments

@sravanpurumala
Copy link

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.');
});
});

attributes

@starwarfan
Copy link
Collaborator

It's fixed on latest 5.0.x branch, you could pick a 5.0.x tag to have a try.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants