How to use the expo-core.NativeModulesProxy.ExponentMediaLibrary function in expo-core

To help you get started, we’ve selected a few expo-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo / modules / expo-media-library / src / MediaLibrary.js View on Github external
// @flow

import { Platform } from 'react-native';
import { NativeModulesProxy, EventEmitter } from 'expo-core';

const MediaLibrary = NativeModulesProxy.ExponentMediaLibrary;
const eventEmitter = new EventEmitter(MediaLibrary);

type MediaTypeValue = 'audio' | 'photo' | 'video' | 'unknown';
type SortByKey =
  | 'default'
  | 'id'
  | 'mediaType'
  | 'width'
  | 'height'
  | 'creationTime'
  | 'modificationTime'
  | 'duration';
type SortByValue = [SortByKey, boolean] | SortByKey;

type MediaTypeObject = {
  audio: 'audio',