Skip to content

Commit df59db7

Browse files
committed
fix: flipY
1 parent bea85dd commit df59db7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/canvas-media/video/index.android.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class Video extends VideoBase {
7070
owner._notifyVideoFrameCallbacks();
7171
}
7272
},
73-
})
73+
}),
7474
);
7575
this.setNativeView(this._instance.getContainer());
7676
}
@@ -88,7 +88,8 @@ export class Video extends VideoBase {
8888
}
8989
getCurrentFrame(context?: WebGLRenderingContext) {
9090
const ctx = arguments[1] as any;
91-
const flipY = ctx._flipY;
91+
//@ts-ignore
92+
const flipY = context?.__flipY ?? false;
9293
const ptr = ctx._canvas._canvas.getNativeContext();
9394

9495
this._instance.getCurrentFrame(!!this.isLoaded, ptr, flipY, arguments[4], arguments[5]);

packages/canvas-media/video/index.ios.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,14 @@ export class Video extends VideoBase {
7777
}
7878

7979
getCurrentFrame(context) {
80+
//@ts-ignore
81+
const flipY = context?.__flipY ?? false;
8082
if (!this.helper.isInForeground) {
8183
return;
8284
}
8385
if (this.helper.assetOutput) {
8486
try {
85-
NSCCanvasUtils.drawFrame(this.helper.player, this.helper.assetOutput, this.helper.videoSize, arguments[4], arguments[5], false);
87+
NSCCanvasUtils.drawFrame(this.helper.player, this.helper.assetOutput, this.helper.videoSize, arguments[4], arguments[5], flipY);
8688
} catch (e) {
8789
if (Video.IS_DEBUG) {
8890
console.error('getCurrentFrame error:', e);

0 commit comments

Comments
 (0)