static replacer_(dummyArrayBuffers, key, value) {
    // eslint-disable-next-line shaka-rules/buffersource-no-instanceof
    if (value instanceof ArrayBuffer) {
      /** @type {string} */
      let data;
      if (dummyArrayBuffers) {
        data = '';
      } else {
        data = shaka.util.Uint8ArrayUtils.toBase64(value);
      }
      return {
        __type__: 'ArrayBuffer',
        __value__: data,
      };
    }
    return value;
  }
A replacer callback for JSON.stringify.  It creates special objects to
represent types that can't be directly stringified into JSON, such as
ArrayBuffer.  Should be used with bind() to supply the dummyArrayBuffers
argument.

@param {boolean} dummyArrayBuffers
@param {string} key
@param {?} value
@return {?}
@private