Playing some sounds from file


#1

#Passing a file as stream to play in renderer process

Hy i’m recently started to play with electron using webtorrents and others cool libraries. I’m trying to make a little music but I don’t know how to do some things.

I have files partialy download, but I want to play them into the renderer proccess even it’s not completed yet. I have two options:

get a ReadableStream or Buffer in the main proccess and them pass it to renderer by ipc message, but this is not working because I get a string and not a complete object because node politicy.

Actualy I’m reading the file directly from disc but when I add them to the html the file stop play before his finished because it’s not completely downloaded, but f I play it again the duration of the play it’s greater becasuse the file now have more content downloaded.

so now I don’t know whats my best option to get a complete play of the file.

Thanks for any help :slight_smile: