mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 19:33:51 +02:00
Inherit rotation from VideoFrame when constructing VideoSample from it
This commit is contained in:
+4
-1
@@ -161,7 +161,10 @@ export class VideoSample implements Disposable {
|
||||
this.format = init.format;
|
||||
this.codedWidth = init.codedWidth!;
|
||||
this.codedHeight = init.codedHeight!;
|
||||
this.rotation = init.rotation ?? 0;
|
||||
this.rotation = init.rotation
|
||||
?? (typeof VideoFrame !== 'undefined' && data instanceof VideoFrame && 'rotation' in data
|
||||
? data.rotation as Rotation
|
||||
: 0);
|
||||
this.timestamp = init.timestamp!;
|
||||
this.duration = init.duration ?? 0;
|
||||
this.colorSpace = new VideoColorSpace(init.colorSpace);
|
||||
|
||||
Reference in New Issue
Block a user