[wpe-webkit] WPE support for mp3

Enrique Ocaña González eocanha at igalia.com
Fri Mar 4 02:34:44 PST 2022


El jueves, 3 de marzo de 2022 23:10:29 (CET) Patrick Griffis escribió:

> > Does WPE WebKit support playing mp3 content?. Or mp3 has to be encoded
> > inside mp4 for playing mp3 on WPE WebKit?.
> I believe it supported you will just need the GStreamer elements for it
> installed.
> 
> This could be gst-libav (which uses ffmpeg) or the mpg123 element which
> is in gst-plugins-good.

MP3 audio files work on WebKitGTK (I've just checked it by myself here), so 
they should also work fine on WPE because both share the same multimedia stack 
implementation. You can do it like this (also works by using <video>):

<audio controls autoplay src="http://hestia2.cdnstream.com/1277_192" 
type="audio/mpeg" />

On top of that, since https://bugs.webkit.org/show_bug.cgi?id=210341, feeding 
MP3 content to a SourceBuffer (in sequence mode) using Media Source Extensions 
also works.

Of course, as Patrick commented, you need to have the appropriate GStreamer 
plugins installed in order to decode MP3.

Cheers.

-- 
Enrique Ocaña




More information about the webkit-wpe mailing list