I am writing a plugin that detects changes in a board (widget created, deleted, etc), and I want to take a screenshot of the change.The plugin can detect those changes, but I am stuck at the screenshot part. I have tried to integrate an iframe in the plugin but with no success. I want to ask you what ideas would you suggest?
Detect changes using the sdk
I’ll take a shot at answering this question.. Keep in mind - I’m by no means a long-robed web wizard and might be overlooking some darker magic.
Your plugin is IFramed into Miro at one of the Miro-enabled UI extension points. Your plugin is a resource in one domain, Miro is in another. Cross domain access is strictly controlled on the web. See this stackoverflow article for a bit more context there...
The only way your plugin iframe can access content in its parent frame is through methods enabled in the Miro sdk- which you load into your plugin. So … a screenshot of the parent frame (board) will be forbidden until it is a method made possible by the Miro SDK.
Alternatively - you may find another way to store the changing board state (and log diffs between states) by storing what you can access → the board/widget data representation.
hope this helps :)
So - you got me thinking … ‘what happens when you run the ‘web page capture’ plugin (native to miro) on a Miro board itself ? ‘ … hadn’t run this experiment. This might have been what you were trying to do.
![](https://uploads-us-west-2.insided.com/miro-us/attachment/2b32b421-5140-47db-9d56-fa70b751440d.png)
![](https://uploads-us-west-2.insided.com/miro-us/attachment/9b48a6a8-0da9-4727-84b0-1a1a42b6e176.png)
Original Board:
![](https://uploads-us-west-2.insided.com/miro-us/attachment/21627eff-8418-4add-af94-7c4174286f1e.png)
Web Capture image imported into board: Amusing behavior: When you run the ‘Web Capture’ command on a board an anonymous user shows up in the board temporarily…like a photographer or something … ha!
![](https://uploads-us-west-2.insided.com/miro-us/attachment/0a898cf2-32ec-4aa5-aee3-f5d55839d345.png)
It actually does capture the board content but from the view of an anonymous new miro user and fills it with the lower left black ‘Welcome to Miro!’ help pane. Not great… but lets go see what the SDK offers for the Web screen shot widget. ….
![](https://uploads-us-west-2.insided.com/miro-us/attachment/688a0521-2b5a-4cd5-9897-deddbb7946c7.png)
I hadn’t tried using that method yet. It was on my ‘to do soon’ list.
Unfortunately, I get an error message from Miro:
“Sorry, miro.board.widgets.create() does not support widgetType ‘WEBSCREEN’ yet”
widgets.create()
should in fact offer creation of widgetType “WEBSCREEN” ?
![](https://uploads-us-west-2.insided.com/miro-us/attachment/6a2f9b0b-01b8-45ba-aafb-1468dfce8655.png)
--
PREVIEW - results in the same error.
![](https://uploads-us-west-2.insided.com/miro-us/attachment/10a7f0f3-c129-493e-b340-b99af6601ded.png)
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.