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

benrr101 / node-taglib-sharp / 48393127

29 Oct 2023 04:39AM UTC coverage: 92.535% (-1.4%) from 93.934%
48393127

push

appveyor

benrr101
Merge branch 'release/v5.2.0'

3244 of 4129 branches covered (0.0%)

Branch coverage included in aggregate %.

2177 of 2177 new or added lines in 61 files covered. (100.0%)

26728 of 28261 relevant lines covered (94.58%)

423.2 hits per line

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

64.71
/src/mpeg4/boxes/appleAdditionalInfoBox.ts
1
import FullBox from "./fullBox";
1✔
2
import Mpeg4BoxHeader from "../mpeg4BoxHeader";
3
import {ByteVector, StringType} from "../../byteVector";
1✔
4
import {File} from "../../file";
5
import {Guards, StringUtils} from "../../utils";
1✔
6

7
/**
8
 * This class extends {@link FullBox} to provide an implementation of an Apple AdditionalInfoBox.
9
 */
10
export default class AppleAdditionalInfoBox extends FullBox {
1✔
11
    /**
12
     * Private constructor to force construction via static functions.
13
     */
14
    private constructor() {
15
        super();
210✔
16
    }
17

18
    /**
19
     * Constructs and initializes a new instance of {@link AppleAdditionalInfoBox} with a provided header
20
     * and handler by reading the contents from a specified file.
21
     * @param header A {@link Mpeg4BoxHeader} object containing the header to use for the new instance.
22
     * @param file A {@link File} object to read the contents of the box from.
23
     * @param handlerType Type of the handler box object containing the handler that applies to the
24
     *     new instance, or undefined if no handler applies.
25
     */
26
    public static fromFile(header: Mpeg4BoxHeader, file: File, handlerType: ByteVector): AppleAdditionalInfoBox {
27
        const instance = new AppleAdditionalInfoBox();
×
28
        instance.initializeFromHeaderFileAndHandler(header, file, handlerType);
×
29
        instance.data = file.readBlock(instance.dataSize > 0 ? instance.dataSize : 0);
×
30

31
        return instance;
×
32
    }
33

34
    /**
35
     * Constructs and initializes a new instance of {@link FullBox} with a provided header, version, and flags.
36
     * @param type A {@link Mpeg4BoxHeader} object containing the header to use for the new instance.
37
     * @param version A value containing the version of the new instance.
38
     * @param flags A value containing the flags for the new instance.
39
     */
40
    public static fromTypeVersionAndFlags(type: ByteVector, version: number, flags: number): AppleAdditionalInfoBox {
41
        const instance = new AppleAdditionalInfoBox();
210✔
42
        instance.initializeFromTypeVersionAndFlags(type, version, flags);
210✔
43

44
        return instance;
210✔
45
    }
46

47
    /**
48
     * Gets the text contained in the current instance.
49
     */
50
    public get text(): string { return StringUtils.trimStart(this.data.toString(StringType.Latin1), "\0"); }
851✔
51
    /**
52
     * Sets the text contained in the current instance.
53
     */
54
    public set text(v: string) {
55
        Guards.notNullOrUndefined(v, "v");
210✔
56
        this.data = ByteVector.fromString(v, StringType.Latin1);
210✔
57
    }
58
}
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