Closed farman05 closed 1 year ago
Hi @farman05 If your browser can play the song ( Not downloading ) then It can be played in the react-native-track-player.
i tried many urls which open and play in browser, but what happens it goes in buffer state and then goes in None state
u need a url like http://exempleurl.com/music.mp3
trying with that type of url only, but still its just going in buffer mode(6) not playing.
I have the same issue, isn't there any solution yet?
Same here, the player continues to go from "playing" to "pause" without any errors or warnings... It doesn't work for mp3 larger than 2.5MB because the server split that files in chunk, responding with some 206 HTTP response and then the final 200 HTTP response, but the player doesn't work... What can be the problem?
Can you show the URL you're trying to play so we can try to reproduce the problem?
I solved the issue... the problem was the file encoded with LayerII that is not supported.. Using a LayerIII mp3 worked!
What file you exactly mean? And where can I find it in the project?
Get Outlook for Androidhttps://aka.ms/ghei36
From: Mattia Rigo notifications@github.com Sent: Friday, September 20, 2019 5:36:17 PM To: react-native-kit/react-native-track-player react-native-track-player@noreply.github.com Cc: Ashraf Ghanem ashraf.nadir3@gmail.com; Comment comment@noreply.github.com Subject: Re: [react-native-kit/react-native-track-player] Not able to play audio from remote url (#689)
I solved the issue... the problem was the file encoded with LayerII that is not supported.. Using a LayerIII mp3 worked!
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/react-native-kit/react-native-track-player/issues/689?email_source=notifications&email_token=AHR5GPSZGWTAQZGTXFQBDSTQKTNWDA5CNFSM4IJFGFC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7G4OLY#issuecomment-533579567, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHR5GPTYLH2NLCSTZQQL4KTQKTNWDANCNFSM4IJFGFCQ.
Is anyone still facing this issue? If so, can you provide a URL for testing?
I'm still facing this issue, when loading audio from urls, track player stops itself after playing the current track. But when it works perfect when using a local track. I'm getting the audios from amazon aws. I don't think the problem is with the url.
Are you adding multiple tracks to the queue at the start, or are you adding the next one when the first one finishes?
I'm adding all the audios at once. I think react-native-track-player is not handling url audio loads well. I'm now downloading the audios first with react-native-fs and then playing them, this solved my problem but it would've be very nice to directly use URLs.
Can you provide more details so we can try to reproduce the issue?
what I did was just, add 20 tracks to queue, every track has a url of the audio. Start playing the first audio, plays the first one, then stops after changing to the next track.
@tolgaerdonmez, are you able to reproduce this behavior in the example app, and provide us with a few of the URLs you are using so we can investigate further?
okay I'll be writing here the results as soon as I can. I'm going to implement the same way in my own app like you guys did in the example app.
Having trouble with the daily 1 minute news from BBC's podcast rss (the url changes every half hour, see xml mp3 link). Whitelisted the domain in Xcode but still get "unsupported URL" as error. http://wsrss.bbc.co.uk/bizdev/bbcminute/bbcminute.rss
The current URL, http://wsodprogrf.bbc.co.uk/bd/tx/bbcminute/mp3/bbcminute2006121700.mp3
works for me in iOS simulator. Is it possible however you are extracting the URL from the feed is giving you an unexpected value?
I managed to make it work on android just make sure your link is https and not from localhost THE LINK YOU NEED BASICALLY HAVE TO BE LIKE THIS
https://yourdomain/songs/songName.mp3
I know this post is old but i couldn't find an answer anywhere.
@zeejaydev So we can't play from non https domain on android ?
@sam17896 Yeah react native allows http in iOS for development only, but in distribution you have to disable it from .plist, so you have to have https
This is my audio url... its working in IOS but not on android... this is https .
https://docs.google.com/uc?export=open&id=1DpsMxOhoaRO_9VGkf3ztTs4GaOrWtmJX
This is my audio url... its working in IOS but not on android... this is https .
https://docs.google.com/uc?export=open&id=1DpsMxOhoaRO_9VGkf3ztTs4GaOrWtmJX
It's because of your url's content type. It's content-type: text/html; charset=UTF-8
You need to use any audio/
content type.
Is anyone still facing this issue? If so, can you provide a URL for testing?
which is not play in ios but working in android Also, this link is expired in one hour and have m4a file extension
Hello, i have the same problem with amazon link on ios.. anyone found a solution ?
Here is another instance of this error: https://chat.church.tools/_matrix/media/r0/download/chat.church.tools/uAMThKblxIQEOfdjVBVRZewv
The contenttype is audio/x-m4a
I have the same issue with AWS S3 pre-signed URL. Its works fine for Android but not for ios. Anyone know solution to this?
@cj-hnadeem could not find any solution, i ended up using react-native-sound that works perfectly
Here is another instance of this error: https://chat.church.tools/_matrix/media/r0/download/chat.church.tools/uAMThKblxIQEOfdjVBVRZewv
The contenttype is audio/x-m4a
It might be an issue with file formats. Safari on macOS is also not opening your URL for me. Edge does however, very likely not using an AVPlayer as Safari.
Those of you using m4a, is it failing on simulators only or also on devices? cc @talal-tilted @Hasham24
Closing for lack of updates, but it's very likely a format not supported by RNTP is being used. Like DASH
I had the same issue with streamed .m4a
files and after a lot of investigation discovered that the cause was because of response headers. The audio stream files were being served as response-content-type=audio/x-aac
and once we switched it to response-content-type=audio/x-m4a
the same audio files played properly with no issues.
I have the similar issue s3 wav urls is not playing on ios and working fine on android, any solution?
Configuration
The version of react native track player i am using "react-native-track-player": "^1.1.8"
Issue
I am trying to use the library for playing sounds from remote url, for local files the library works perfect the sound is played but when i am trying to play from remote file nothing happens no audio is been played
Code
import React, {Component} from 'react'; import { Platform, StyleSheet, Text, View, TouchableOpacity, YellowBox } from 'react-native'; import TrackPlayer from 'react-native-track-player';
const instructions = Platform.select({ ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', android: 'Double tap R on your keyboard to reload,\n' + 'Shake or press menu button for dev menu', });
export default class Player extends Component { constructor() { super(); this.state = { isplaying: false };
componentWillMount () { TrackPlayer.setupPlayer(); }
componentDidMount() { TrackPlayer.updateOptions({ waitForBuffer: true, stopWithApp: true, capabilities: [ TrackPlayer.CAPABILITY_PLAY, TrackPlayer.CAPABILITY_STOP ], compactCapabilities: [ TrackPlayer.CAPABILITY_PLAY, ] }); }
onPlay = async () => { const currentTrack = await TrackPlayer.getCurrentTrack(); this.setState({ isplaying: !this.state.isplaying });
}
render() { return (
} }
const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, welcome: { fontSize: 20, textAlign: 'center', margin: 10, }, instructions: { textAlign: 'center', color: '#333333', marginBottom: 5, }, });