Closed gulsher7 closed 3 years ago
Could you add a crash log / stacktrace?
Did you add track-player.json
file to root of your project?
Yes but nothing working in tihs
I fixed the hls crash by adding the file type. However the audio isn't playing from the emulator. Unsure if this is an emulator thing or or a hls thing.
Problem still on going. tried setting contentType but didn't work. Setting type to smoothstreaming
, hls
and app crashes.
Did you also make sure to enable the relevant module? http://react-native-track-player.js.org/build-preferences/
Thx David. It was my stupid mistake I had named track-player.json
as track-player.js
, LOL :)
Run
react-native info
in your project and share the content. System: OS: macOS 10.15 CPU: (4) x64 Intel(R) Core(TM) i5-4570T CPU @ 2.90GHz Memory: 462.33 MB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 14.4.0 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.8 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.0. - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 Android SDK: API Levels: 23, 25, 26, 27, 28, 29 Build Tools: 27.0.3, 28.0.3, 29.0.2, 29.0.3, 30.0.0, 30.0.0, 30.0.1, 30.0.2 Android NDK: Not Found IDEs: Android Studio: 4.0 AI-193.6911.18.40.6626763 Xcode: 11.3/11C29 - /usr/bin/xcodebuild Languages: Java: 1.8.0_252 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.3 => 0.63.3 Whatreact-native-track-player
version are you using? = 1.2.3Are you testing on a real device or in the simulator? Which OS version are you running? yes i tested on xiomi redmi note 7 pro real device and its version 10
Code Please, share the code that is causing the issue import React, { useState, useEffect } from 'react'; import TrackPlayer, { useTrackPlayerProgress } from 'react-native-track-player'; import ProgressSlider from '../../components/ProgressSlider';
const AudioPlayer = ({ route }) => {