acquireTileIndex()

in demo-website/src/meeting.js [32:45]


    acquireTileIndex(tileId) {
        for (let index = 0; index < DemoTileOrganizer.MAX_TILES; index++) {
            if (this.tiles[index] === tileId) {
                return index;
            }
        }
        for (let index = 0; index < DemoTileOrganizer.MAX_TILES; index++) {
            if (!(index in this.tiles)) {
                this.tiles[index] = tileId;
                return index;
            }
        }
        throw new Error('no tiles are available');
    }