Skip to content

Commit

Permalink
feat(FEC-9344): adding playbackSpeed to view event (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyBregman authored Nov 28, 2019
1 parent 498576b commit 8eec2d9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
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

0 comments on commit 8eec2d9

Please sign in to comment.