static filterStreamsByRole_(streams, preferredRole) {
    return streams.filter((stream) => {
      return stream.roles.includes(preferredRole);
    });
  }
Filter Streams by role.
Works both for Stream and Track types due to their similarities.

@param {!Array<!shaka.extern.Stream>|!Array<!shaka.extern.Track>} streams
@param {string} preferredRole
@return {!Array<!shaka.extern.Stream>|!Array<!shaka.extern.Track>}
@private