Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
/** | |
* This parses multipart/form-data when passed into a Lambda function through | |
* API Gateway using the following Integration Request Mapping Template: | |
#set($allParams = $input.params()) | |
{ | |
"body" : $input.json('$'), | |
"params" : { | |
#foreach($type in $allParams.keySet()) | |
#set($params = $allParams.get($type)) |
Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
This is for my personal use, things might not be correctly explained here. For the official docs please check https://github.com/airbnb/react-native-maps
Steps from scratch:
1.react-native init GoogleMapPlayground
const path = require('path'); | |
// Don't forget to everything listed here to `package.json` | |
// modulePathIgnorePatterns. | |
const sharedBlacklist = [ | |
/node_modules[/\\]react[/\\]dist[/\\].*/, | |
'downstream/core/invariant.js', | |
/website\/node_modules\/.*/, |
const waitFrame = () => new Promise(requestAnimationFrame); |
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
Database files have to be updated before starting the server, here are the steps that had to be followed: | |
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
brew unlink postgresql | |
brew install [email protected] | |
brew unlink [email protected] | |
brew link postgresql |
# When using RN in combination with Cocoapods, a lot of | |
# things are broken. These are the fixes we had to append | |
# to our Podfile when upgrading to [email protected]. | |
# | |
# WARNING: Check those line numbers when you're on a different version! | |
def change_lines_in_file(file_path, &change) | |
print "Fixing #{file_path}...\n" | |
contents = [] |
platform :ios, '10.0' | |
require_relative '../node_modules/react-native-unimodules/cocoapods.rb' | |
# don't just copy and paste this, notice that the target names should align with what is already in your Podfile | |
target 'YourAppNameHere' do | |
pod 'React', :path => '../node_modules/react-native', :subspecs => [ | |
'Core', | |
'CxxBridge', | |
'DevSupport', |
#import <UIKit/UIKit.h> | |
#import <UMReactNativeAdapter/UMModuleRegistryAdapter.h> | |
#import <React/RCTBridgeDelegate.h> | |
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate> | |
@property (nonatomic, strong) UMModuleRegistryAdapter *moduleRegistryAdapter; | |
@property (nonatomic, strong) UIWindow *window; | |
@end |
import { useEffect, useState } from "react"; | |
import { | |
NativeEventEmitter, | |
NativeModules, | |
Platform, | |
StatusBar, | |
} from "react-native"; | |
const { StatusBarManager } = NativeModules; |