@@ -75,15 +75,20 @@ export class NoteScreenConnection {
7575 // only lectureuuid
7676 const roomname = this . getRoomName ( args . lectureuuid )
7777
78+ const presinfo = this . getPresentationinfo ( args )
79+
7880 const screens = this . getNoteScreens ( args )
7981
8082 const channelinfo = this . getChannelNoteScreens ( args )
8183
84+ const readypresinfo = await presinfo
85+
8286 const readyscreens = await screens
8387
8488 console . log ( 'avil notepadscreens' , args . notescreenuuid , readyscreens )
8589 this . notepadio . to ( roomname ) . emit ( 'availscreens' , { screens : readyscreens } )
8690 this . screenio . to ( roomname ) . emit ( 'availscreens' , { screens : readyscreens } )
91+ this . notesio . to ( roomname ) . emit ( 'presinfo' , readypresinfo )
8792 const readychannels = await channelinfo
8893 console . log ( 'channelinfo' , readychannels )
8994
@@ -1378,6 +1383,29 @@ export class NoteScreenConnection {
13781383 }
13791384 }
13801385
1386+ async getPresentationinfo ( args ) {
1387+ const client = this . redis
1388+ const hmget = promisify ( this . redis . hmget ) . bind ( client )
1389+
1390+ try {
1391+ let lectprop = hmget (
1392+ 'lecture:' + args . lectureuuid ,
1393+ 'casttoscreens' ,
1394+ 'backgroundbw' ,
1395+ 'showscreennumber'
1396+ )
1397+ lectprop = await lectprop
1398+ return {
1399+ casttoscreens : lectprop [ 0 ] ,
1400+ backgroundbw : lectprop [ 1 ] ,
1401+ showscreennumber : lectprop [ 2 ]
1402+ }
1403+ } catch ( error ) {
1404+ console . log ( 'getPresentationinfo' , error )
1405+ return null
1406+ }
1407+ }
1408+
13811409 async getChannelNoteScreens ( args ) {
13821410 const client = this . redis
13831411 const lrange = promisify ( this . redis . lrange ) . bind ( client )
0 commit comments