aws-amplify / aws-amplify/amplify-ui-android
Liveness VideoEndTimeStamp Used for Metrics is Incorrect
- Dominant language
- Kotlin
- Stars
- 25
- Forks
- 18
- Avg merge
- 7d 3h
- Merged PRs (30d)
- 1
Description
### Before creating a new issue, please confirm:
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-ui-android/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-ui-android/blob/main/CONTRIBUTING.md#reporting-bugsfeature-requests).
### Which UI component?
Liveness
### Gradle script dependencies
n/a
### Environment information
n/a
### Please include any relevant guides or documentation you're referencing
_No response_
### Describe the bug
https://github.com/aws-amplify/amplify-android/blob/6bbb8c466e274caee8dca674d1acb6e8cbe5e372/aws-predictions/src/main/java/com/amplifyframework/predictions/aws/http/LivenessWebSocket.kt#L475
`videoEndTimestamp` ends up being the start time of the last video chunk containing data. This last video chunk could range from 0-1 seconds of content, resulting in the timestamp being off. This value is only used for metrics, and does not impact the challenge, as the actual end is determined by sending the empty video event.
For metric purposes, we should look to adjust this timestamp to be the proper end time.
### Reproduction steps (if applicable)
_No response_
### Code Snippet
```java
// Put your code below this line.
```
### Log output
```
// Put your logs below this line
```
### amplifyconfiguration.json
_No response_
### Additional information and screenshots
_No response_
Contributor guide
Research direction
Start at aws-predictions/src/main/java/com/amplifyframework/predictions/aws/http/LivenessWebSocket.kt around line 475, where videoEndTimestamp is calculated. Trace the final video chunk and the empty video event used to determine the actual end. Done means metrics receive the proper video end timestamp while challenge behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100