I want to get the length of the video after the call "onvideoready"
But I get the result "0".
If we make the additional delay "wait (5)" after calling "onvideoready" - the results will be true.
Is it possible to fix the problem without "wait ()"?
In the documentation it is stated that "onvideoready" is caused when there is information about the "video frame" and "totaltime".
that's unfortunately a bit tricky on iOS:
iOS versions before iOS8 don't load the video before the users manually starts playing it (by a touch) - so there would be no size or time informations before that. But to be able to do layout - the plugin loads the poster image and takes the image size from there - and once that size from the poster image is known the onvideoready event will be called (without poster image the default iOS video size of 320x240 will be used).
That means for iOS versions before iOS 8, it would be impossible to get the totaltime in the onvideoready event. For iOS 8 it might be theoretically possible, but currently the plugin behaves the same for iOS 7 and iOS 8.
Thanks for the explanation!