videojs / http-streaming

HLS, DASH, and future HTTP streaming protocols library for video.js
https://videojs-http-streaming.netlify.app/
Other
2.53k stars 425 forks source link

Video error on loop of HLS content #1401

Closed jgcaruso closed 1 year ago

jgcaruso commented 1 year ago

Description

When there is a looping video (one or more on the same page) the players all fail to restart and display an error on screen

Multiple videos - error on loop Single video - error on loop Multiple videos, no looping - no error

Fragmented mp4, multiple videos

SCR-20230523-jisl

Sources

I've had this issue with my own source media (fragmented mp4 files) as well as the demo source media from videojs "advanced examples" page

videojs example sources - used in first 3 test pages above https://d2zihajmogu5jn.cloudfront.net/elephantsdream/hls/ed_hd.m3u8 https://d2zihajmogu5jn.cloudfront.net/sintel/master.m3u8 https://d2zihajmogu5jn.cloudfront.net/big-buck-bunny/master.m3u8

Some of my own source media - used in fragmented test page above https://videos.files.wordpress.com/EnQKgGDc/video-a52836b5c2_mp4.adaptive_4.m3u8 https://videos.files.wordpress.com/g6bCyLO7/molly_iphone_img_4058_mov.adaptive_4.m3u8 https://videos.files.wordpress.com/NGYE1Hqy/video-206c645332_mp4.adaptive_3.m3u8

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. Open the provided reproduction pages from the description in Firefox
  2. if the videos aren't set to auto play, press play
  3. skip to the end of each of the videos (last 10 seconds)
  4. wait for the videos to end, they will all show an error message instead of looping
  5. for the page with looping disabled, the videos should play to the end

Results

Expected

The videos should loop without failing

Error output

If there are any errors in the console, from the player, or anywhere else please include them here:

SCR-20230523-jjcf
Media resource blob:https://cloudy-nervous-molecule.glitch.me/a473c864-727a-436c-bc43-05704e9e1636 could not be decoded. [index.html](https://cloudy-nervous-molecule.glitch.me/index.html)
VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) The media playback was aborted due to a corruption problem or because the media used features your browser did not support. 
Object { code: 3, message: "The media playback was aborted due to a corruption problem or because the media used features your browser did not support." }
[video.js:206:47](https://vjs.zencdn.net/8.3.0/video.js)
Media resource blob:https://cloudy-nervous-molecule.glitch.me/a473c864-727a-436c-bc43-05704e9e1636 could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_WAITING_FOR_DATA (0x806e0009) [index.html](https://cloudy-nervous-molecule.glitch.me/index.html)
Media resource blob:https://cloudy-nervous-molecule.glitch.me/a31c6d07-467d-4586-89c1-f98cb004c78f could not be decoded. [index.html](https://cloudy-nervous-molecule.glitch.me/index.html)
VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) The media playback was aborted due to a corruption problem or because the media used features your browser did not support. 
Object { code: 3, message: "The media playback was aborted due to a corruption problem or because the media used features your browser did not support." }
[video.js:206:47](https://vjs.zencdn.net/8.3.0/video.js)
Media resource blob:https://cloudy-nervous-molecule.glitch.me/a31c6d07-467d-4586-89c1-f98cb004c78f could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_WAITING_FOR_DATA (0x806e0009) [index.html](https://cloudy-nervous-molecule.glitch.me/index.html)
Media resource blob:https://cloudy-nervous-molecule.glitch.me/c3db30fc-a390-40a3-8bb7-910ba9a94663 could not be decoded. [index.html](https://cloudy-nervous-molecule.glitch.me/index.html)
VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) The media playback was aborted due to a corruption problem or because the media used features your browser did not support. 
Object { code: 3, message: "The media playback was aborted due to a corruption problem or because the media used features your browser did not support." }
[video.js:206:47](https://vjs.zencdn.net/8.3.0/video.js)
Media resource blob:https://cloudy-nervous-molecule.glitch.me/c3db30fc-a390-40a3-8bb7-910ba9a94663 could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_WAITING_FOR_DATA (0x806e0009) [index.html](https://cloudy-nervous-molecule.glitch.me/index.html)
Media resource blob:https://cloudy-nervous-molecule.glitch.me/a31c6d07-467d-4586-89c1-f98cb004c78f could not be decoded. [index.html](https://cloudy-nervous-molecule.glitch.me/index.html)
Media resource blob:https://cloudy-nervous-molecule.glitch.me/a473c864-727a-436c-bc43-05704e9e1636 could not be decoded. [index.html](https://cloudy-nervous-molecule.glitch.me/index.html)
Media resource blob:https://cloudy-nervous-molecule.glitch.me/c3db30fc-a390-40a3-8bb7-910ba9a94663 could not be decoded. [index.html](https://cloudy-nervous-molecule.glitch.me/index.html)
Media resource blob:https://cloudy-nervous-molecule.glitch.me/a31c6d07-467d-4586-89c1-f98cb004c78f could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_WAITING_FOR_DATA (0x806e0009) [index.html](https://cloudy-nervous-molecule.glitch.me/index.html)

Additional Information

This seems to be easily reproduced in Firefox. I think I've seen similar issues in Chrome, but at the moment I'm not able to reproduce there. Its possible what I recall seeing in Chrome is a different issue that just presents the same error screen.

videojs-http-streaming version

videojs-http-streaming 2.16.2 and 3.3.1

videojs version

video.js 8.3.0

Browsers

what browsers are affected? please include browser and version for each

Platforms

what platforms are affected? please include operating system and version or device and version for each

Other Plugins

are any other videojs plugins being used on the page? If so, please list them with version below.

Other JavaScript

are you using any other javascript libraries or frameworks on the page? if so please list them below.

video-archivist-bot commented 1 year ago

Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:

adrums86 commented 1 year ago

Hi @jgcaruso, I suspect the issue is actually fixed in FireFox 115. I ran into this bug a while ago and discovered it was an issue with setting the loop attribute on the video element combined with source buffer trimming, so I filed a bug. See: https://bugzilla.mozilla.org/show_bug.cgi?id=1829086.

You can test against https://www.mozilla.org/en-US/firefox/115.0a1/releasenotes/

If that doesn't work please tag me and I'll gladly take a closer look.

jgcaruso commented 1 year ago

@adrums86 thanks for that!

It does seem to be working well in Firefox 115! I've had the videos playing for a while now, refreshing occasionally as well.

adrums86 commented 1 year ago

Closing this since it seems to be a FireFox issue. Feel free to open a new issue if necessary.