Skip to content

Stream periodically stops at client after track ends #320

@klen-list

Description

@klen-list

This happens randomly between different tracks. After reloading page stream continues.
I see the same problem when using BASS: http://www.bass.radio42.com/help/html/322b7ddc-a9f5-21eb-c78a-f5937cd0d2f2.htm

Failed to decode media resource http://localhost:8000/stream. x27 [stream]
Failed to decode media resource http://localhost:8000/stream, error: Error Code: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004)
Details: virtual mozilla::MediaResult __cdecl mozilla::FFmpegAudioDecoder<46465650>::DoDecode(mozilla::MediaRawData *, uint8_t *, int, bool *, mozilla::MediaDataDecoder::DecodedData &): FFmpeg audio error:-1094995529

Sometimes after page load the stream gives out the full length of the track instead of a per-second download:
firefox_rizz3kMOgm
And stops stream after finishing with the above error.

I even tried to export all the tracks to the same bitrate, but it didn't help.

const { PUBLIC_EVENTS, SHUFFLE_METHODS, Station } = require("@fridgefm/radio-core")
const http = require("http")

const station = new Station()
station.addFolder("./stream")

const reqListener = (req, res) => station.connectListener(req, res)
const radio = http.createServer(reqListener)

station.reorderPlaylist(SHUFFLE_METHODS.randomShuffle())

station.on(PUBLIC_EVENTS.NEXT_TRACK, async (track) => {
    const result = await track.getMetaAsync()
    console.log(result.title)
})

station.start()
radio.listen(8000)

It doesn't seem to be happening with your radio in the example. Maybe I'm setting something up wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem rightquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions