mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 02:43:48 +02:00
Update README to new Quality API
This commit is contained in:
@@ -130,7 +130,7 @@ const { title, artist, album } = await input.getMetadataTags();
|
|||||||
### Create new media files
|
### Create new media files
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { Output, Mp4OutputFormat, BufferTarget, CanvasSource, QUALITY_HIGH } from 'mediabunny';
|
import { Output, Mp4OutputFormat, BufferTarget, CanvasSource, Quality } from 'mediabunny';
|
||||||
|
|
||||||
const output = new Output({
|
const output = new Output({
|
||||||
format: new Mp4OutputFormat(),
|
format: new Mp4OutputFormat(),
|
||||||
@@ -140,7 +140,7 @@ const output = new Output({
|
|||||||
// Add a video track backed by a canvas element
|
// Add a video track backed by a canvas element
|
||||||
const videoSource = new CanvasSource(canvas, {
|
const videoSource = new CanvasSource(canvas, {
|
||||||
codec: 'avc',
|
codec: 'avc',
|
||||||
bitrate: QUALITY_HIGH,
|
bitrate: new Quality('high'),
|
||||||
});
|
});
|
||||||
output.addVideoTrack(videoSource);
|
output.addVideoTrack(videoSource);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user