Custom Sound is not getting played after added in configuration also in react-native-push-notification - react-native

Here's my code below. I have added soundName value to sound file name. I have added sound file to 'raw' folder in android directory. But still it is playing default notification sound.
PushNotification.localNotification({
/* Android Only Properties */
channelId: 'default-channel-id',
autoCancel: true,
largeIcon: 'ic_launcher',
smallIcon: 'ic_launcher',
color: 'red',
vibrate: true,
vibration: 300,
tag: 'some_tag',
group: 'group',
groupSummary: false,
ongoing: false,
actions: null,
invokeApp: true,
when: null,
usesChronometer: false,
timeoutAfter: null,
/* iOS only properties */
category: '',
/* iOS and Android properties */
id: this.lastId,
title: config.title,
message: config.message,
userInfo: {screen: 'home'},
playSound: true,
soundName: 'sound_one.mp3',
number: 10,
});

This issue is resolved by creating channel with custom soundName.
While creating channel you must define soundName if you want custom sound and add sound file in 'raw' folder.
After defining custom sound you have to reinstall the application.

Related

React native, expo-av, audio recording on web, metering is always undefined

Im working on an app that records audio using expo and makes use of the metering value
I was using version 10, and have just updated to version 12,
However after doing so, the metering value is always undefined, despite setting isMeteringEnabled to true, and it should have already been true from that preset anyway
Im running this on web, have not yet tested on native
await Audio.setAudioModeAsync({
allowsRecordingIOS: true,
interruptionModeIOS: 1,
playsInSilentModeIOS: true,
shouldDuckAndroid: false,
interruptionModeAndroid: 1,
playThroughEarpieceAndroid: false,
staysActiveInBackground: true
})
const recording = new Audio.Recording()
await recording.prepareToRecordAsync({
...Audio.RecordingOptionsPresets.HIGH_QUALITY,
isMeteringEnabled: true
})
recording.setOnRecordingStatusUpdate((status: RecordingStatus) => {
console.log(status.metering) // undefined
})

Expo-AV not loading audio from server on iOS

I am building an audio player for my react native expo project. I am using expo-av to play the sound that I am pulling from my AWS s3 bucket. I am using expo SDK 44. Everything works fine on Android, but I am receiving an error on iOS:
[Unhandled promise rejection: Error: This media format is not supported. - The AVPlayerItem instance has failed with the error code -11828 and domain "AVFoundationErrorDomain".]
-I have tried this with both .mp3 and .m4a files
-everything works on android
-local files work on iOS (require('./myaudiotrack.mp3') but not from my bucket
-this seems to be a problem with the URL that is being returned from the s3bucket and it is working with a URL with an audio file extension.
async function PlayPause() {
await Audio.setAudioModeAsync({
staysActiveInBackground: true,
interruptionModeAndroid: Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX,
shouldDuckAndroid: false,
playThroughEarpieceAndroid: false,
allowsRecordingIOS: false,
interruptionModeIOS: Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX,
playsInSilentModeIOS: true,
});
const { sound } = await Audio.Sound.createAsync(
{uri: AudioUri}, <------ this works on android, not ios
//require('../assets/zelda.mp3'), <--this works
{
shouldPlay: true,
rate: 1.0,
shouldCorrectPitch: false,
volume: 1.0,
isMuted: false,
isLooping: false,
},
);
setSound(sound);
await sound.playAsync();
}
I was able to fix the problem by declaring a file type using contentType: "audio/mp3" during the bucket upload.

how to enable blur background with lib jitsi meet?

I want to enable blur background with lib jitsi meet, I saw jitsi-meet/JitsiStreamBlurEffect.js at master · jitsi/jitsi-meet · GitHub ,but still don’t know how to enable blur background. I checked JitsiTrack setEffect( effect ) ,what is the effect specific for blur background?
Forum related links: Does lib jitsi meet support blur background?
nano /usr/share/jitsi-meet/interface-config.js
edit the toolbar and make sure, you have "videobackgroundblur" inside:
TOOLBAR_BUTTONS: [
'microphone', 'camera', 'closedcaptions', 'desktop', 'embedmeeting', 'fullscreen',
'fodeviceselection', 'hangup', 'profile', 'chat', 'recording',
'livestreaming', 'etherpad', 'sharedvideo', 'settings', 'raisehand',
'videoquality', 'filmstrip', 'invite', 'feedback', 'stats', 'shortcuts',
'tileview', 'videobackgroundblur', 'download', 'help', 'mute-everyone', 'security'
],
You can also set it programmatically i.E. in Vue:
return {
interfaceConfigOverwrite: {
TOOLBAR_BUTTONS: [
"microphone",
"chat",
"etherpad",
"fullscreen",
"recording",
"desktop",
"camera",
"hangup",
"fodeviceselection",
"settings",
"raisehand",
"videoquality",
"mute-everyone",
"videobackgroundblur"
],
},
};

On Sencha Touch 2.2.0 it is not possible to enable the default browser scroll

The new Sencha Touch 2.2.0 has a new configuration parameter on scrollable to don't use the Ext.scroll.Scroller, but actually this is not working.
I am using this to activate the overflow scroll on my container:
{
scrollable: null,
style: 'overflow:auto; -webkit-overflow-scrolling: touch;'
}
How can I use the native scroll ?
Why I need it?
Because I need to use a galaxy-tab-1 the new Ext.scroll.Scroller is faster than 2.1.1 version but the render on this tablet is slow and the new Ext.scroll.Scroller is trying to render 40 fps and the tablet is displaying this slowly.
Actually the setFps() is not working in this version, example:
Econtainer.getScrollable().getScroller().setFps(10);
The new Ext.util.Translatable has an slowly PreferredTranslationMethod by default.
You can use:
scrollable: {
direction: 'both',
translatable: {
translationMethod: 'scrollposition'
}
},
or
scrollable: {
direction: 'both',
translatable: {
translationMethod: 'csstransform'
}
},
or
scrollable: {
direction: 'both',
translatable: {
translationMethod: 'cssposition'
}
},

What is the syntax for assigning the plugins property in Extjs 4.1

What is the syntax for the plugin property in Ext.grid.Panel? If I comment out the plugins property in the code below, it works fine, but it produces an error if left in.
this.grid = new Ext.grid.Panel( {
id: "t-"+this.gridName+"-grid",
header: true,
title: gridTitle,
selType : 'rowmodel',
border: false,
store: store,
columns: cm,
selModel: sm,
loadMask: true,
provider: this.page.provider,
viewConfig: {
stripeRows: true
},
plugins: [Ext.create('Ext.ux.grid.GridHeaderFilters')]
});
Above syntax is perfectly right. Make sure that class you have created using Ext.create must have same name from define.
"Ext.define('Ext.ux.grid.RowExpander',{"
Also check init function. Whatever method you assign in grid.on i.e 'this.onRender', must exist in your plugin file. Sometimes for testing purpose we remove that and do not realise that.
init : function(grid){
grid.on( 'render', this.onRender, this);
},