New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-media-cache

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-media-cache

🚩 FastImage, FastVideo performant React Native image component.

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-native-media-cache

🚩 FastImage, FastVideo performant React Native image component.

Installation

npm install --save react-native-media-cache

Now we need to install react-native-video and react-native-fs.

Usage

import * as React from 'react';

import { StyleSheet, View } from 'react-native';
import { CacheImage, CacheVideo } from 'react-native-media-cache';

export default function App() {
  return (
    <View style={styles.container}>
      {/* cache Image */}
      <CacheImage
        style={styles.image}
        source={{
          uri: 'https://thumbs.dreamstime.com/b/closeup-portrait-muscular-man-workout-barbell-gym-brutal-bodybuilder-athletic-six-pack-perfect-abs-shoulders-55122231.jpg',
        }}
        resizeMode="cover"
      />
      {/* cache Video */}
      <CacheVideo
        style={styles.image}
        source={{
          uri: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
        }}
        resizeMode="cover"
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
  image: { height: 500, width: 500 },
});

// ...

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

Apache


Adopting at scale

This library helped you? Consider sponsoring!

react-native-atom-template is provided as is, I work on it in my free time.

If you're integrating react-native-atom-template , consider funding this project and contact me to receive premium enterprise support, help with issues, prioritize bugfixes, request features, help at integrating VisionCamera and/or Frame Processors, and more.

Keywords

FAQs

Package last updated on 22 Mar 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc