Warner Music Group in a regulatory filing on Wednesday said its longest-tenured chief executive, Steve Cooper, will leave the media company by the end of next year.