Socket
Socket
Sign inDemoInstall

@applandstream/streaming-view-sdk

Package Overview
Dependencies
43
Maintainers
2
Versions
151
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @applandstream/streaming-view-sdk

React component for Streaming Project to interact with the Edge Node Stream


Version published
Weekly downloads
214
decreased by-44.27%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

Streaming View SDK

This contains a set of React components that can be used to interact with a stream of the android emulator from the browser.

Full reference

Usage StreamingView

You can connect to the remote stream as follows:

import { StreamingView } from '@applandstream/streaming-view-sdk';

class App extends React.Component {
  render() {
    return (
      <StreamingView
        apiEndpoint={'https://exampe.com/api/streaming-service'}
        edgeNodeId={'a8a363c7-7104-4a40-9908-c4122d15f902'}
        enableControl={true}
        enableFullScreen={false}
      >
        <!--
        Here you can place a component or elements that should
        be displayed until the streaming view is ready.
        -->
      </StreamingView>
    );
  }
}

Usage StreamingController

You can shut down an edge node with the StreamingController

import { StreamingController } from '@applandstream/streaming-view-sdk';

StreamingController({
  apiEndpoint: 'https://exampe.com/api/streaming-service',
  edgeNodeId: 'a8a363c7-7104-4a40-9908-c4122d15f902'
})
  .then((streamingController) => streamingController.terminate())
  .then(console.log)
  .catch(console.error);

Full Reference

Streaming View

A React component that displays and controls a remote stream from the android emulator.

Supported properties
proptypedefaultrequireddescription
**
apiEndpoint**String:white_check_mark:API endpoint the component should use to connect to the Streaming Service API.
**
edgeNodeId**String:white_check_mark:Edge Node Id received from GET: Create API endpoint, and can't bedynamically changed during runtime.
**
enableControl**Booleantrue:x:Enable/disable user interactions with the game, can be dynamically changed during runtime.
**
enableFullScreen**Booleantrue:x:The app will put the stream in full-screen mode after the first user interaction.
**
volume**Number1.0:x:Volume has the following range: [0.0...1.0]. Volume 0.0 means audio is muted, volume 1.0 is maximum volume and 0.5 means 50% of volume.

Streaming controller

A class that controls the stream

Supported properties
proptypedefaultrequireddescription
**
apiEndpoint**String:white_check_mark:API endpoint the component should use to connect to the Streaming Service API.
**
edgeNodeId**String:white_check_mark:Edge Node Id received from GET: Create API endpoint, and can't be dynamically changed during runtime.
Functions
  • terminate() Terminates the instance returns a promise with the result

How Sync protobuf definitions

For the update of protobuf definition, that define the shared API between the web client and the Android Emulator do the following steps:

  1. Download https://dl.google.com/android/repository/emulator-linux-XXXXX.zip
  2. Copy all .proto and .protobuf found in /lib (in the zip file) folder into /protobuf-definition folder in this project.

How to generate proto files

Run shell script:

./build-sdk.sh

Last Commit Id of merged Google repository

d9aa985ab40790050dd8c28ce34d8e05cb386750

FAQs

Last updated on 22 Mar 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc