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

requestVideoFrameCallback broken for audio players #7807

Closed
joeflateau opened this issue Jun 20, 2022 · 6 comments · Fixed by #7812
Closed

requestVideoFrameCallback broken for audio players #7807

joeflateau opened this issue Jun 20, 2022 · 6 comments · Fixed by #7812
Labels

Comments

@joeflateau
Copy link
Contributor

joeflateau commented Jun 20, 2022

Description

initializing a videojs object on an element in a browser that supports requestVideoFrameCallback results in an error because requestVideoFrameCallback is not available on an element.

Reduced test case

No response

Steps to reproduce

const audioPlayer = videojs(document.createElement('audio'));
  audioPlayer.src({
    type: 'application/x-mpegURL',
    src: 'https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8',
  });

Errors

video.es.js:20691 Uncaught TypeError: this.el_.requestVideoFrameCallback is not a function
at Html52.requestVideoFrameCallback (video.es.js:20691:23)
at TextTrack2.startTracking (video.es.js:7972:28)
at new TextTrack2 (video.es.js:7813:13)
at new HTMLTrackElement2 (video.es.js:8298:17)
at Html52.createRemoteTextTrack (video.es.js:9223:12)
at Html52.createRemoteTextTrack (video.es.js:20826:52)
at Html52.addRemoteTextTrack (video.es.js:9254:33)
at Html52.addRemoteTextTrack (video.es.js:20872:63)
at new MasterPlaylistController2 (video.es.js:51098:40)
at VhsHandler2.src (video.es.js:54512:38)

What version of Video.js are you using?

7.19.2

Video.js plugins used.

none

What browser(s) including version(s) does this occur with?

Chrome 102

What OS(es) and version(s) does this occur with?

MacOS 12.4

@joeflateau joeflateau added bug needs: triage This issue needs to be reviewed labels Jun 20, 2022
@gkatsev
Copy link
Member

gkatsev commented Jun 20, 2022

Should be fixed in 7.20.1 via #7778

@joeflateau
Copy link
Contributor Author

my fault, i searched issues but not PRs

@gkatsev
Copy link
Member

gkatsev commented Jun 20, 2022

No worries

@TimmNL
Copy link

TimmNL commented Jun 24, 2022

With version 7.20.1 I get the exact same error. I've added an example of my code in the following sandbox: https://codesandbox.io/s/zen-rubin-grq8sr

@joeflateau
Copy link
Contributor Author

yeah, i just confirmed it. looks like this.setSource (src/js/tech/html5.js:47) calls requestVideoFrameCallback before src/js/tech/html5.js:117 has a chance to say it's not supported on this element.

@joeflateau joeflateau reopened this Jun 24, 2022
@joeflateau
Copy link
Contributor Author

@TimmNL for now you can omit the sources option and, instead, call player.src() with your sources after the player is initialized

@mister-ben mister-ben removed the needs: triage This issue needs to be reviewed label Jun 28, 2022
gkatsev pushed a commit that referenced this issue Jun 28, 2022
…ce (#7812)

the tech needs to know whether or not the underlying element supports requestVideoFrameCallback before calling setSource

Fixes #7807
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2022
misteroneill pushed a commit that referenced this issue Nov 22, 2022
…ce (#7812)

the tech needs to know whether or not the underlying element supports requestVideoFrameCallback before calling setSource

Fixes #7807
edirub pushed a commit to edirub/video.js that referenced this issue Jun 8, 2023
…ce (videojs#7812)

the tech needs to know whether or not the underlying element supports requestVideoFrameCallback before calling setSource

Fixes videojs#7807
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants