Whats your chain? iPad is the source feeding into the TV and then TV feeding Audio to a Bluetooth speaker?
For iPad and TV connectivity, your best choice would be an Apple TV. That will sort out all connectivity issues.
If not, then you can try an Apple AV adaptor which will be a wired connection. Some apps might not work though, you'll have to research on that.
Apple MJ1K2ZM/A USB-C Digital AV Multiport Adapter
OR
Apple Digital AV Adapter, MD098ZM/A
OR
Another option would be Anycast, similar to chrome cast. CHromecast can work with iOS too with limited capability.
Anycast wifi HDMI Dongle Wireless Display For Iphone Ipad Windows Pc Android,Tablets to TV Selector Box Airplay WiFi Display Miracast By SEC
For Bluetooth to the speaker, you will need a transmitter connected to the TV probably to the headphone out. The speaker should be able to latch on to it and play the sound. You would need something like this
Bluetooth Transmitter and Receiver, Mpow Streambot 2-In-1 Wireless Bluetooth Audio Music Streaming Switchable Transmitter and Receiver With 3.5mm Stereo Output
MaSh