Bug 196000 - [WPE][GStreamer] Audio element with a streaming source loops indefinitely
Summary: [WPE][GStreamer] Audio element with a streaming source loops indefinitely
Status: RESOLVED DUPLICATE of bug 189471
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Other
Hardware: Other Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-20 06:40 PDT by softrobot
Modified: 2019-03-22 03:43 PDT (History)
4 users (show)

See Also:


Attachments
GStreamer log (256.71 KB, text/x-log)
2019-03-20 07:27 PDT, softrobot
no flags Details
GStreamer log with WPE 2.23.91 (205.40 KB, text/x-log)
2019-03-22 03:43 PDT, softrobot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description softrobot 2019-03-20 06:40:14 PDT
Hi!
I've encountered a problem with streaming audio using an HTML Audio element on WPE Webkit.
I am using the latest WPE 2.22.5 on Raspberry Pi 3 with Buildroot / musl toolkit, powered by Cog and an rdk backend (web audio & media apis enabled).
When streaming the audio from a server, the browser keeps looping the audio, repeatedly making requests for the URL.
On my desktop, the audio plays only once. I prepared an example here:

http://softbot.avner.us/test/

The server runs Node.JS and pipes the audio file like so:

app.get('/api/stream', (req, res) => {
    res.type("audio/mpeg");
    fs.createReadStream("public/test/speak.mpga").pipe(res);
}


The client streams it like so:

let speech  = document.createElement('audio');
speech.type = 'audio/mpeg';
speech.src  = '/api/stream';
speech.play();

I noticed however that if I set the source to an actual file on the server, where the content-length is known and the transfer is not chunked, the audio only plays once. For example here:

http://softbot.avner.us/test/file.html

My buildroot config can be found here:
https://github.com/Avnerus/softbot-buildroot/blob/softbot/configs/raspberrypi3_softbot_defconfig

Thank you!

/Avner
Comment 1 Philippe Normand 2019-03-20 07:15:31 PDT
Hi Avner,

I can't reproduce this issue on my desktop nor on my i.MX6 board, both using WebKit trunk. Is there a chance you could try with an SVN checkout? Or at least with the WPE 2.23.91 pre-release?
Comment 2 Philippe Normand 2019-03-20 07:17:15 PDT
Can you please also attach a log file?

GST_DEBUG_FILE=gst.log GST_DEBUG="3,webkit*:6" cog ...
Comment 3 softrobot 2019-03-20 07:27:02 PDT
Created attachment 365344 [details]
GStreamer log
Comment 4 softrobot 2019-03-20 07:29:07 PDT
Hi,
Thanks for the quick care!
Attached the log file. Seeing something interesting :

"Unhandled GStreamer message type: stream-status"

Am I missing something from GStreamer?

Do you have a quick Buildroot config that I could try? Currently using:

WPEWEBKIT_VERSION = 2.22.5
WPEWEBKIT_SITE = http://www.wpewebkit.org/releases
WPEWEBKIT_SOURCE = wpewebkit-$(WPEWEBKIT_VERSION).tar.xz

/Avner
Comment 5 Philippe Normand 2019-03-20 07:32:18 PDT
(In reply to softrobot from comment #4)
> Hi,
> Thanks for the quick care!
> Attached the log file. Seeing something interesting :
> 
> "Unhandled GStreamer message type: stream-status"
> 

I don't think this is relevant.

> Am I missing something from GStreamer?
> 

I'll check the log

> Do you have a quick Buildroot config that I could try? Currently using:
> 
> WPEWEBKIT_VERSION = 2.22.5

Change this to 2.23.91 ? You will also need pre-releases of libwpe, dunno about the wpebackend-rdk.

Here I don't use buildroot unfortunately. But I'm CCing Adrian, who's maintaining the upstream buildroot WPE recipe (I think? :))

> WPEWEBKIT_SITE = http://www.wpewebkit.org/releases
> WPEWEBKIT_SOURCE = wpewebkit-$(WPEWEBKIT_VERSION).tar.xz
> 
> /Avner
Comment 6 Philippe Normand 2019-03-20 07:54:00 PDT

*** This bug has been marked as a duplicate of bug 189471 ***
Comment 7 softrobot 2019-03-22 03:43:00 PDT
Created attachment 365703 [details]
GStreamer log with WPE 2.23.91
Comment 8 softrobot 2019-03-22 03:43:36 PDT
Hi,
I am still experiencing the issue with WPE 2.23.91
Attaching the log file.