The media has a huge impact in shaping the public opinion of the masses. They can form or modify the public opinion in different ways depending of what is the objective. (For example)The candidates that can pay for more Tv and media exposure have more influence on public opinion and thus can receive more votes.
Hope this was helpful!