When play a remote file on iOS, currentPosition may never get to duration, which makes it difficult to know whether the playing is end.
Solution
Add an observer to native player end event, and in that observer, force trigger another playback event, where currentPosition is set to be duration. Note that at this moment, playerItem.currentTime is still smaller than duration, so we cannot use that value.
Problem
When play a remote file on iOS,
currentPosition
may never get toduration
, which makes it difficult to know whether the playing is end.Solution
Add an observer to native player end event, and in that observer, force trigger another playback event, where
currentPosition
is set to beduration
. Note that at this moment,playerItem.currentTime
is still smaller thanduration
, so we cannot use that value.may fix #328