:clapper: Video Player widget for NativeScript apps
Performance improvements, in particular changed source from AVPlayer
to AVPlayerItem
to ensure only one AVPlayer is init. This will result in better performance when changing source directly on the video tag.
Android: Changed aspect
to fill
iOS: Added in finishedCallback
. Overall improvements.
Significant issues were identified on Android when using VideoView with the NativeScript animation engine. No animations were possible on the video itself and it'd result in the video going black. This turns out to be a known problem with animations and VideoView. This is because VideoView inherits from SurfaceView and "...it cannot be transformed (moved, scaled, rotated) efficiently". (https://android-developers.googleblog.com/2011/11/android-40-graphics-and-animations.html). Based on this, Android was changed to using a TextureView. More information can be read at the aforementioned blogpost.
Typo fix
More parity between platforms 🌮 - getDuration() works on iOS.