Add CanvasDrain & simplify player

This commit is contained in:
David Payr
2024-12-27 18:45:45 +01:00
parent d597f215d4
commit 792d9bd396
8 changed files with 194 additions and 73 deletions
+10
View File
@@ -75,6 +75,16 @@ export class InputVideoTrack extends InputTrack {
return this._backing.getRotation();
}
async getRotatedWidth() {
const rotation = await this._backing.getRotation();
return rotation % 180 === 0 ? this._backing.getWidth() : this._backing.getHeight();
}
async getRotatedHeight() {
const rotation = await this._backing.getRotation();
return rotation % 180 === 0 ? this._backing.getHeight() : this._backing.getWidth();
}
getDecoderConfig() {
return this._backing.getDecoderConfig();
}