Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initially selected source has to have absolute URL #107

Open
ingomueller-net opened this issue Apr 12, 2024 · 2 comments
Open

Initially selected source has to have absolute URL #107

ingomueller-net opened this issue Apr 12, 2024 · 2 comments

Comments

@ingomueller-net
Copy link

I initially had a snippet like this one:

<video id="vjs-video" class="video-js vjs-default-skin" width="640" height="360" preload="metadata" controls poster="static/video.jpg">
  <source src="static/video-1080.mp4" type='video/mp4' label='1080' selected='true' />
  <source src="static/video-720.mp4" type='video/mp4' label='720' />
</video>

When I would change the quality in the GUI, I'd get the following error in the console in Chrome (and the quality would not change):

video.min.js:12 VIDEOJS: ERROR: TypeError: Cannot set properties of undefined (setting 'selected')
    at b.<anonymous> (silvermine-videojs-quality-selector.js:3443:22)
    at a.dispatcher.a.dispatcher (video.min.js:12:12786)
    at ht (video.min.js:12:13782)
    at b.trigger (video.min.js:12:17775)
    at o.value (silvermine-videojs-quality-selector.js:3276:23)
    at o.handleClick_ (video.min.js:12:84197)
    at a.dispatcher.a.dispatcher (video.min.js:12:12786)

When I changed the src of the first, i.e., initially selected source, everything worked as expected. I guess that this is a bug?

@unixfox
Copy link

unixfox commented Apr 28, 2024

Can replicate, this bug has started to appear in video.js 8.

EDIT: Seems like it's due to an upstream bug, I have created a github issue: videojs/video.js#8712

@unixfox
Copy link

unixfox commented Jul 13, 2024

@ingomueller-net or anyone else reading, there is a fix for this here: videojs/video.js#8712 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants