static box(boxName, ...payload) {
    let type = shaka.util.Mp4Generator.BOX_TYPES_.get(boxName);
    if (!type) {
      type = [
        boxName.charCodeAt(0),
        boxName.charCodeAt(1),
        boxName.charCodeAt(2),
        boxName.charCodeAt(3),
      ];
      shaka.util.Mp4Generator.BOX_TYPES_.set(boxName, type);
    }
    // make the header for the box
    let size = 8;
    // calculate the total size we need to allocate
    for (let i = payload.length - 1; i >= 0; i--) {
      size += payload[i].byteLength;
    }
    const result = new Uint8Array(size);
    result[0] = (size >> 24) & 0xff;
    result[1] = (size >> 16) & 0xff;
    result[2] = (size >> 8) & 0xff;
    result[3] = size & 0xff;
    result.set(type, 4);

    // copy the payload into the result
    for (let i = 0, pointer = 8; i < payload.length; i++) {
      // copy payload[i] array @ offset pointer
      result.set(payload[i], pointer);
      pointer += payload[i].byteLength;
    }
    return result;
  }
Generate a box

@param {string} boxName
@param {...!Uint8Array} payload
@return {!Uint8Array}