3

I want to play a audio/ogg; codecs=opus audio file in Safari browser. Due to some limitations, our server cannot do the conversion to some other format playable on Safari (caf-opus/wav/mp3).

I wish to do the conversion, on the client side, from ogg to other formats such as caf, mp3, wav which are supported by Safari. We use angular 8.

How can I convert ogg contents to caf container format in angular? Since both have codes opus and just the container format is different, is it easy to do this?

I've looked into the following libraries, but not had success:

user5155835
  • 4,392
  • 4
  • 53
  • 97
  • May I ask why do you need to convert to another format? Once you decode on client side, you can always play raw pcm segments. – user1462442 Dec 18 '19 at 23:11

1 Answers1

1

Ogg Opus is supported in Safari 11+ with WebAssembly:

https://fetch-stream-audio.anthum.com/ https://github.com/AnthumChris/fetch-stream-audio

anthumchris
  • 8,245
  • 2
  • 28
  • 53