Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report playback stopped when media finishes
This consolidates the logic for reporting stopped playback to the server. The MEDIA_FINISHED event is fired when: * End of stream is reached * Error encountered * Playback has been stopped * Playback was interrupted because a new item was loaded https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.events#.EndedReason The current position reported to the server will be the current time reported by the Cast player which will be the most accurate representation. If this is not available, it will fall back to the existing logic of checking the current playback position from the receiver's playback state.
- Loading branch information