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

feature: expose version from player.version() #8543

Merged
merged 5 commits into from Jan 4, 2024
Merged

feature: expose version from player.version() #8543

merged 5 commits into from Jan 4, 2024

Conversation

Svarozic
Copy link
Contributor

@Svarozic Svarozic commented Jan 3, 2024

Description

Expose version from player.version(), Issue #8538

Specific Changes proposed

Please list the specific changes involved in this pull request.

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chrome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
  • Reviewed by Two Core Contributors

Copy link

welcome bot commented Jan 3, 2024

💖 Thanks for opening this pull request! 💖

Things that will help get your PR across the finish line:

  • Run npm run lint -- --errors locally to catch formatting errors earlier.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

Copy link

codecov bot commented Jan 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (09c9bfb) 82.71% compared to head (dbdb1b9) 82.71%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8543   +/-   ##
=======================================
  Coverage   82.71%   82.71%           
=======================================
  Files         113      113           
  Lines        7612     7614    +2     
  Branches     1830     1830           
=======================================
+ Hits         6296     6298    +2     
  Misses       1316     1316           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/js/player.js Outdated Show resolved Hide resolved
Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

src/js/player.js Outdated
* Video.js version
*/
version() {
return version;
Copy link
Member

@gkatsev gkatsev Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think rather than returning just the string, we should return an object with a video.js property (to match package name) for this version.

This way, we can extend this to add plugin and tech versions in here too, similar to https://github.com/videojs/http-streaming/blob/main/src/videojs-http-streaming.js#L1173-L1180

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed 3b10e8c

Copy link
Contributor

@amtins amtins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks again for your contribution 👍🏽

Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

src/js/player.js Outdated Show resolved Hide resolved
@gkatsev gkatsev merged commit abdfaac into videojs:main Jan 4, 2024
10 checks passed
Copy link

welcome bot commented Jan 4, 2024

Congrats on merging your first pull request! 🎉🎉🎉

@Svarozic
Copy link
Contributor Author

Svarozic commented Jan 4, 2024

@gkatsev @amtins big thank you for your support in my created issue and this PR :)

@Svarozic Svarozic deleted the feature/expose-version-from-player branch January 4, 2024 14:53
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

Successfully merging this pull request may close these issues.

None yet

3 participants