1.0.11 • Published 3 years ago

karuna-label-testing v1.0.11

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

DotStudioPro

This library is designed to support custom video player controls in React Native for both iOS and Android.

Features

  • Fullscreen support for Android and iOS.
  • Portrait and Landscape mode.
  • Customize control layout.
  • Customize control theme.

Install

$ yarn add dspreactnativemodulesdk

OR

$ npm install dspreactnativemodulesdk

For Ios

cd ios
pod install

Usage

// Load the module
import {SPLTNativePlayer} from 'DSPReactNativeModuleSDK';

<SPLTNativePlayer
    videoUrl={'https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8'}
    seekDuration={15}
    hideBackButton={true}
    hideFullscreenButton={true}
    onBack={this.onBackPressed}
    onAnalyticsEvent={this.onAnalyticsEvent}
    onFinishPlayingContentAndAd={this.onFinishPlayingContentAndAd}
    onToggleFullscreen={this.onToggleFullscreen}
/>

Props

PropsTypeDefaultRequiredPlatformDescription
videoUrlstringtrueAllUrl of the video to be played.
vmapUrl In progressstringfalseAllUrls to fetch the Ads during video playback.
videoTitle In progressstringfalseAllTitle of the video.
seekDurationnumber10falseAllForward/Rewind player video to the given time.
hideBackButtonbooleanfalsefalseAllHide player back button if it's true.
hideFullscreenButtonbooleanfalsefalseAndroidHide player fullscreen button if it's true.

Callbacks Method

MethodPropsDescription
onBack() => {}This is triggered during back or close action of the player.
onAnalyticsEvent(analyticsEvent) => {}This can be used to trigger Analytics event for the media player such first play, pause, play ,buffering, seeking, etc.
onToggleFullscreen(event) => {}This is triggered when player enters/exits full screen mode.
onFinishPlayingContentAndAd() => {}This is triggered when player finishes playing a video or an ad.

Todos

  • Add loading Indicator
  • Make player UI customizable.
  • Make seekbar UI customizable.
  • Handling Analytics client.
1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago