generateId(uniqueId) {
    uniqueId = uniqueId.toLowerCase();
    const sha1 = new Sha1();
    sha1.update(uniqueId);
    sha1.update(this.receiverIdToken_);
    return 'r' + base64.encodeArray(sha1.digest(), true);
  }
/**
   * Generates ID from the receiver UUID and a per-profile token saved in
   * localStorage.
   *
   * Both DIAL and mDNS use this to generate receiver ID so that it is
   * consistent and can be used to deduplicate receivers. For a given token, the
   * ID is the same for the same device no matter when it is discovered.
   *
   * @param {string} uniqueId
   * @return {string} receiver ID.
   */
Generates ID from the receiver UUID and a per-profile token saved in
localStorage.

Both DIAL and mDNS use this to generate receiver ID so that it is
consistent and can be used to deduplicate receivers. For a given token, the
ID is the same for the same device no matter when it is discovered.

@param {string} uniqueId
@return {string} receiver ID.
Generates ID from the receiver UUID and a per - profile token saved in localStorage . Both DIAL and mDNS use this to generate receiver ID so that it is consistent and can be used to deduplicate receivers . For a given token the ID is the same for the same device no matter when it is discovered . @param { string } uniqueId @return { string } receiver ID .
generateId(uniqueId) {
    uniqueId = uniqueId.toLowerCase();
    const sha1 = new Sha1();
    sha1.update(uniqueId);
    sha1.update(this.receiverIdToken_);
    return 'r' + base64.encodeArray(sha1.digest(), true);
  }
generateId ( uniqueId ) { uniqueId = uniqueId . toLowerCase ( ) ; const sha1 = new Sha1 ( ) ; sha1 . update ( uniqueId ) ; sha1 . update ( this . receiverIdToken_ ) ; return 'r' + base64 . encodeArray ( sha1 . digest ( ) , true ) ; }
Generates ID from the receiver UUID and a per-profile token saved in
 localStorage.
Generates ID from the receiver UUID and a per - profile token saved in localStorage .