Should I not listen to music with headphones while crossing the street?

A friend of mine says that when I cross the road I may not hear a car being driven. When I listen to music, I just look in front of me. But it has become a habit for me. Is it inconvenient?
Should I not listen to music with headphones while crossing the street?
Post Opinion