In normal case I use a simple 1 MOhm potentiometer for this job. I would like to replace the potentiometer with arduinoNo...
Not 1 Meg... Not if your volume control is in-between the audio player and your headphones. Most headphones are around 32 - 64 ohms. Some "high-impedance" headphones are 600 ohms. A 100 ohm pot is more like it.
A volume control on the line-level input
-side of a headphone amp would be in the range of 10k - 100k ohms. A pot on a guitar amp input might be 1M.
I encourage you to experiment with a regular (mechanical) pot (or a pair for stereo) before you buy a digital pot.
Also, volume controls are not regular linear pots. They have an "audio taper" (approximately logarithimic). You will need to program that into your firmware (sketch), or else "half-way" will sound too loud... But that's something you can experiment with once you get it working.