• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

benrr101 / node-taglib-sharp / 48257345

12 Oct 2023 04:06AM UTC coverage: 92.315% (+0.4%) from 91.944%
48257345

push

appveyor

benrr101
Performer roles (bug fixed), genres

3226 of 4153 branches covered (0.0%)

Branch coverage included in aggregate %.

94 of 94 new or added lines in 2 files covered. (100.0%)

27069 of 28664 relevant lines covered (94.44%)

417.21 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

56.25
/src/mpeg4/boxes/isoUserDataBox.ts
1
import Mpeg4Box from "./mpeg4Box";
1✔
2
import Mpeg4BoxHeader from "../mpeg4BoxHeader";
3
import Mpeg4BoxType from "../mpeg4BoxType";
1✔
4
import {ByteVector} from "../../byteVector";
5
import {File} from "../../file";
6
import {Mpeg4BoxClassType} from "../mpeg4BoxClassType";
1✔
7
import {Guards} from "../../utils";
1✔
8

9
/**
10
 * This class extends @see Mpeg4Box to provide an implementation of a ISO/IEC 14496-12 UserDataBox.
11
 */
12
export default class IsoUserDataBox extends Mpeg4Box {
1✔
13
    private _parentTree: Mpeg4BoxHeader[];
14

15
    /**
16
     * Private constructor to force construction via static functions.
17
     */
18
    private constructor() {
19
        super();
105✔
20
    }
21

22
    /**
23
     * Constructs and initializes a new instance of @see IsoUserDataBox with a provided header and
24
     * handler by reading the contents from a specified file.
25
     * @param header A @see Mpeg4BoxHeader object containing the header to use for the new instance.
26
     * @param file A @see File object to read the contents of the box from.
27
     *    new instance, or undefined if no handler applies.
28
     * @param handlerType Type of the handler box object containing the handler that applies to the
29
     *     new instance, or undefined if no handler applies.
30
     * @returns A new instance of @see IsoUserDataBox
31
     */
32
    public static fromFile(file: File, header: Mpeg4BoxHeader, handlerType: ByteVector): IsoUserDataBox {
33
        Guards.notNullOrUndefined(file, "file");
×
34

35
        const instance = new IsoUserDataBox();
×
36
        instance.initializeFromHeaderAndHandler(header, handlerType);
×
37

38
        return instance;
×
39
    }
40

41
    /**
42
     * Constructs and initializes a new instance of @see IsoUserDataBox with no children.
43
     * @returns A new instance of @see IsoUserDataBox
44
     */
45
    public static fromEmpty(): IsoUserDataBox {
46
        const instance = new IsoUserDataBox();
105✔
47
        instance.initializeFromType(Mpeg4BoxType.UDTA);
105✔
48

49
        return instance;
105✔
50
    }
51

52
    /** @inheritDoc */
53
    public get boxClassType(): Mpeg4BoxClassType { return Mpeg4BoxClassType.IsoUserDataBox; }
×
54

55
    /**
56
     * Gets the box headers for the current "udta" box and all parent boxes up to the top of the file.
57
     * @remarks Changes to the returned object will not be honored. Set the property to change it.
58
     */
59
    public get parentTree(): Mpeg4BoxHeader[] { return this._parentTree.slice(); }
×
60
    /**
61
     * Sets the box headers for the current "udta" box and all parent boxes up to the top of the file.
62
     * @internal
63
     */
64
    public set parentTree(v: Mpeg4BoxHeader[]) { this._parentTree = v; }
×
65
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc