@22hbg/rn-video-module

22HBG React Native Video module

Usage no npm install needed!

<script type="module">
  import 22hbgRnVideoModule from 'https://cdn.skypack.dev/@22hbg/rn-video-module';
</script>

README

Video module

React Native module with video

Dependecy used: React Native video

Installation

yarn add @22hbg/rn-video-module react-native-video react-native-orientation

cd ios/ && pod install

Additional steps:

Core

Android setup
iOS setup

Crashlitics

Android setup

Usage

Initialize remote config

import React, { useEffect } from 'react'
import { View } from 'react-native'
import { initializeRemoteConfig } from '@22hbg/rn-firebase-module'

export default App = () => {
    useEffect(() => {
        initializeRemoteConfig({
            data: 'value'
        })
        .then(() => console.log('success'))
            .catch(() => console.error('error: ', error))
    })

    return <View />
}

export default App

Request notification permission

import React, { useEffect } from 'react'
import { View } from 'react-native'
import { requestNotificationPermission } from '@22hbg/rn-firebase-module'
import messaging from '@react-native-firebase/messaging'

export default App = () => {
    useEffect(() => {
        checkUserPermission()
    })

    const checkUserPermission = async () => {
        const permission = await requestNotificationPermission()

        const enabled = permission === messaging.AuthorizationStatus.AUTHORIZED || permission === messaging.AuthorizationStatus.PROVISIONAL

        if (enabled) {
            console.log('Authorization status:', permission)
        }
    }

    return <View />
}

export default App