• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-NewsFeedTicker not displaying full article, etc.

Scheduled Pinned Locked Moved Troubleshooting
3 Posts 2 Posters 443 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    whoremoan
    last edited by Jul 16, 2021, 2:04 PM

    I’ve seen a couple of things regarding the issue of the news ticker not displaying the full article from the RSS feed and also displaying the same story twice in a row, but I can’t seem to find any solution to it.

    So what happens is, the headline starts to scroll across the screen and will end before the full headline has been displayed.
    The news ticker will then display exactly the same headline again before moving on to the next one, but then the same thing happens.
    From other posts I’ve seen, there seems to be an opinion that the current headline will be displayed for a number of seconds before moving to the next headline.
    I’ve found that regardless of whether I have the ticker running at a fast speed or an incredibly slow speed, the headline will cut off at pretty much exactly the same place.
    So I’m guessing that if it is timed, increasing and decreasing the animation speed, also speeds up and slows down the clock that is timing the change in headline?

    I’m using a raspberry pi with a 3.5" LCD screen, so this news ticker is ideal for displaying a lot of information with only a small amount of space to play with.
    I did also install it on a PC running Ubuntu using all the default config files and it does exactly the same thing on that.

    S 1 Reply Last reply Jul 16, 2021, 3:31 PM Reply Quote 0
    • S Offline
      sdetweil @whoremoan
      last edited by sdetweil Jul 16, 2021, 4:06 PM Jul 16, 2021, 3:31 PM

      @whoremoan the code does

      initial calc

       tickerBody.style.animationDuration = Math.round(this.config.updateInterval / 1000) + "s";
      

      this one u can change in config

      then using the actuals it does

                      function calcSpeed(speed) {
                          // Time = Distance/Speed
                          var spanSelector = document.querySelectorAll("headline"),
                              i;
                          for (i = 0; i < spanSelector.length; i++) {
                              var spanLength = spanSelector[i].offsetWidth,
                                  timeTaken = spanLength / speed;
                              spanSelector[i].style.animationDuration = timeTaken + "s";
                          }
                      }
                      calcSpeed(100);
      

      so, it calculates seconds in characters divided by 100/second,

      this second one for me is suspect, as until getDom() returns the 1st time, there are NO spans with headline class IN the dom.
      then on each other pass, there is the old one being replaced

      so THIS new (about to be shown headline is a fixed rate. regardless of content size

      probably the bigger problem is that the end of animation calls

        scheduleUpdateInterval: function() {
              var self = this;
      
              self.updateDom(self.config.animationSpeed);
      
              timer = setInterval(function() {
                  self.activeItem++;
                  self.updateDom(self.config.animationSpeed);
              }, this.config.updateInterval);
          },
      

      which refreshes the content AND starts a repeating time that does that too… on a fixed schedule.
      but it keeps starting new timers, on top of prior timers…

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 2
      • W Offline
        whoremoan
        last edited by Jul 20, 2021, 10:54 AM

        I passed this over to my brother, who is good with things like Java and CSS and got him to take a look and he has managed to fix the issue.
        It was the NewsFeedTicker’s CSS file that was causing all of the issues.
        To get round the main issue of the full article not being displayed involved placing the marquee inside an absolute position container. He then did a couple of other tweaks to get it working fully.
        So now when it runs it calculates the length of text to be displayed and then calculates the speed in which it needs to run to display the text over a 60 second period (as 60 seconds is what I have set as my update interval in the config file).
        As soon as the 60 seconds is up, the text has finished displaying and it moves on to the next article, So no more displaying the same item multiple times in a row.
        The only down side to this is if you use an RSS feed that displays a lot of text, it’s going to fly across the screen really fast, in order to make sure everything is displayed within 60 seconds.
        I’ve found most news RSS feeds have a fairly short headline and description and the speed is perfect.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          1/3
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy