Advice needed for parts to build a mini-speaker!

Good day Arduino Community

I am trying to build my own mini speaker project with a function (when a hand covers over the speaker -> it mutes the sound.) I am an amateur trying to figure out the parts before purchasing them. These are the information I gathered and are open to any recommendation.

1x Arduino Nano (to fit into a small speaker-size)
1x Mono 2.5W Class D Audio Amplifier - PAM8302
1x Speaker (3.3V, 4Ohms)
1x Digital Potentiometer (Pehaps MCP42100, MCP10xxx?)
1x Audio Jack (connecting phone from a wire, not too sure if Bluetooth is complicated)
1x Power (powering the Arduino board by wire)
1x Photoresistor sensor (to detect any hand covering)

Would really appreciate if anyone could give any advice, Thank you and cheers

You could do this without an Arduino. An op-amp as a comparator could detect the change in the photoresistor, and then you could control an analog switch or a driver & relay. And for on-off you don't really need a digital pot. (And, you would need the microcontroller if you're going to use the pot.)

But, if you want to us an Arduino your parts should work.

I am trying to build my own mini speaker project with a function (when a hand covers over the speaker -> it mutes the sound.)

What happens at night?

...not too sure if Bluetooth is complicated)

It would have to be a stand-alone Bluetooth audio receiver. The Arduino isn't fast enough for Bluetooth audio.

hello DVDdoug, thank you for your reply. Ideally for the function, the speaker would mute(decrease) from a certain volume to 0 gradually (and removing the hand would increase back to its original volume.) I am not too sure for the difference between a digital pot and a micro controller, but hey cool, I will check it out.

What happens at night?

lol. Yea I am aware there is would be flawed. I trying to keep it simple and use what I have to make it work(to show a working prototype), I might be substituting it with either a Infrared Obstacle Avoidance Sensor or QRE1113 Line Sensor Breakout - Analog.

https://evive.cc/wp-content/uploads/2017/11/IR-SENSOR1.jpg

https://d1s30lqb5dw36k.cloudfront.net/images/thumbnails/295/295/product/4/09453-01-M.jpg?t=1519089017