bbb-recording-exporter icon indicating copy to clipboard operation
bbb-recording-exporter copied to clipboard

Cross-Origin Read Blocking (CORB) the slides.svg files from loading during recording playback[bbb-playback] as the bbb v2.6.9 exporter is exporting the slides as SVG files

Open Kernelogy opened this issue 1 year ago • 0 comments

In the older versions[2.4] of BBB, the exporter publishes the slides in the png format and in the BBB version 2.6.9 the slides are published in the svg format.

And due to this the chrome browser is blocking from reading the slide[x].svg data due to CORB during recording-playback, as we are serving the recording files via S3. (Cross Origin)

Below is the chrome console log:

Cross-Origin Read Blocking (CORB) blocked cross-origin response <URL> with MIME type binary/octet-stream.

Cross-Origin Read Blocking (CORB) blocked cross-origin response https://my-bucket.region.amazonaws.com/715f877b8540dc434cc4a5cd212e31d57e03d8d3-1687409533139/presentation/4fe2208ad5e2c599a0b9d2e47d3e8b18199509a5-1687409621996/svgs/slide9.svg with MIME type binary/octet-stream. See https://www.chromestatus.com/feature/5629709824032768 for more details.

According to the link here

In rare cases, the CORB warning message may indicate a problem on a website, which may disrupt its behavior when certain responses are blocked. For example, a response served with a "X-Content-Type-Options: nosniff" response header and an incorrect "Content-Type" response header may be blocked. This could, for example, block an actual image which is mislabeled as "Content-Type: text/html" and "nosniff." If this occurs and interferes with a page's behavior, we recommend informing the website and requesting that they correct the "Content-Type" header for the response.

There is a demo here to understand this.

So this is what is happening with bbb-playback. All the svg files likes shapes.svg files are loading. Only the slides[x].svg files are not loading. This is beacause the shapes.svg files contains svg content and they are rendered as/or using svg dom elements. But the slides[x].svg files are rendered as img dom elements. So there is a mismatch in the Content-Type as stated in the documentation.

So I find here the solution to be any of the below stated two:

  1. The bbb-playback source must be modified to render the slides[x].svg as svg dom elements.
  2. Or, the bbb-record module must stick to the older method of processing the slides as png files.

I think the second choice is easier and an immediate fix for loading the CORS contents from S3 buckets, etc and to workaround CORB.

Kernelogy avatar Jun 22 '23 13:06 Kernelogy