I write, code, and teach.
Learn more: https://aakashns.com
Spotify-like music player interface made using React Native
Home Page: https://hackernoon.com/building-a-music-streaming-app-using-react-native-6d0878a13ba4
I write, code, and teach.
Learn more: https://aakashns.com
in ios device working well but coming to android its getting this error
E/ExoPlayerImplInternal: Internal runtime error.
java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1
at com.google.android.exoplayer2.source.TrackGroupArray.get(TrackGroupArray.java:65)
at com.google.android.exoplayer2.trackselection.DefaultTrackSelector.selectTracks(DefaultTrackSelector.java:1264)
at com.google.android.exoplayer2.trackselection.MappingTrackSelector.selectTracks(MappingTrackSelector.java:394)
at com.google.android.exoplayer2.MediaPeriodHolder.selectTracks(MediaPeriodHolder.java:160)
at com.google.android.exoplayer2.ExoPlayerImplInternal.reselectTracksInternal(ExoPlayerImplInternal.java:1001)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:327)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
Hello Aakash,
THank you for putting together a well thought out react-native project. I know this is slightly old since the last issue update, but if this is still actively maintained. I do have an issue with the react-native-slider and <slider tag in the seekbar.js code segment. Specifically the error message copied from the react-native log window that comes up during "react-native run-android" command which did load the code into the android emulator, but fails due to the following message:
To reload the app press "r"
To open developer menu press "d"
[Tue Aug 18 2020 23:02:03.493] BUNDLE ./index.android.js
[Tue Aug 18 2020 23:02:11.342] LOG Running "ReactMusic" with {"rootTag":1}
[Tue Aug 18 2020 23:02:11.345] ERROR Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
Check your code at SeekBar.js:43.
in SeekBar (at Player.js:104)
in RCTView (at View.js:34)
in View (at Player.js:99)
in Player (at App.js:27)
in App (at renderApplication.js:45)
in RCTView (at View.js:34)
in View (at AppContainer.js:106)
in RCTView (at View.js:34)
in View (at AppContainer.js:132)
in AppContainer (at renderApplication.js:39)
[Tue Aug 18 2020 23:02:11.346] ERROR Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
Check the render method of SeekBar
.
This error is loca
After doing some investigation, it appears to have something with the neweer version of the react-native-slider vers 0.11 compared to your version you used as 0.7.+ and in conjunction to the different version fo react-native I am using (current). Please find the package.json contents below for reference between the one you have and the one I have:
"name": "ReactMusic",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"react": "16.13.1",
"react-native": "0.63.2",
"react-native-slider": "^0.11.0",
"react-native-video": "^5.1.0-alpha7"
},
"devDependencies": {
"@babel/core": "7.11.1",
"@babel/runtime": "7.11.2",
"@react-native-community/eslint-config": "1.1.0",
"babel-jest": "25.5.1",
"eslint": "6.8.0",
"jest": "25.5.4",
"metro-react-native-babel-preset": "0.59.0",
"react-test-renderer": "16.13.1"
},
Any advice on fixing this issue? I suspect I may have a similar elsewhere like the react-native-video if this is related to the versions between react-native and the added packages. Thank you again in advance for taking a look at the issue in advance.
i got same issue like @Waqas-Jani. i tried to solve using your solution but still not solve.
Originally posted by @shubham-akole in #1 (comment)
please help me to solve this error
Originally posted by @Waqas-Jani in #1 (comment)
android version i tap the play button given by uri(working media file in server) it not playing & no sound.
plz help me how can i solve my issue ?
Error is while trying to build the apk on android phone .
I am just following the readme steps but the app does not run because the build fails
ReactMusic/node_modules/node-haste/lib/Cache/index.js:22
var tmpDir = require('os').tmpDir();
^
TypeError: require(...).tmpDir is not a function
at Object. (/home/robo/reactNative/ReactMusic/node_modules/node-haste/lib/Cache/index.js:22:28)
at Module._compile (internal/modules/cjs/loader.js:1075:30)
at Module._extensions..js (internal/modules/cjs/loader.js:1096:10)
at Object.require.extensions. [as .js] (/home/robo/reactNative/ReactMusic/node_modules/babel-register/lib/node.js:152:7)
at Module.load (internal/modules/cjs/loader.js:940:32)
at Function.Module._load (internal/modules/cjs/loader.js:781:14)
at Module.require (internal/modules/cjs/loader.js:964:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/home/robo/reactNative/ReactMusic/node_modules/node-haste/lib/index.js:15:13)
at Module._compile (internal/modules/cjs/loader.js:1075:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node node_modules/react-native/local-cli/cli.js start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/robo/.npm/_logs/2020-12-30T06_05_26_867Z-debug.log
Hi,
i wanna to control my sound using slider , how can i implement it,
any one can help me .?
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.