npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@times-components/brightcove-video

v3.2.140

Published

## Status of this package

Downloads

80

Readme

Times Component - Brightcove Video

Status of this package

This module is deprecated. Please use the video package instead.

Native

Getting started

  • yarn add @times-components/brightcove-video
  • react-native link

:warning: For native, the policyKey is required, see Brightcove's Policy API for more details.

Android requirement

To use this component, you need to upgrade your version of gradle. To do that:

Change your android/build.gradle:

buildscript {
    repositories {
        jcenter()
+        google()
    }
    dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:3.0.0-beta7'
        classpath 'com.google.gms:google-services:3.1.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}

and update the version of gradlew by changing one line in android/gradle/wrapper/gradle-wrapper.properties:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-4.2-all.zip
- distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
+ distributionUrl=https://services.gradle.org/distributions/gradle-4.2-all.zip

iOS Install of the Brightcove SDK

Install with Cocoapods

Add the 2 following lines to the top of your ios/Podfile

source 'https://github.com/CocoaPods/Specs.git' # Add if you have other pods in your Podfile
source 'https://github.com/brightcove/BrightcoveSpecs.git'

and in your main Target, add :

pod 'Brightcove-Player-Core'

Then update your master repo to have the specs for Brightcove Player

pod repo update

Install Manually

To install the Brightcove SDK, follow Brightcove's instructions found here. We recommend using v5.3.3, however any recent version should be fine.

Android install of the Brightcove SDK

Add the following line to your android/app/build.gradle

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

Props

Properties types are defined in ./brightcove-video.proptypes.js

| Property name | Property type | Comment | | ---------------------- | ----------------- | ------------------------------------------------------------------------------------- | | videoId | string (required) | ID of the Brightcove video | | accountId | string (required) | ID of the Brightcove account | | policyKey | string | policy key (native only) | | playerId | string | ID of the player (web only) | | width | number | width of the player | | height | number | height of the player | | poster | object | poster image source | | onError | function | Handle errors | | onPlay | function | Handles play events | | onPause | function | Handles pause events | | onProgress | function | Handles progress events | | onFinish | function | Handles video finish events | | onEnterFullscreen | function | Handles video entering fullscreen (Android only) | | onExitFullscreen | function | Handles video exiting fullscreen (Android only) | | autoplay | boolean | Should the video autoplay? (default false) | | directToFullscreen | boolean | Should the video play directly in fullscreen? (default false) (Native only) | | hideFullScreenButton | boolean | Should the full screen button be hidden? (default false) | | resetOnFinish | boolean | Should the video reset to poster image when video finishes? (default false) |

Usage

import BrightcoveVideo from '@times-component/brightcove-video';

...

<BrightcoveVideo
    accountId={BRIGHTCOVE_ACCOUNT_ID}
    videoId={BRIGHTCOVE_ACCOUNT_ID}
    width={320}
    height={70}
    onError={console.error}
    policyKey={BRIGHTCOVE_POLICY_KEY} // Required for native
    autoplay={true}
/>