Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some url sound not playing in IOS #500

Open
Ghostff opened this issue Oct 15, 2018 · 11 comments · May be fixed by #830
Open

Some url sound not playing in IOS #500

Ghostff opened this issue Oct 15, 2018 · 11 comments · May be fixed by #830

Comments

@Ghostff
Copy link

Ghostff commented Oct 15, 2018

Versions

React Native Cli: 2.0.1
React Native: 0.55.4
React Native Sound: 0.10.9
X-Code: 9 and 10

Description

Some urls doesn't play in IOS, and the ones that manages to play tends to be slow.

Code

Works

const url = 'https://ec-preview-media.sndcdn.com/preview/0/30/XAGPkjLItbgN.128.mp3?f10880d39085a94a0418a7e162b03d52e21adf826af17a391e1a7411352e94fa09cf19379bc361d4e59dd2e7345f5002a14aa8b66f97e06fb11a5b2b6c53670ccd89695fa398bd1185b325f67f3f297ea0fe';

// Works in Both IOS and Android but slow in IOS
Sound.setCategory('Playback');
this.sound = new Sound(url, null, (error) => {
    if (error) {
        console.log('failed to load the sound', error);
        return;
    }
    this.sound.play();
});

Doesn't Work

const url = 'https://edge2-b.exa.live365.net/a26993';

// Works only on Andriod
Sound.setCategory('Playback');
this.sound = new Sound(url, null, (error) => {
    if (error) {
        console.log('failed to load the sound', error);
        return;
    }
    this.sound.play();
});

Wondering if am doing anything wrong.

@anhtuank7c
Copy link

I facing the same problem.

@nfq6612
Copy link

nfq6612 commented Oct 17, 2018

I facing the same problem. No issues at all when running in Debug mode, but when running my release build,no sound,no warning,no error .

const callback = (error) => {
		if (error) {
			if (__DEV__) {
				console.log(error);
			}
			return;
		}
		sound.setVolume(0.6).play(() => { });
	};
	const sound = new Sound(require('../sound/ring.mp3'), (error) => callback(error));

@minhchienwikipedia
Copy link

minhchienwikipedia commented Oct 26, 2018

I getting same issue with this error

  "code": "ENSOSSTATUSERRORDOMAIN2003334207",
  "domain": "NSOSStatusErrorDomain",
  "message": "The operation couldn’t be completed. (OSStatus error 2003334207.)",
  "nativeStackIOS": Array [
    "0   projectname                          0x000000010d312157 RCTJSErrorFromCodeMessageAndNSError + 135",
    "1   projectname                          0x000000010d312083 RCTJSErrorFromNSError + 275",
    "2   projectname                          0x000000010d20db58 -[RNSound prepare:withKey:withOptions:withCallback:] + 1624",
    "3   CoreFoundation                      0x0000000112de111c __invoking___ + 140",
    "4   CoreFoundation                      0x0000000112dde5b5 -[NSInvocation invoke] + 325",
    "5   CoreFoundation                      0x0000000112ddea06 -[NSInvocation invokeWithTarget:] + 54",
    "6   projectname                          0x000000010d2a1f4a -[RCTModuleMethod invokeWithBridge:module:arguments:] + 2810",
    "7   projectname                          0x000000010d3596b6 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 790",
    "8   projectname                          0x000000010d3591cf _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 127",
    "9   projectname                          0x000000010d359149 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 25",
    "10  libdispatch.dylib                   0x00000001146df5d1 _dispatch_call_block_and_release + 12",
    "11  libdispatch.dylib                   0x00000001146e063e _dispatch_client_callout + 8",
    "12  libdispatch.dylib                   0x00000001146e7b47 _dispatch_lane_serial_drain + 791",
    "13  libdispatch.dylib                   0x00000001146e87c0 _dispatch_lane_invoke + 428",
    "14  libdispatch.dylib                   0x00000001146f28b8 _dispatch_workloop_worker_thread + 733",
    "15  libsystem_pthread.dylib             0x0000000114a7461c _pthread_wqthread + 409",
    "16  libsystem_pthread.dylib             0x0000000114a74415 start_wqthread + 13",
  ],
  "userInfo": Object {},
} ```

@mlop113
Copy link

mlop113 commented Dec 7, 2018

metoo
https://raw.githubusercontent.com/mlop113/zcxZ/master/Con-Trai-Cung-K-ICM-B-Ray.mp3

@yelkamel
Copy link

yelkamel commented Apr 13, 2019

Me too anyone can help ?

here is the URL: https://s3.eu-west-3.amazonaws.com/evolum/beginner_1.mp3
"react-native-sound": "^0.10.9",

@anhtuank7c
Copy link

Causing lib error.
This is fixed example repo: https://github.com/ctlabvn/RNSound-fix-remote-url

@paulmelnikow
Copy link
Collaborator

Related to #292?

@ashirkhan94
Copy link

any update

@turkogluc
Copy link

Causing lib error. This is fixed example repo: https://github.com/ctlabvn/RNSound-fix-remote-url

could you explain what is the fix?

@KnowYourLines
Copy link

@KnowYourLines KnowYourLines linked a pull request Jul 15, 2023 that will close this issue
@TajGoud
Copy link

TajGoud commented May 3, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.