While tracking core video playback, the following error is sometimes encountered in browser's console:
[ERROR] [MediaHeartbeat] API call trackSessionStart is unsupported in the current state.
What could be the most common reason behind the error?
The most common root cause behind the error is an issue in the Heartbeat implementation. The behavior exists if the implementation is creating a duplicate session (trackSessionStart API is called twice). Or it can also exist if the previous video session hasn’t been closed properly (trackSessionEnd API not called for previous session). In such cases, it's expected for the Heartbeat library to not trigger because of the error.
To resolve the error and rule out the most common mistake, the following needs to be checked:
1) trackSessionStart API isn't called twice or there isn't any duplicate session existing, and/or
2) trackSessionEnd API has been called for the previous session before starting a new trackSessionStart API session.