1.1.0 • Published 5 years ago

react-native-airplay-btn v1.1.0

Weekly downloads
658
License
MIT
Repository
github
Last release
5 years ago

react-native-airplay-btn

AirPlay library for iOS

Installation with Automatic Linking

npm i react-native-airplay-btn --save
react-native link

How to create listeners

import { AirPlayListener } from react-native-airplay-btn

this.airplayAvailableSubscription = AirPlayListener.addListener('airplayAvailable', devices => this.setState({
      airPlayAvailable: devices.available, --> devices.available is a boolean
})); 

this.airplayConnectedSubscription = AirPlayListener.addListener('airplayConnected', devices => this.setState({
      airPlayConnected: devices.connected, --> devices.connected is a boolean
      airPlayMirroring: devices.mirroring, --> devices.mirroring is a boolean
}));


// Remove Listeners in componentWillUnmount
this.airPlayConnected.remove();
this.airPlayAvailable.remove()

Methods

  AirPlay.startScan();

  AirPlay.disconnect();

Create AirPlay Button

import { AirPlayButton } from 'react-native-airplay-btn';

<AirPlayButton style={{ height: 30, width: 30, justifyContent: 'center', alignItems:'center' }} />

Note: The AirPlay Button does not show in the simulator

Author

Nadia Dillon

1.1.0

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5-beta-1.0

6 years ago

1.0.5-beta.0.2

6 years ago

1.0.5-beta

6 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago