Allow widget iframes to request camera and microphone permissions.
This commit is contained in:
parent
e7eb02cbf3
commit
ffb524b6a5
1 changed files with 6 additions and 0 deletions
|
@ -393,6 +393,10 @@ export default React.createClass({
|
||||||
const sandboxFlags = "allow-forms allow-popups allow-popups-to-escape-sandbox "+
|
const sandboxFlags = "allow-forms allow-popups allow-popups-to-escape-sandbox "+
|
||||||
"allow-same-origin allow-scripts allow-presentation";
|
"allow-same-origin allow-scripts allow-presentation";
|
||||||
|
|
||||||
|
// Additional iframe feature pemissions
|
||||||
|
// (see - https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-permissions-in-cross-origin-iframes and https://wicg.github.io/feature-policy/)
|
||||||
|
const iframeFeatures = "microphone; camera; encrypted-media;";
|
||||||
|
|
||||||
if (this.props.show) {
|
if (this.props.show) {
|
||||||
const loadingElement = (
|
const loadingElement = (
|
||||||
<div className='mx_AppTileBody mx_AppLoading'>
|
<div className='mx_AppTileBody mx_AppLoading'>
|
||||||
|
@ -413,6 +417,8 @@ export default React.createClass({
|
||||||
<div className={this.state.loading ? 'mx_AppTileBody mx_AppLoading' : 'mx_AppTileBody'}>
|
<div className={this.state.loading ? 'mx_AppTileBody mx_AppLoading' : 'mx_AppTileBody'}>
|
||||||
{ this.state.loading && loadingElement }
|
{ this.state.loading && loadingElement }
|
||||||
<iframe
|
<iframe
|
||||||
|
is
|
||||||
|
allow={iframeFeatures}
|
||||||
ref="appFrame"
|
ref="appFrame"
|
||||||
src={this._getSafeUrl()}
|
src={this._getSafeUrl()}
|
||||||
allowFullScreen="true"
|
allowFullScreen="true"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue