They're inconsistent. On Firefox Android you can't play in the background using the mobile site but if you switch to the desktop site all of a sudden background play starts working.
That's because Google deliberately prevents background playback on mobile devices, bringing mobile browsers down to the same level of the YouTube app using shady JavaScript APIs. This add-on should fix it: https://addons.mozilla.org/en-US/firefox/addon/video-backgro...