Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

applyVideoFilter: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. #239

Closed
kobrynovych opened this issue Nov 24, 2022 · 1 comment

Comments

@kobrynovych
Copy link

kobrynovych commented Nov 24, 2022

Hello,

I use:
Vue 2,
"@opentok/client": "2.24.0",

When adding a blur or adding an image to the background I get this message:
'Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true. See: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently'

Filters are added but the page hangs.

How can it be fixed?

Thanks for any help

My code:

this.publisher = OT.initPublisher(
    this.$el, 
    {
              insertMode: 'append',
              width: `'100%',`
              height: '100%',
              style: {buttonDisplayMode: 'off'},
              resolution: "1280x720",
              videoContentHint: "motion",
              frameRate: 7,
              audioBitrate: 48000,
              enableDtx: true,
    }, 
    err => {
        if (err) {
            this.$emit('error', err);
        } else {
            this.$emit('publisherCompleted');
        }
    }
);

onStartVideoFilter1() {
    this.publisher.applyVideoFilter({
        type: 'backgroundBlur',
        // blurStrength: 'low',
        blurStrength: 'high',
    });
},

onStartVideoFilter2(imgUrl) {
      this.publisher.applyVideoFilter({
          type: 'backgroundReplacement',
          backgroundImgUrl: imgUrl,
      });
}
@pardel
Copy link

pardel commented Nov 25, 2022

@IgorKob this repo is now deprecated. Please consider using OpenTok Web Components instead.

@pardel pardel closed this as completed Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants