Could Someone give me a hand? Thanks

Im trying to create a streaming music player for a website and I want to preload a certain number of bytes before it plays could someone help me on how to do this?