Skip to content

Commit

Permalink
feat: improve chromakey compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
hughfenghen committed Dec 29, 2023
1 parent 22a69c7 commit 5355624
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/av-cliper/src/chromakey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@ export const createChromakey = (

updateTexture(gl, imgSource, texture)

if (imgSource instanceof VideoFrame) {
if (
globalThis.VideoFrame != null &&
imgSource instanceof globalThis.VideoFrame
) {
const rs = new VideoFrame(cvs, {
alpha: 'keep',
timestamp: imgSource.timestamp,
Expand Down

0 comments on commit 5355624

Please sign in to comment.