MCPcopy Index your code
hub / github.com/zmxv/react-native-sound / setAndroidVolumes

Method setAndroidVolumes

src/index.ts:144–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

142 }
143
144 private setAndroidVolumes() {
145 if (this._pan) {
146 const relativeVolume = this.calculateRelativeVolume(
147 this._volume,
148 this._pan
149 );
150 if (this._pan < 0) {
151 RNSound.setVolume(this._key, this._volume, relativeVolume);
152 } else {
153 RNSound.setVolume(this._key, relativeVolume, this._volume);
154 }
155 } else {
156 RNSound.setVolume(this._key, this._volume, this._volume);
157 }
158 }
159
160 public isLoaded(): boolean {
161 return this._loaded;

Callers 2

setVolumeMethod · 0.95
setPanMethod · 0.95

Calls 2

setVolumeMethod · 0.80

Tested by

no test coverage detected