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

feat(FEC-9344): adding playbackSpeed to view event #60

Merged
merged 2 commits into from
Nov 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/kava-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Here we will see some explanation about each event. When does it sent and what p
- [`networkConnectionType`](./kava-parameters.md#networkConnectionType)
- [`networkConnectionOverhead`](./kava-parameters.md#networkConnectionOverhead)
- [`flavorParamsId`](./kava-parameters.md#flavorParamsId)
- [`playbackSpeed`](./kava-parameters.md#playbackSpeed)
- Sent every 10 second of active playback (when player is paused, view timer should be paused/stopped).
- 30 seconds without VIEW event will reset KAVA session, so all the VIEW [specific parameters](#endSessionResetParams) should be reset also.
- Server may notify Kava (via response field ["viewEventsEnabled" = false](#serverResponse)) to shut down VIEW events. When it happens, VIEW events should be blocked from sending until server decides to enable VIEW events again.
Expand All @@ -56,7 +57,7 @@ Here we will see some explanation about each event. When does it sent and what p

- Event ID: `1`
- Player Event: `SOURCE_SELECTED`
- Event Parameters:
- Event Parameters:
- [`COMMON_PARAMS`](./kava-parameters.md#common_params)
- [`playerJSLoadTime`](./kava-parameters.md#playerJSLoadTime)

Expand Down
3 changes: 2 additions & 1 deletion src/kava-event-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export const KavaEventModel: {[event: string]: KavaEvent} = {
audioLanguage: model.getLanguage(),
captionsLanguage: model.getCaption(),
soundMode: model.getSoundMode(),
tabMode: model.getTabMode()
tabMode: model.getTabMode(),
playbackSpeed: model.getPlaybackSpeed()
};

if (!isNaN(model.getForwardBufferHealth())) {
Expand Down
3 changes: 2 additions & 1 deletion test/src/kava-event-model.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ describe('KavaEventModel', () => {
targetBuffer: fakeModel.getTargetBuffer(),
networkConnectionType: fakeModel.getNetworkConnectionType(),
networkConnectionOverhead: fakeModel.getNetworkConnectionOverhead(),
flavorParamsId: fakeModel.getFlavorParamsId()
flavorParamsId: fakeModel.getFlavorParamsId(),
playbackSpeed: fakeModel.getPlaybackSpeed()
});
});

Expand Down
3 changes: 2 additions & 1 deletion test/src/kava.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,8 @@ describe('KavaPlugin', function() {
'soundMode',
'tabMode',
'networkConnectionType',
'userId'
'userId',
'playbackSpeed'
);
params.networkConnectionType.should.equal('2g');
params.tabMode.should.equal(TabMode.TAB_FOCUSED);
Expand Down