mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-02 05:13:50 +02:00
Remove input track descriptors, add async getters on tracks for everything, deprecate old sync getters
This commit is contained in:
+5
-2
@@ -189,10 +189,13 @@ const input = new Input({
|
||||
const duration = await input.computeDuration();
|
||||
|
||||
const videoTrack = await input.getPrimaryVideoTrack();
|
||||
const { displayWidth, displayHeight, rotation } = videoTrack;
|
||||
const displayWidth = await videoTrack.getDisplayWidth();
|
||||
const displayHeight = await videoTrack.getDisplayHeight();
|
||||
const rotation = await videoTrack.getRotation();
|
||||
|
||||
const audioTrack = await input.getPrimaryAudioTrack();
|
||||
const { sampleRate, numberOfChannels } = audioTrack;
|
||||
const sampleRate = await audioTrack.getSampleRate();
|
||||
const numberOfChannels = await audioTrack.getNumberOfChannels();
|
||||
|
||||
// Get the frame halfway through the video
|
||||
const sink = new VideoSampleSink(videoTrack);
|
||||
|
||||
Reference in New Issue
Block a user