When the player is paused, state = playing event is sent. When played again, a state = pause event is sent. This situation did not seem normal to us. Could you check please?
@yavuz.tepeli It seems there might be a misunderstanding in interpreting the events. Could you kindly clarify your reference to the state in this context?
The player initiates events based on the player state, the play event is triggered upon clicking the play button, and the pause event is emitted when the pause button is clicked. In the demo, you will notice that
On Play: {"type":"play","timestamp":1704038778006,"time":5.390235,"issuer":"ui"}
is logged upon the play button click, and
On Paused: {"type":"paused","timestamp":1704038782424,"time":9.662712,"issuer":"ui"}
sending the events in the order you reported is the correct behaviour for analytics, since events/states are always reported once they are finished (or in the case of playing with a heartbeat every 60seconds).
So as an example, if the player is playing and the user presses pause, the playing sample is closed and sent to the backend (with the information how long the player was in the playing state).
Is there a problem with the metrics that looked wrong to you and would indicate a bug?