Skip to content

player does not recover after losing live stream #1313

Description

@JustinWebDev

I tested with https://media-chrome.mux.dev/examples/vanilla/themes/tailwind-audio-theme.html

If the player connects to the live stream (user clicks play button) and then gets disconnected (streaming server goes down, or the stream itself stops):
a) the audio element reports: console.log(Error code: ${aud.error.code}; msg: ${aud.error.message}) //Error code: 4; msg: Failed to open media
b) the play button changes from pause back to play

Then, if the server and stream are back online, when you click the play button nothing happens.

This is the code I put in the console of that webpage to test:

let aud = document.getElementsByTagName('audio')[0]
aud.setAttribute('preload',"none")
aud.onplay = () => {console.log("play it sam")}
aud.onready = () => { console.info("onready") }
aud.onwaiting = () => {console.info("onwaiting") }
aud.onplaying = () => {console.info("onplaying" ) }
aud.onerror = () => {
    console.info("error on player" )
    console.log(`Error code: ${aud.error.code}; msg: ${aud.error.message}`)
  }
aud.onstalled = () => {console.info("onstalled") }
aud.onpause = () => {console.info("onpause")  }
aud.onabort = () => { console.info("onabort") }
aud.onloadstart = () => { console.info("onloadstart") }
aud.onsuspend = () => { console.info("onsuspend") }
aud.onended = () => { console.info("onended"); aud.load()}
aud.oncanplaythrough = () => { console.info("oncanplaythrough") }
aud.src="https://host_of_my_server.org/live.oga"

LIKEWISE, if you the server is not online when you first press play, the play button gets stuck on the pause button and it won't toggle back to play. So, when the player hits error code 4, it seems, it gets stuck.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions