Closed teo1978 closed 5 years ago
Metadata is "data that provides information about other data". Wikipedia | Metadata
So I've thought anything is okay, like objects:
peer.connect(id, {
metadata: {
username: "ndac-todoroki",
userid: "3cauilj1vbcsor"
}
});
so you want to decide your own metadata key or something to identify one peer from another. But this is only how I use it...
So yes I agree with you. The documentation surely needs at least some kind of examples.
At http://peerjs.com/docs/#api
In the API reference, this is said about the
id
parameter of the constructor:You're recommended to set the metadata option: HOW? The docs of the
metadata
option say nothing about how you are supposed to use it to "send other identifying information" (whatever that means, which by the way is unclear too).