From 91ff6868a554c4930fd5fda6ba8044dbd56c8374 Mon Sep 17 00:00:00 2001 From: Mark Oswald Date: Wed, 13 Jul 2016 03:54:38 -0700 Subject: [PATCH] Use HTTP range requests (responses) to serve mp4 from assets Summary: This PR solves a problem when video assets are used from third-party React Native components (e.g. [react-native-video](https://github.com/brentvatne/react-native-video). The video will not work while the assets are served from the react native packager because the used video component (iOS) relies on HTTP range requests. I added a small fix that allows ranged requests (e.g. mp4) to be served in ranges. To test this: 1. make new react native project 1. add [react-native-video](https://github.com/brentvatne/react-native-video) to xcode project 1. add video component to your project ``` import Video from 'react-native-video'; var resolveAssetSource = require('react-native/Libraries/Image/resolveAssetSource'); /* ... /* render() { let source = resolveAssetSource(require('./someVideoFile.mp4')) || {}; return