zmxv / react-native-sound-demo Goto Github PK
View Code? Open in Web Editor NEWreact-native-sound demo project for iOS and Android
License: MIT License
react-native-sound demo project for iOS and Android
License: MIT License
Undefined is not an object (evaluating'RNSound.IsAndriod')
I cloned from github,
Ran 'npm install'
Ran 'npx react-native run-android'
Error:
FAILURE: Build failed with an exception.
What went wrong:
Could not determine java version from '11.0.12'.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
Error with command npm install
npm ERR! Error while executing:
npm ERR! D:\app\git\bin\git.EXE ls-remote -h -t ssh://[email protected]/zmxv/react-native-sound.git
npm ERR!
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\tom\AppData\Roaming\npm-cache\_logs\2019-01-17T15_18_09_026Z-debug.log
See facebook/react-native#17688
Workaround:
gradle manifest must be updated to for example
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-rc-2-all.zip
and build.gradle should have System.properties['com.android.build.gradle.overrideVersionCheck'] = 'true'
Thanks so much for the React Native Sound package.
I have tested the package with remote files and required ones using require module. But my problem is playing a file that is not in the two categories above.
For example, I use react-native-document-picker which allows the user to select a file from the phone storage. I want to play that sound but I am not able.
Please what is the suggested way of dealing with sort like that?
let callback = (error, sound) => {
if (error) {
console.log('failed to load the sound', error);
return;
}
sound.play(() => {
sound.release();
});
}
let soundFile = this.props.uri
soundFile = require("../assets/audio/advertising.mp3") //working fine
var sound = new Sound(soundFile, error => callback(error, sound));
soundFile = "https://raw.githubusercontent.com/zmxv/react-native-sound-demo/master/frog.wav" //this working.
var sound = new Sound(soundFile, "", error => callback(error, sound));
soundFile=this.props.uri //not working. The uri is the location of the file selected by the user. Sample uri looks like "file://content://com.android.externalstorage.documents/document/300C-0FED%3AMusics%2FJWLibrary%2Fiacu_E_03.mp3"
var sound = new Sound(soundFile, "", error => callback(error, sound));
Thank you for your prompt response
As title states, calling whoosh.stop(() =>{})
or whoosh.pause()
causes the app to crash. Testing on an iPhone 4S with iOS 8.x.
Currently working around by calling whoosh.release()
, then re-initializing the sound, then playing again.
I hava test android 5.5 but fail i hava try react-native-vedio but fail could you help me ?
Hi, I'm trying to test react-native-sound-demo but so far no luck.
I did get clone https://github.com/zmxv/react-native-sound-demo.git
npm install
react-native run-ios
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/RNSoundDemo.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
I also saw an error at 8081
ading dependency graph, done.
Bundling index.ios.js
Analysing...(node:46456) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: TransformError: /Users/kouohhashi/Desktop/eth_project/react-native-sound-demo/index.ios.js: Couldn't find preset "babel-preset-react-native-web3" relative to directory "/Users/kouohhashi/Desktop/eth_project"
How can i fixe this?
Thanks in advance.
I clone the repository and run "npm install" in order to install the package. Then error messages pop up and it seems that there are something wrong during installation of react-native-sound package.
Does anyone face the same problem?
Hi,
Build successful but getting following error
Starting: Intent { cmp=com.rnsounddemo/.MainActivity }
Error type 3
Error: Activity class {com.rnsounddemo/com.rnsounddemo.MainActivity} does not exist.
React native 0.39
why?
How do you pause and resume an audio from the point of pause? Any example that would be of some help?
I did a git clone
and simply tried to run the app in the Simulator (latest everything iPhone 7, iOS 10.2, Xcode 8.2.1)
I've occasionally seen 'Unexpected character' when dropping new binary files into the source tree (e.g. PNG files). However this time restarting the Packager doesn't fix.
I tried building in Xcode, react-native run-ios
, clearing watchman, cleaning in Xcode, upgrading to Node 7.7.1. No bueno.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.