If the compiler complains already about the FilePlayer& fileplayer declaration in the class members, it probably means your constructor is not taking in the reference to the actual fileplayer instance. (Class member references always have to be initialized during construction.)
If it complains about fileplayer.audioTransportSource.setPosition(slider.getValue()), it probably means the audioTransportSource is private to the FilePlayer. So you would need to add the setPosition method in the FilePlayer and call the setPosition of the audioTransportSource from that.
It’s kind of difficult to say much more without seeing all of your code.