This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Platform, View } from 'react-native'; | |
import { AirPlayButton } from 'react-native-airplay-btn'; | |
import Video from 'react-native-video'; | |
const styles = { | |
backgroundVideo: { | |
position: 'absolute', | |
top: 0, | |
left: 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Platform } from 'react-native'; | |
import { AirPlayButton } from 'react-native-airplay-btn'; | |
const MyAirplayApp = () => Platform.OS === 'ios' && <AirPlayButton style={{ height: 30, width: 30 }} />; | |
export default MyAirplayApp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <GoogleCast/GoogleCast.h> | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
// ADD THIS CODE SNIPPET -> | |
GCKDiscoveryCriteria *criteria = [[GCKDiscoveryCriteria alloc] initWithApplicationID:kGCKDefaultMediaReceiverApplicationID]; | |
GCKCastOptions* options = [[GCKCastOptions alloc] initWithDiscoveryCriteria:criteria]; | |
[GCKCastContext setSharedInstanceWithOptions:options]; | |
// - | |
return YES; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.myapplication"> | |
<application | |
<meta-data | |
android:name="com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME" | |
android:value="com.reactnative.googlecast.GoogleCastOptionsProvider" /> | |
</application> | |
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.myapplication; | |
import com.facebook.react.GoogleCastActivity; | |
public class MainActivity extends GoogleCastActivity { | |
// .. | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { TouchableOpacity, View, Text } from 'react-native'; | |
import GoogleCast, { CastButton } from 'react-native-google-cast'; | |
class MyChromecastApp extends React.Component { | |
// Play the casting, only if the device is connected and was playing something before in the actual sesion | |
playCast = () => GoogleCast.play(); | |
// Pause the currently casting | |
pauseCast = () => GoogleCast.pause(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import codePush from 'react-native-code-push'; | |
const codePushOptions = { checkFrequency: codePush.CheckFrequency.ON_APP_START }; | |
class MyApp extends Component { | |
render() { | |
return ( | |
<View> | |
/* My App Code.. */ | |
</View> |