You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-20 16:22:28 +03:00
Screenshot handlers
This commit is contained in:
@@ -274,15 +274,14 @@ export default React.createClass({
|
||||
|
||||
_onSnapshotClick(e) {
|
||||
console.warn("Requesting widget snapshot");
|
||||
this.widgetMessaging.getScreenshot();
|
||||
// const iframe = this.refs.appFrame;
|
||||
// domtoimage.toPng(iframe).then(function(dataUrl) {
|
||||
// console.log("Image data URL:", dataUrl);
|
||||
// dis.dispatch({
|
||||
// action: 'picture_snapshot',
|
||||
// file: dataURLtoBlob(dataUrl),
|
||||
// }, true);
|
||||
// });
|
||||
this.widgetMessaging.getScreenshot().then((screenshot) => {
|
||||
dis.dispatch({
|
||||
action: 'picture_snapshot',
|
||||
file: screenshot,
|
||||
}, true);
|
||||
}).catch((err) => {
|
||||
console.error("Failed to get screenshot", err);
|
||||
});
|
||||
},
|
||||
|
||||
/* If user has permission to modify widgets, delete the widget,
|
||||
|
||||
Reference in New Issue
Block a user