mirror of
https://github.com/dani/vroom.git
synced 2024-06-30 23:32:56 +02:00
Use our displayName in etherpad
And reload the etherpad iFram when you change your name Usefull in the timeline, where you can see who wrote what
This commit is contained in:
parent
c3543a77b5
commit
69fec4e842
|
@ -868,7 +868,8 @@ function initVroom(room) {
|
|||
showLineNumbers: false,
|
||||
height: maxHeight()-7 + 'px',
|
||||
border: 2,
|
||||
userColor: peers.local.color
|
||||
userColor: peers.local.color,
|
||||
userName: peers.local.displayName
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1455,6 +1456,16 @@ function initVroom(room) {
|
|||
peers.local.displayName = name;
|
||||
updateDisplayName('local');
|
||||
webrtc.sendDirectlyToAll('vroom', 'setDisplayName', name);
|
||||
lastNameChange = +new Date;
|
||||
// Should we reload etherpad iFrame with this new name ?
|
||||
if (etherpad.enabled){
|
||||
// Wait ~3 sec and reload etherpad
|
||||
setTimeout(function(){
|
||||
if (lastNameChange && lastNameChange + 3000 < +new Date){
|
||||
loadEtherpadIframe();
|
||||
}
|
||||
}, 3100);
|
||||
}
|
||||
});
|
||||
// This is the displayName input before joining the room
|
||||
$('#displayNamePre').on('input', function() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user