What you need to do is set up your Pi for 'A2DB sink mode'. I found the follwing instructions on this page:
Start by install / updating all the packages
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install pulseaudio-module-bluetooth bluez-tools
Add users to groups. This is very important. If using any other distro, replace ‘xbian’ with your username.
sudo gpasswd -a xbian pulse
sudo gpasswd -a xbian lp
sudo gpasswd -a pulse lp
sudo gpasswd -a xbian audio
sudo gpasswd -a pulse audio
Set up PulseAudio, Bluetooth Device Class
sudo sh -c "echo 'extra-arguments = --exit-idle-time=-1 --log-target=syslog' >> /etc/pulse/client.conf"
sudo hciconfig hci0 up
sudo hciconfig hci0 class 0x200420
Note: The Bluetooth service/device class 0x200420 mean the device is set up for Car Audio. See this link to explore more Bluetooth Class options.
To pair with a device, we will need to use the “bluetoothctl” tool.
Set the agent to KeyboardOnly and make it default. This needs to be done once only. Inside bluetoothctl, run the following commands:
Turn on bluetooth on your phone/tablet and make sure it is discoverable. Run the following commands inside bluetoothctl:
Note: xx:xx:xx:.. is the MAC address of your handset/device. After running ‘scan on’, wait a minute for your device to show up along with it’s MAC address. After running ‘pair xx:xx:xx:..’ check your device and accept the incoming connection. Do the same on terminal by typing yes.
Now connect to the Raspberry Pi from your handset and it should connect as an audio device. All audio played through the device should now be output using Raspberry Pi’s HDMI or Analog out depending on your Pi’s configuration.
If the connection fails, try again, sometimes it takes 2 attempts.