Skip to content

Commit

Permalink
fix(typo) Fix typo and update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienlfr committed Jul 23, 2024
1 parent cc7a2b9 commit 3ee08f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions __tests__/googleMobileAds.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ describe('Admob', function () {
expect(RNGoogleMobileAdsModule.setAppVolume).toBeCalledTimes(1);
});

it('throws if setAppVolume is greater then 1', function () {
it('throws if setAppVolume is greater than 1', function () {
expect(() => {
admob().setAppVolume(2);
}).toThrowError('The app volume must be a value between 0 and 1 inclusice.');
}).toThrowError('The app volume must be a value between 0 and 1 inclusive.');
});

it('does call native setAppMuted method', () => {
Expand Down
2 changes: 2 additions & 0 deletions docs/displaying-ads.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ function App() {
The `sizes` prop takes an array of [`BannerAdSize`](/reference/admob/banneradsize) types.
## Advanced Usage
### Video ad volume control
If your app has its own volume controls, such as custom music or sound effect volumes, disclosing app volume to the Google Mobile Ads SDK enables video ads to respect app volume settings. This ensures users receive video ads with the expected audio volume.
Expand Down
2 changes: 1 addition & 1 deletion src/MobileAds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class MobileAdsModule implements MobileAdsModuleInterface {

setAppVolume(volume: number) {
if (volume < 0 || volume > 1)
throw new Error('The app volume must be a value between 0 and 1 inclusice.');
throw new Error('The app volume must be a value between 0 and 1 inclusive.');
RNGoogleMobileAdsModule.setAppVolume(volume);
}

Expand Down

0 comments on commit 3ee08f0

Please sign in to comment.