- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Chunbo,
Do you have any example MCU based conference chat? I am trying it but does not work; I have set the following.
var conference = Woogeen.ConferenceClient.create({});
// ......
conference.send(message, receiver, function (obj) {
L.Logger.info('object sent:', obj.id());
}, function (err) {
L.Logger.error('send failed:', err);
}
);
</script>
If you have any example script2.js or similar, please share. Even in provided documentation, there is very little on how to set it up. I see more example on P2P based chat. Kindly help. Thank you.
Regards
- Tags:
- HTML5
- JavaScript*
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Farrukh,
Are you talking about the basic example setup in the package?
If you want to use the Woogeen.ConferenceClient API, a valid token is required to join the conference before any further invocation.
Refer to extras/basic_example/public/scripts2.js for example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Chunbo,
Thank you for answering. Yes I am talking about basic example but script2.js is more focused on video. I am asking if you have any basic example scenario for MCU based chat. Do you have coding example?
I already have the token on client side. I see that below method can be used but I need a full example of how a message can be send and received. Do you have any full example? I have asked questions in below script2.js code
window.onload = function () {
createToken(myRoom, 'user', 'presenter', function (response) {
var token = response;
conference.join(token, function (resp) {
if (shareScreen === false) {
Woogeen.LocalStream.create({ <---- Should we have any settings for data: ????
video: {
device: 'camera',
resolution: myResolution
},
audio: true
}, function (err, stream) {
if (err) {
return L.Logger.error('create LocalStream failed:', err);
}
localStream = stream;
console.log("localStream: " + localStream.id());
if(window.navigator.appVersion.indexOf("Trident") < 0){
localStream.show('myVideo'); <--- In case of chat, do we need to do localStream.show????
}
console.log("start publish");
conference.publish(localStream, {maxVideoBW: 300}, function (st) { <--- do we need to publish???
console.log("published");
L.Logger.info('stream published:', st.id());
}, function (err) {
console.log("error published: ", err);
L.Logger.error('publish failed:', err);
});
console.log("publish end");
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
script2.js is currently all what we provide as the example of MCU based chat. You should develop your own web application based on it.
Should we have any settings for data: ????
[chunbo] Not till now. ONLY video and audio are supported through API. Check out Client SDK User Guide for more information.
In case of chat, do we need to do localStream.show????
[chunbo] Not necessary. This is just sample. You can just delete this line.
do we need to publish???
[chunbo] Again, what we provide in script2.js is all sample, and nothing more. You should decide all the operations in those callbacks according to your business scenario.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Chunbo,
Thank you for your answer. I am able to send and receive data but i always have to set below create function and it asks users to allow microphone or video which in this case, i don't need.
Woogeen.LocalStream.create({ audio: true or video: true}....
Is there a way I can set localStream to use below syntax. I found it in documentation but when I run it , i get undefined.. Kindly help.
var localStream = Woogeen.Stream({audio: false, video: false, data: true });
undefined
This text/data feature is a must in your suite as in any business scenario, users would like to communicate first such as chat before enabling audio/video. I would appreciate your prompt response. Thank you.
Farrukh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We provide the Client SDK API of "ConferenceClient.send" to send messages through conference room.
ConferenceClient.send
ConferenceClient. send (message/object, receiver, successCallback, failureCallback)
This function send message to conference room. The receiver should be a valid clientId, which is carried by ‘user-joined’ event; or default 0, which means send to all participants in the conference (broadcast) except himself.
The data channel from WebRTC is not enabled in our solution, since the conference now does not have the feature of data transportation, but the video and audio communication.
Hope the above make sense to you.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page