1.2.3 • Published 6 months ago

@theoplayer/react-native-yospace v1.2.3

Weekly downloads
-
License
SEE LICENSE AT ht...
Repository
github
Last release
6 months ago

THEOplayer React-Native Yospace Connector

A Yospace connector for @theoplayer/react-native. The connector only supports Android platforms for now.

Installation

npm install @theoplayer/react-native-yospace

The connector uses the private Yospace SDK, for which credentials need to be configured.

Android

On Android, configure the Maven repository credentials either setting project properties, for example in the gradle.properties file:

YOSPACE_USERNAME=myUserName
YOSPACE_PASSWORD=myPassword

or, alternatively, by setting both YOSPACE_USERNAME and YOSPACE_PASSWORD as environment variables on your build system. Make sure not to expose them!

Usage

Configuring the connector

Create the connector by providing the THEOplayer instance, some initial metadata and a config object:

import { useYospace } from '@theoplayer/react-native-yospace';

const App = () => {
  const [yospace, initYospace] = useYospace();

  const onPlayerReady = (player: THEOplayer) => {
    // Initialize connector
    useYospace(player);

    // Set source with ssai integration 'yospace', and optional session properties.
    player.source = {
      sources: [
        {
          src: 'https://csm-e-sdk-validation.bln1.yospace.com/csm/extlive/yospace02,hlssample42.m3u8?yo.br=true&yo.av=4',
          type: 'application/x-mpegurl',
          ssai: {
            integration: 'yospace',

            // Optional, the default is 'live'.
            streamType: 'live',

            // Optional session properties
            //
            // @see YospaceSessionProperties.ts for available properties.
            sessionProperties: {
              prefetchResources: true
            }
          }
        }
      ]
    }
  }

  return (<THEOplayerView config={playerConfig} onPlayerReady={onPlayerReady}/>);
}
1.2.3

6 months ago

1.2.2

6 months ago

1.2.1

9 months ago

1.2.0

10 months ago

1.1.0

1 year ago

1.0.0

1 year ago