mute

Android Studio Mute/Unmute Phone

匆匆过客 提交于 2019-12-23 04:29:40
问题 So this link helps a lot: Android mute/unmute phone But I am a not the best at interpreting other people's code and everytime I try to put in there code my program crashes. Could someone help me with how to I can fix it? Spent about an hour trying to figure it out. 回答1: All you have to do is in your AndroidManifest.xml add the permission for vibration. <uses-permission android:name="android.permission.VIBRATE" /> After that in your activity whenever you want to change it to vibrate use this

How do I mute all sounds of my application?

你离开我真会死。 提交于 2019-12-23 02:40:21
问题 I'm creating a quiz app just for learning, and I've got a problem. In my mainactivity I have a media player. It plays music even going through other activities, and I have a mute button to stop the music. I also have a sound effect when I successfully hit the right answer (on a question which is in other activity). But I don't know how to mute this SFX along with the background music when I press the mute button. Any hints? ;) If it has a way to mute my entire application will be so good. I

Can you mute incoming Push Notifications from the App side [iOS]

孤街醉人 提交于 2019-12-22 12:09:06
问题 I am making an app that uses Apples Push Notifications. I want to be able to have an "off duty" mode, in which the push notification is still received, but no sound is played when it comes in. Is there a way to mute these push notifications from inside the app? I know I can simply not send the sound from the JSON message, but it would be easier if I could do it from inside the app. I want to still receive the notifications, so I don't want to unregister from push notifications 回答1: If your

C# Simulate VolumeMute press

半世苍凉 提交于 2019-12-22 06:49:39
问题 I got the following code to simulate volumemute keypress: [DllImport("coredll.dll", SetLastError = true)] static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo); byte VK_VOLUME_MUTE = 0xAD; const int KEYEVENTF_KEYUP = 0x2; const int KEYEVENTF_KEYDOWN = 0x0; private void button1_Click(object sender, EventArgs e) { keybd_event(VK_VOLUME_MUTE, 0, KEYEVENTF_KEYDOWN, 0); keybd_event(VK_VOLUME_MUTE, 0, KEYEVENTF_KEYUP, 0); } This code doesnt work. I know there's another

How to mute an iframe?

安稳与你 提交于 2019-12-19 05:35:32
问题 I need to mute an iframe, but I don't know how to do it. Here is an example of what I have: http://www.codecademy.com/en/bitAce74593/codebits/nW7U9b Here you can hear the music from the website on the iframe, I need to automatically mute that audio. Hope that someone knows how to do it. Thanks 回答1: you can mute it by js, example: just put this in your page: <script type="text/javascript"> myVid=document.getElementById("video1"); myVid.muted=true; </script> you should replace "video1" by the

Mute audio tracks of live streams using AVPlayer

拟墨画扇 提交于 2019-12-19 03:44:05
问题 I am using AVPlayer to play live stream (m3U8 file). It plays perfectly using AVPlayer but I am not able to mute it. I am using following code to mute the audio. NSMutableArray *allAudioParams = [NSMutableArray array]; for (AVPlayerItemTrack *track in _player.currentItem.tracks) { if ([track.assetTrack.mediaType isEqual:AVMediaTypeAudio]) { AVMutableAudioMixInputParameters *audioInputParams = [AVMutableAudioMixInputParameters audioMixInputParameters]; [audioInputParams setVolume:0.0 atTime

How can I mute/unmute my sound from PowerShell

ぐ巨炮叔叔 提交于 2019-12-17 09:35:19
问题 Trying to write a PowerShell cmdlet that will mute the sound at start, unless already muted, and un-mute it at the end (only if it wasn't muted to begin with). Couldn't find any PoweShell or WMI object I could use. I was toying with using Win32 functions like auxGetVolume or auxSetVolume, but couldn't quite get it to work (how to read the values from an IntPtr?). I'm using V2 CTP2. Any ideas folks? Thanks! 回答1: There does not seem to be a quick and easy way to adjust the volume.. If you have

How to mute an html5 video player

天涯浪子 提交于 2019-12-17 06:05:35
问题 I've found how to pause and play the video using jquery $("video").get(0).play(); $("video").get(0).pause(); But I can't find the mute button, if there isn't a jquery solution, I'm fine with just an onclick js solution. I need it asap. Also is there a way to fix the mute delay? I want it to mute/unmute the sound as soon as the button is clicked. 回答1: $("video").prop('muted', true); //mute AND $("video").prop('muted', false); //unmute See all events here (side note: use attr if in jQuery < 1.6

Need to shut off the sound MediaRecorder plays when the state changes

孤街醉人 提交于 2019-12-13 15:22:48
问题 I have tried the changes found at the link below but with no avail. How to shut off the sound MediaRecorder plays when the state changes I tried both AudioManager audioManager = (AudioManager) getApplicationContext().getSystemService(Context.AUDIO_SERVICE); audioManager.setStreamMute(AudioManager.STREAM_SYSTEM, false); audioManager.setStreamMute(AudioManager.STREAM_MUSIC,false); and // disable sound for recording. // disable sound when recording. ((AudioManager)activity.getApplicationContext(

How to mute a soundpool?

怎甘沉沦 提交于 2019-12-13 02:27:07
问题 I want to allow the user to mute the app with a button and someone advised me to ''stick a boolean on your MediaPlayerPool that you set to false when the mute button is pressed. Then in your playSound method, do nothing if the value is false.''but i dont know how to do that. Could someone post an example code pls. The pool code : public class MediaPlayerPool { private static MediaPlayerPool instance = null; private Context context; private List<MediaPlayer> pool; public static MediaPlayerPool