stream.new icon indicating copy to clipboard operation
stream.new copied to clipboard

deleted assets: thumbnail flashes before showing error

Open dylanjha opened this issue 4 years ago • 0 comments

Repro steps

  • upload a video
  • view the video
  • delete the asset from Mux
  • try to view the video
  • see that the thumbnail flashes before showing an error message

thumbnail-flash

Internally, this is what's happening:

  • video player loads with poster= attribute
  • even though the asset is deleted, previously rendered thumbnail images are cached by cdns for a while (days), so the request to load the poster image (thumbnail) succeeds
  • the m3u8 playlist 404s, which triggers the correct error "This video does not exist"

Solution -- maybe there's something better but this is the best idea I have:

  • before rendering the video player do a fetch GET to the m3u8, if it 404s then fallback into the error state

dylanjha avatar Oct 05 '20 14:10 dylanjha