mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-30 12:23:52 +02:00
Add MediabunnyServerOptions and configurable hardware context (closes #389)
This commit is contained in:
@@ -42,6 +42,9 @@ export class AvFrameAudioSampleResource extends AudioSampleResource {
|
||||
constructor(frame: NodeAv.Frame) {
|
||||
super();
|
||||
|
||||
if (!(frame instanceof NodeAv.Frame)) {
|
||||
throw new TypeError('frame must be a NodeAv.Frame.');
|
||||
}
|
||||
if (frame.getMediaType() !== NodeAv.AVMEDIA_TYPE_AUDIO) {
|
||||
throw new Error('AvFrameAudioSampleResource must be initialized with an audio frame.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user