Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 772 Bytes

File metadata and controls

46 lines (32 loc) · 772 Bytes

@nstudio/nativescript-vlc-player

npm install @nstudio/nativescript-vlc-player

Usage

Register VLCPlayer element using any flavor for usage.

<VLCPlayer autoPlay="true" src="rtsp://your-stream" loaded="loaded"></VLCPlayer>

API

  • play: Start playback
  • pause: Pause playback

Example

<VLCPlayer autoPlay="true" src="rtsp://your-stream" loaded="loaded"></VLCPlayer>
import { EventData } from '@nativescript/core';
import { VLCPlayer } from '@nstudio/nativescript-vlc-player';

let player: VLCPlayer;
function loaded(args: EventData) {
    player = args.object as VLCPlayer;
}

function play() {
    player.play();
}

function pause() {
    player.pause();
}

License

Apache License Version 2.0