Spoilers are a pretty big deal when it comes to Marvel movies. The stars frequently have trouble saying anything at all about new films because they don't want to give away anything that happens in the next movie. Slips do happen, however, and what might be the biggest one to date happened a couple years ago when Mark Ruffalo accidentally live streamed the opening of Thor: Ragnarok. It was a move that he thought was going to get him in a lot of trouble, but ending up having quite a different effect.
Ruffalo was in attendance at the world premiere of Thor: Ragnarok and he was streaming to his Instagram followers on his phone as a way to hype up the event. However, he did not shut down the stream properly, so those watching were able to hear the opening scene of the movie before somebody told Mark his phone was still running.
The next day, returning to work on the Avengers films, he discovered that people weren't upset with him, they were actually thrilled. According to Ruffalo...
It sort of turned around on me, because when I came to work on Monday [on the set of Endgame] everyone ran up to me. I thought they were coming to scream at me — Barry, he threw his arms around me. 'That was genius! We got more press than we could have possibly paid for!'
The fact that Mark Ruffalo had made this mistake certainly got a lot of press, precisely because spoilers are usually kept so close to the vest with Marvel. This got the new film talked about quite a lot in the days leading up to its wide release, which is never a bad thing.
As far as why the spoiler wasn't that big an issue. Chris Hemsworth believes that most of those listening online couldn't hear most of the scene over the laughter of the audience anyway, so nothing was really revealed. However, the laughter itself had its own positive impact. According to Hemsworth...
Wait, wait, that was actually genius! There might be some strategy there, because [the audience] laughed so hard during that [footage]. All [viewers] could hear was laughing. They went, 'It must be good!'
At this point, if you want Avengers: Endgame spoilers, Mark Ruffalo is probably the last guy to get them from, he's going to be on high alert. Of course, it's not like Endgame needs any more publicity. It's outselling Avengers: Infinity War when it comes to ticket pre-sales, which means the film is already looking like it's going to be one of the highest grossing films ever made.