Question
I'm experiencing an issue with the AVPlay API's oncurrentplaytime callback. After seeking forward or backward during playback (for example, jumping ahead a few minutes), the time returned by oncurrentplaytime differs from the actual playback time when reaching that position naturally (the discrepancy is about 10 seconds).
This issue is causing synchronization problems with subtitles, as we use the playback time to display them. The problem occurs consistently across different videos 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 resolving this would be greatly appreciated.
Answer
Problem Understanding
The issue occurs when using AVPlay's oncurrentplaytime callback after seeking operations. The reported time doesn't match the actual playback position, causing subtitle synchronization issues.
Solution Methods
-
Forum Recommendation: This question would be better suited for the "Web Application Development" forum as it relates to media playback APIs.
-
Alternative Subtitle Implementation: Consider using HTML5's native
<track>element for subtitle handling rather than manually synchronizing based on playback time. This approach might provide more reliable synchronization.
Additional Tips
- When implementing custom subtitle synchronization, consider adding a small buffer time to account for potential discrepancies
- Test with different video formats and codecs to ensure the issue isn't format-specific
- Check for any available updates to the Tizen SDK that might address this timing issue