Skip to content

Title & Album Marquee Scrolls across entire screen #1

Description

@LexJackson

In the latest version of MM the Marquee for Title and Artist scroll across the entire screen from right to left instead of staying tight within the region space. As a temporary stop-gap, as I am not really a coder, I adjusted the if-else statement for title length to 100 from 30 and conversely the Album Name from 50 to 100 (see below). This stopped the marquee effect for most things. Just want to say thanks to surekap for writing this! I like having the info pop up on the MM. I really appreciate your work on this.

In MMM-ShairportMetadata.js I edited:

if (this.metadata['Title'] && this.metadata['Title'].length > 100){
titletag = document.createElement("marquee");
titletag.setAttribute('loop', '-1');
}else{
titletag = document.createElement("div");
}

  titletag.innerHTML = (this.metadata['Title']) ? this.metadata['Title'] : "";
  titletag.className = "bright";
  metadata.appendChild(titletag)


  var txt = "";
  if (this.metadata['Artist'] || this.metadata['Album Name']){
  	txt = this.metadata['Artist'] + " - " + this.metadata['Album Name']
  }
  if (txt.length > 100){
  	artisttag = document.createElement('marquee');
  	artisttag.setAttribute("loop", '-1')
  }else{
  	artisttag = document.createElement('div');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions