Skip to content

Commit

Permalink
Enable clipboard-write permission for assignment content frame
Browse files Browse the repository at this point in the history
This enables the "Copy transcript" button to work in Via's video player
app. Without this, the button works in a standalone Via tab, but fails
when embedded in the LMS app with this error:

```
The Clipboard API has been blocked because of a permissions policy applied to
the current document. See https://goo.gl/EuHzyv for more details.
```

Note this fix will likely not work if our LMS app is being displayed inside an
iframe instead of being loaded in a new tab, unless the LMS has added the same
permission when it rendered the iframe containing our LMS app.
  • Loading branch information
robertknight committed Jul 21, 2023
1 parent 5f3d41a commit 58c33bb
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function ContentFrame({ url, iframeRef }: ContentFrameProps) {
return (
<iframe
ref={iframeRef}
allow="clipboard-write"
className={classnames(
// It's important that this content render full width and grow to fill
// available flex space. n.b. It may be rendered together with grading
Expand Down

0 comments on commit 58c33bb

Please sign in to comment.