2.3.4 • Published 8 months ago

react-native-brightcove-ima-player v2.3.4

Weekly downloads
6
License
MIT
Repository
github
Last release
8 months ago

react-native-brightcove-ima-player

React Native implementation of Brightcove Player native SDK video player.

Brightcove SDK Version used

  • Minimum Required version of iOS is 11
  • iOS Brightcove-Player-IMA 6.10.6
  • com.brightcove.player:android-ima-plugin 6.18.6

Installation

npm install react-native-brightcove-ima-player

iOS

  • Add source to Podfile and pod install && pod update
  • Specify platform version to 11.0
source 'https://github.com/brightcove/BrightcoveSpecs.git'

platform :ios, '11.0'

Android

allprojects {
  repositories {
      maven {
          url 'https://repo.brightcove.com/releases'
      }
  }
}

Usage

import { BrightcoveIMAPlayer } from "react-native-brightcove-ima-player";

// ...

<BrightcoveIMAPlayer
  accountId="3636334163001"
  videoId="3666678807001"
  policyKey="BCpkADawqM1W-vUOMe6RSA3pA6Vw-VWUNn5rL0lzQabvrI63-VjS93gVUugDlmBpHIxP16X8TSe5LSKM415UHeMBmxl7pqcwVY_AZ4yKFwIpZPvXE34TpXEYYcmulxJQAOvHbv2dpfq-S_cm"
/>
  • Video player component of Brightcove.
  • It may not work on Android simulator.
  • For a more detailed example, please see example app.
PropTypeDescriptionEvent Object
accountIdstringBrightcove AccountId. Required
policyKeystringBrightcove PolicyKey. Required
videoIdstringBrightcove VideoId to playback.
autoPlaybooleanSet true to play automatically
playbooleanControl playback and pause
fullscreenbooleanControl full screen state
volumenumberSet audio volume (0.0 ~ 1.0)
bitRatenumberSet maximum buffering bitrate. Set 0 to automatic quality
adVideoLoadTimeoutnumberSet the amount of milliseconds for video to load. Default is 3000
playbackRatenumberSet playback speed scale. Default is 1
disableDefaultControlbooleanDisable default player control. Set true when you implement own video controller.
onAdsLoadedFunctionIndicates the IMA ads manager has loaded
onReadyFunctionIndicates the video can be played back
onPlayFunctionIndicates the video playback starts
onPauseFunctionIndicates the video is paused
onEndFunctionIndicates the video is played to the end
onProgressFunctionIndicates the playback head of the video advances.{ currentTime: number }
onChangeDurationFunctionIndicates the video length is changed{ duration: number }
onUpdateBufferProgressFunctionIndicates the video loading buffer is updated{ bufferProgress: number }
onEnterFullscreenFunctionIndicates the player enters full screen
onExitFullscreenFunctionIndicates the player exit full screen
MethodDescription
seekTo(timeInSeconds: number) => voidChange playhead to arbitrary time

BrightcovePlayerPoster

import { BrightcoveIMAPlayerPoster } from "react-native-brightcove-ima-player";

// ...

<BrightcoveIMAPlayerPoster
  style={styles.player}
  accountId="3636334163001"
  videoId="3666678807001"
  policyKey="BCpkADawqM1W-vUOMe6RSA3pA6Vw-VWUNn5rL0lzQabvrI63-VjS93gVUugDlmBpHIxP16X8TSe5LSKM415UHeMBmxl7pqcwVY_AZ4yKFwIpZPvXE34TpXEYYcmulxJQAOvHbv2dpfq-S_cm"
  resizeMode="contain"
/>
  • Displays a poster specified by videoId, referenceId or videoToken.
  • Prop is about the same as BrightcovePlayer.
PropTypeDescription
accountIdstringRequired
policyKeystringRequired
videoIdstring
referenceIdstring
videoTokenstring
resizeModestringSet the image resize method. Specifying cover or contain works the same as CSS keywords of background-size. Specifying fit, scales to fit the component size without considering aspect ratio of the image. Default value is cover.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

2.3.4

8 months ago

2.3.3

11 months ago

2.3.0

2 years ago

2.3.2

2 years ago

2.3.1

2 years ago

2.2.5

2 years ago

2.2.4

2 years ago

2.2.7

2 years ago

2.2.6

2 years ago

2.2.9

2 years ago

2.2.8

2 years ago

2.2.3

2 years ago

2.2.1

2 years ago

2.2.2

2 years ago

2.1.2

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

1.9.0

4 years ago

1.10.0

4 years ago

1.8.8

4 years ago

1.8.7

4 years ago

1.8.6

4 years ago

1.8.5

4 years ago

1.8.4

4 years ago

1.8.3

4 years ago

1.8.2

4 years ago

1.8.1

4 years ago

1.8.0

4 years ago