You have multiple choices on how to accomplish this:
Using a headset
If you've got a 1-button-headset connected, you can facilitate that button. There are multiple apps on the playstore providing enhanced possibilities to this -- just search for "headset-control. Having a Philips headset, I use Philips Headset, which works pretty well; you might have to try several of the available choices to find the one suiting you best.
Most of these apps offer things like:
- configure a media player app to be started as soon as the headset gets connected
- play/pause (or accept an incoming call) with a single press
- skip forward (or reject an incoming call) pressing twice
- increase volume by holding the button, decrease it by one click followed by holding it
- skip backward (triple click)
Actions are usually configurable.
Without a headset
Re-defining a hardware button can be achieved e.g. using Tasker, which is an automation app for Android (to be more precise: it's the most complete automation app available; costs ~ 5 Euro, a 7-day-trial is available at the homepage, but it's worth every cent). The Tasker manual states:
Simulate Media Button: when selected, any media player which listens for Media Button events can be controlled. Without it, the only the Android system media player will respond.
Note: the Toggle Pause function may not work unless playback has already been started manually.
And yes: You can bind that action to...
- Button: Camera
- Button: Long Search
amongst others. You could even bind it to a "shake pattern" (e.g. shake left-right to skip a title).
- Condition: Event → Hardware → Button: Camera
- Task: Media → Media Control → Cmd: Toggle Pause