Answered

Display panel to multiple users

  • 22 February 2021
  • 7 replies
  • 121 views

Badge +1

Hi,

I am experimenting with miro’s webplugins. I’d like to display a panel to all people currently viewing the board, similar to how the voting plugin does it. How can I do this? I’d also like to synchronize data between all of the people currently using the board. Is there some sort of data store?

Regards,

John

icon

Best answer by Max Harper 22 February 2021, 18:55

View original

7 replies

Userlevel 2
Badge +6

Are you looking to develop your own plugin to do this? There isn’t a built in plugin for custom notifications as far as I know. Also what data are you looking to synchronize?

Userlevel 7
Badge +18

@JohnW12,

if you activate your video-cam-screen there is a little symbol in your picture:

if you click on it you’re able to place your video-window onto the other monitor so that miro runs on one screen and the participants are placed into the second one.

No the video-session is not being recorded. For this you have to use other tools like Zoom / Webex / GoToMeeting

Michael

Userlevel 7
Badge +11

@JohnW12    I think I understand what you’re looking to do.   

Share data/state between plugins and enable ‘shared functionality’ between them. 

To accomplish this - I’d suggest looking into any of the following routes: 

  • All users would need to have your plugin installed/authorized and running/open in order to accomplish cross communication.
  • Cross communication can happen in a few ways.  You’d need to share state through:
    • I’ve yet to use it, but the web-plugin API reference mentions an ‘experimental event’ 
      • Broadcast Data:
        •  The method to broadcast data to all other iFrames (plugins): 
        • broadcastData(data: any): void         // Other iframes can get this data from DATA_BROADCASTED event 
        • ( WebPlugin Reference line 32 )
      • Data-Broadcasted event 

    • If data-broadcasting doesn’t work for some reason - here’s two other ideas…
      • Some other server solution (think of it something like a web-socket session -- I suppose the common identifier for the connecting Miro plugin users could just be the Miro Board Id … in that … most likely there is only one session per board at any given time).
      • Talk through board metadata: 
        • A widget object has a key value store of ‘metadata’
        • Your plugin stores to that widget with ‘update’ or ‘create’ 
        • The value is stored under your plugin’s ‘clientId’
          • so any of the users using your plugin would store under that same key
        • You can create an widget (or multiple) that act(s) like a global state store, storing your ‘sync’d’ data as a blob on that widget, under that metadata key. 
          • all the plugins could write to it. 
          • each plugin could write under the plugin client id and under each users Id miro.currentUser.getId()
          • This could allow then each plugin to follow the same logic in extracting/computing a global state. (synced data)
    • Once state sharing is achieved, your first question, about a common interface ‘like voting’ can be achieved.
      • The first way I imagine it… With one app driving the function flow and state-change specific to a given workflow (analogically: voting timer, voting options, accumulation and calculations of votes, etc).  

 

Hopefully this is helpful.  Happy Miro-developing. :) 

Badge +1

Thanks for the ideas. I think I’ve tried them all, and so far none of these approaches seem to work. Broadcast data doesn’t seem to update other users, and you can’t listen for metadata changes (METADATA_CHANGED listener seems to be broken)…. 

Userlevel 7
Badge +11

@JohnW12  Thanks for the report back… I suppose that explains “broadcast data”.   Its instruction of “broadcasts data all other iFrames’ must mean:

  • ‘all iFrames’ of the current plugin (across each of the UI extension points). As a plugin can run on multiple extension points at once.  
  • NOT: all plugins running on the board currently across different users… but…
Badge +1

Is there a solution, yet?

I tried broadcast data but other windows/users don’t receive it. It can’t be that there is no way to communicate with other users in a widget. How was the timer widget implemented? It uses bottomPanel and is synced by all Users on the board...

Badge +1

Not that I was able to find before I stopped playing with this project. METADATA_CHANGED was listed as ‘experimental’ and not guaranteed to work (https://community.miro.com/developer-platform-and-apis-57/the-metadata-changed-event-does-not-call-back-2502). I can only assume that the voting plugin which I was trying to emulate has access to API’s and functionality plugin developers don’t have access to. Sorry...

Reply