I'm building a Windows Universal App, and I'm looking for the equivalent of this code in C#
var media = new Blob([bytes], { type: "audio/mpeg" });
var url = window.URL.createObjectURL(media, { oneTimeOnly: true });
Basically, I have streams that I download, and want to play in the background; however, they need to be "saved" as an audio file locally, and I'm not sure how to do that in C#.
The Object type “Blob” and function “createObjectURL” are both new HTML5 features. It is supported by the host (browser) and different browsers may have the different implementations, so it is very difficult to do the same thing in C#.
To save an audio file locally, you can use the StorageFile class in Windows Runtime.