-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: Add reporting rendered framerate #77
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please add a Changelog entry
- Please open the PR against
develop
- Optional: Please add unit tests 🙂
Just to be clear on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please clarify if RENDERED_FRAMERATE
is the right field for the data we provide.
Code change looks good and straightforward, please see the comments around the tests.
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) | |||
and this project adheres to [Semantic Versioning](http://semver.org/). | |||
|
|||
## [Unreleased] | |||
### Added | |||
- Tracking the current framerate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Tracking the current framerate | |
- Tracking the framerate for the currently played video quality based on the framerate specified in the manifest file |
@@ -241,7 +241,7 @@ interface EventEmitter { | |||
|
|||
fireAdErrorEvent(): void; | |||
|
|||
fireVideoPlaybackQualityChangedEvent(bitrate: number): void; | |||
fireVideoPlaybackQualityChangedEvent(bitrate: number, frameRate: number): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make frameRate
optional, so we can test events with and without frameRate
being available.
@@ -422,7 +422,7 @@ class PlayerEventHelper implements EventEmitter { | |||
}); | |||
} | |||
|
|||
fireVideoPlaybackQualityChangedEvent(bitrate: number): void { | |||
fireVideoPlaybackQualityChangedEvent(bitrate: number, frameRate: number): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make frameRate
optional, so we can test events with and without frameRate
being available.
@@ -437,6 +437,7 @@ class PlayerEventHelper implements EventEmitter { | |||
bitrate: bitrate, | |||
width: null, | |||
height: null, | |||
frameRate: frameRate, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please only expose frameRate
if it's passed in the signature
it('report bitrate on event', () => { | ||
playerMock.eventEmitter.firePlayEvent(); | ||
playerMock.eventEmitter.firePlayingEvent(); | ||
playerMock.eventEmitter.fireVideoPlaybackQualityChangedEvent(2_400_000); | ||
playerMock.eventEmitter.fireVideoPlaybackQualityChangedEvent(2_400_000, 30); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test case where we don't pass a frame rate and explicitly check that we don't set it (so we don't accidentally break it in the future)
Added:
targetQuality