Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 2.15 KB

Test-the-tool-with-an-annotations-preset.md

File metadata and controls

32 lines (27 loc) · 2.15 KB

In the tests folder from the new feature branch ANNOT-83, a test page with a configurable preset of annotations to load is available.

To use it, first the tests folder should access through a web server. You can use the Grunt task dev (by entering 'grunt dev' at the root of the project) to start a small webserver in the project folder accessible then at http://localhost:9001. The loading test page is then available at http://localhost:9001/tests/loading.html.

If you need to install Grunt, follow the starting tutorial.

The set of track is loaded only the first time following the tracksToImport function define in the configuration file for the test page. To reset the tracks, use the url parameter ?reset=true. You can edit this function to get the number of tracks and annotations that you want. The function has to return the track and annotations in the following format:

    [
        // Array containing the generated tracks
        {
            annotationsLoaded : true,
            description       : "Track dynamically generated for load tests",
            id                : "testtrack0",
            name              : "Track 0",
            visible           : false,
            access            : 1,
            annotations       : [
                // Array with all the annotations from this track
                {
                    duration: 892,
                    id: 0,
                    start: 583,
                    text: "Annotation 0 on track 0"
                },
                // Add more annotation here
            ]
        },
        // Add more track here
    ]  

A test page for the story ANNOT-83 is available at http://entwinemedia.github.io/annotations/ANNOT-83/tests/loading.html