The smaller music labels took less time than the major ones, but Winamp came out in 1997 and Napster came out in 1999. Portable MP3 players started becoming a thing then too. By the time Napster was nuked from orbit, it was pretty obvious that people wanted to buy music online. 2004 is an eternity from then.
Ebooks were adopted by some publishers fairly early on. Baen started their free library in 1999. Fictionwise started in 2000.
MP3 players were useful even if the major labels wouldn’t sell you music. You could rip your CD collection or obtain MP3s in other ways. Ereaders weren’t quite as useful unless your preferred reading material was published as an ebook. If you liked military science fiction, great. If you wanted something not available, someone had to scan and OCR their copy or type it in.