DIY portable bluetooth speaker; charging/battery question
I'll assume both input ports are connected in parallel (at least that's what makes sense to me), so that you can input power in any of those indifferently - If they have a warning saying you should not connect a power supply in both at the same time, then that's definitely the case.
About the charging and powering up at the same time, you should be looking at a PMOS transistor. Look up some power transistors. Also a Schottky diode.
As for the circuit to allow charging and powering up the circuit at the same time, here's a simplistic sketch:

When you have 12V at the input, the battery charger will charge the battery, and the PMOS will not allow current to flow from the battery to the circuit, so the amplifier will be powered by the 12V directly. When you disconnect the voltage from the 12V input, the current will flow through the transistor's inner diode.
This allows you to power your amplifier and charge the battery at the same time when you connect the 12V at a single input.