Question
I'm experiencing an issue with the AVPlay API's oncurrentplaytime callback. After performing seek operations (forward and backward), the reported playback time differs from the actual playback time when reaching the same position naturally (without seeking). The discrepancy is approximately 10 seconds.
This issue affects our subtitle synchronization since we use the playback time to display captions as an overlay on the video. The problem occurs consistently across different video files and has been reproduced on both TV devices and emulators.
Has anyone encountered similar issues with AVPlay's time reporting after seeking? Any suggestions for workarounds or solutions would be greatly appreciated.
Answer
Problem Understanding
The issue involves AVPlay's oncurrentplaytime callback returning inconsistent time values after seek operations, causing subtitle synchronization problems. This appears to be a platform-level issue rather than a content-specific problem.
Solution Methods
-
Bug Reporting: As this appears to be a platform issue, the recommended first step is to report it through the official Tizen bug tracker.
- Visit the Tizen Bug Tracker
- Follow the bug reporting guidelines
-
Temporary Workaround: While waiting for a fix, consider implementing a time adjustment mechanism:
- Track seek operations manually
- Apply a time offset when detecting recent seek operations
- Gradually reduce the offset as playback continues
-
Alternative Approach: For subtitle synchronization, consider:
- Using the video element's timeupdate event instead of AVPlay's callback
- Implementing your own time tracking mechanism based on system time and playback rate
Additional Tips
- When reporting the bug, include:
- Detailed reproduction steps
- Sample video files that demonstrate the issue
- Device and Tizen version information
- Monitor the reported bug at: PTAPI-66
- Consider implementing a user-adjustable subtitle delay setting as a temporary user-facing solution