fix: fix simple block id

This commit is contained in:
master 2025-03-19 03:27:58 +08:00
parent 6cc8dfab7c
commit 2bc20426b6
3 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "konoebml",
"version": "0.1.0-rc.7",
"version": "0.1.0-rc.8",
"description": "A modern JavaScript implementation of EBML RFC8794",
"main": "./dist/index.cjs",
"module": "./dist/index.js",

View File

@ -31,9 +31,9 @@ export class EbmlBlockTag extends EbmlDataTag {
constructor(options: CreateEbmlBlockTagOptions) {
super({
...options,
id: options.id ?? EbmlTagIdEnum.Block,
type: EbmlElementType.Binary,
...options,
});
}

View File

@ -1,5 +1,5 @@
import { readVint } from '../tools';
import type { EbmlSimpleBlockTagIdType } from './enums';
import { EbmlTagIdEnum, type EbmlSimpleBlockTagIdType } from './enums';
import { type CreateEbmlBlockTagOptions, EbmlBlockTag } from './tag-block';
import type { DecodeContentOptions } from './tag-trait';
@ -12,9 +12,11 @@ export class EbmlSimpleBlockTag extends EbmlBlockTag {
discardable: boolean | undefined;
keyframe: boolean | undefined;
// biome-ignore lint/complexity/noUselessConstructor: <explanation>
constructor(options: CreateEbmlSimpleBlockTagOptions) {
super(options);
super({
id: EbmlTagIdEnum.SimpleBlock,
...options,
});
}
*encodeContent(): Generator<Uint8Array, void, unknown> {