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