I am making application on vLine
I made it to video chat each other with sounds.
but,it doesn't ring ringtone.
Is there anything special I have to do for ringing ringtone?
this explanation looks there is not some special setting for ringtone.
var client, vlinesession;var lastMsg;
var vlineClient = (function(){
if('{{vlineData.serviceId}}' == 'YOUR_SERVICE_ID' || '{{vlineData.serviceId}}' == 'YOUR_SERVICE_ID'){
alert('Please make sure you have created a vLine service and that you have properly set the $serviceID and $apiSecret variables in classes/Vline.php file.');
}
var authToken = '{{ vlineData.authToken }}',
serviceId = '{{ vlineData.serviceId }}',
profile = {"displayName": '{{ vlineData.displayName }}', "id": '{{ vlineData.id }}'};
// Create vLine client
window.vlineClient = client_ = vline.Client.create({"serviceId": serviceId, "ui": true,
'uiVideoPanel':'showvideo'
});
// Add login event handler
client_.on('login', onLogin);
client_.login(serviceId, profile, authToken).done(this.init_,this);
// Do login
//
//
//
//
function initCallButton(button) {
var userId = button.attr('data-userid');
// fetch person object associated with username
vlinesession.getPerson(userId).done(function(person) {
// update button state with presence
function onPresenceChange() {
if(person.getPresenceState() == 'online'){
button.removeClass().addClass('active');
}else{
button.removeClass().addClass('disabled');
}
button.attr('data-presence', person.getPresenceState());
}
// set current presence
onPresenceChange();
// handle presence changes
person.on('change:presenceState', onPresenceChange);
// start a call when button is clicked
button.click(function() {
if (person.getId() == vlinesession.getLocalPersonId()) {
alert('You cannot call yourself. Login as another user in an incognito window');
return;
}
if(button.hasClass('active'))
// person.postMessage("Hello there");
// console.log("send message");
person.startMedia();
});
});
The client has a setRingtone function that lets you set a single file path or an array of paths, say of mp3 and ogg file formats. It got dropped off from the docs. You can set the your ringtone after you create the client. We will make sure the docs get exported in the next builds.