nativescript-videoplayer-lr
A NativeScript plugin that uses the native video players to play local and remote videos. Published on NPM by Luke Ramsden for purposes :D
npm i --save nativescript-videoplayer-lr
- Version: 1.0.0
- GitHub: https://github.com/bradmartin/nativescript-videoplayer
- NPM: https://www.npmjs.com/package/nativescript-videoplayer-lr
- Downloads:
- Last Day: 0
- Last Week: 0
- Last Month: 0
NativeScript Video Player :clapper:
A NativeScript plugin to provide an XML widget for playing local and remote video files.
Android VideoView
iOS AVPlayer
Installation
npm install nativescript-videoplayer
Usage
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:VideoPlayer="videoplayer">
<StackLayout>
<VideoPlayer:Video
loaded="videoplayerLoaded"
finished="videoFinished"
autoplay="true"
height="300"
src="~/videos/small.mp4" />
<!-- Here is a remote file to test with https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4 -->
</StackLayout>
</Page>
Attributes
src - required
Attribute to specify the video file to play, can either be a remote file or local video file.
The file must adhere to the platforms accepted video formats. For reference check the platform specs on playing videos.
autoplay - optional
Attribute to set if the video should start playing as soon as possible or to wait for user interaction.
finished - optional
Attribute to specify an event callback to execute when the video reaches the end of its duration.