restore WB snapshot image download
This commit is contained in:
parent
8df5e3de02
commit
3b44d17417
@ -185,33 +185,41 @@ const PresentationMenu = (props) => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
toPng(getScreenshotRef(), {
|
try {
|
||||||
width: window.screen.width,
|
const wbRef = document.getElementById('Navbar')?.nextSibling?.childNodes[1]?.querySelector('[tabindex = "0"]');
|
||||||
height: window.screen.height,
|
toPng(wbRef, {
|
||||||
}).then((data) => {
|
width: window.screen.width,
|
||||||
const anchor = document.createElement('a');
|
height: window.screen.height,
|
||||||
anchor.href = data;
|
}).then((data) => {
|
||||||
anchor.setAttribute(
|
const anchor = document.createElement('a');
|
||||||
'download',
|
anchor.href = data;
|
||||||
`${elementName}_${meetingName}_${new Date().toISOString()}.png`,
|
anchor.setAttribute(
|
||||||
);
|
'download',
|
||||||
anchor.click();
|
`${elementName}_${meetingName}_${new Date().toISOString()}.png`,
|
||||||
|
);
|
||||||
setState({
|
anchor.click();
|
||||||
loading: false,
|
|
||||||
hasError: false,
|
setState({
|
||||||
|
loading: false,
|
||||||
|
hasError: false,
|
||||||
|
});
|
||||||
|
}).catch((error) => {
|
||||||
|
logger.warn({
|
||||||
|
logCode: 'presentation_snapshot_error',
|
||||||
|
extraInfo: error,
|
||||||
|
});
|
||||||
|
|
||||||
|
setState({
|
||||||
|
loading: false,
|
||||||
|
hasError: true,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}).catch((error) => {
|
} catch (err) {
|
||||||
logger.warn({
|
logger.warn({
|
||||||
logCode: 'presentation_snapshot_error',
|
logCode: 'presentation_snapshot_error',
|
||||||
extraInfo: error,
|
extraInfo: err,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
setState({
|
|
||||||
loading: false,
|
|
||||||
hasError: true,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user