Giter Club home page Giter Club logo

audiotoggle's People

Contributors

alongubkin avatar lylepratt avatar tedh-slalom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

audiotoggle's Issues

Unable To use

Hey,
Hopefully, you are doing well. I got an issue that I wanted to switch sound from speaker to earpiece in android while I am using "https://crosswalk-project.org" web view to load a URL from where the user can calls to another user in the web view. for more simple : I just load a web URL to web view which supports web RTC. In android, the sound is coming from the speaker but I want to route it to an earpiece.
someone suggested me to use your plugin but I am confused as how to use it in android or server end.

I need you help in that , it will be appreciable thanks in advance.:)

404 error

Plugin can't be downloaded using the path you provided.

Not working in Android

Hi I test the plugin from the fork that got package.json
the AudioToggle is detected but it didn't work

I tried all the options and nothing change audio route.

How to make it works? Thank you

audioToggle setAudioMode undefined

I am using this plugin and when it runs I get the following message:
Can not read property 'setAudioMode' of undefined.

I'm using ionic 3.
Can someone help me?
Thank you

audiotoggle is undefined

Hi There,

I have added this plugin to my phonegap app. but the given code example didn't work properly on mobile app. it generates error of 'audiotoggle is undefined'.

did you have any working example or how you used that code in your app ? Please let me know if you can help me with this issue.

Thanks,

AudioToggle prevents accessing Camera on Samsung J5 with Android Lollipop

I'm using Audiotoogle on my Chat app that also allow picture sharing.
When I try to open the Camera with the camera plugin I get the error "Impossible to use camera during call"

It worked fine on many Android phone models on Android 4.4, until tried on my new Samsung J5 with Android Lollipop.

Removing Audiotoggle allows me to access the camera in the app, again, and reinstalling Audiotoggle makes the error reappear.

It is unclear if this limitation is model based, based on a version on Android or enforced by the vendor, but it seems quite frequent by googling the problem.

I couldn't locate how Android deduces that my app generates a "call" looking at permissions in manifest, and I'm out ideas.
I really need the speakerphone feature AND the camera feature, and I believe I'm not the only one. Please adivse :)

Not working.

Do you have basic example that uses this plug-in? I cannot get it to work in my application. I have not had issues using other Cordova plugins in my project. I was able to install audiotoggle, but when I add AudioToggle.setAudioMode(AudioToggle.EARPIECE); it crashes my javascript code for any thing after that point on both Android and iOS clients (no error in console though).

Allow Switch back to MODE_NORMAL

Howdy,

I've been testing this plugin and it works great. However, there is one issue on Android.

The problem is that neither MODE_IN_COMMUNICATION or STREAM_MUSIC is the normal media mode. So after switching to one or the other, audio from other applications does not function correctly. We need to be able to switch back to the communication mode when the application pauses or ends: MODE_NORMAL

http://developer.android.com/reference/android/media/AudioManager.html#MODE_NORMAL

Will work on adding some methods to do that.

minor changes to JS to suit my app development platform

hi,

Thanks a lot for the plugin. I am a NOOB to java / cordova and I have some difficulty in getting this plugin to work. I use a mobile app development platform. I have other plugins working and here is the sample of a JS file / plugin that works

cordova.define("com.badrit.MacAddress", function(require, exports, module) {

    /*
 * MacAddress
 * Implements the javascript access to the cordova plugin for retrieving the device mac address. Returns 0 if not running on Android
 * @author Olivier Brand
 */

    /**
 * @return the mac address class instance
 */
    var MacAddress = {

        getMacAddress: function(successCallback, failureCallback){
            cordova.exec(successCallback, failureCallback, 'MacAddressPlugin',
                         'getMacAddress', []);
        }
    };

    cordova.addConstructor(function () {
        if (!window.plugins) {
            window.plugins = {};
        }

        window.plugins.MacAddress = MacAddress;
        return window.plugins.MacAddress;
    });    
});

And here is the code in your plugin / JS file

var exec = require('cordova/exec');

exports.SPEAKER = 'speaker';
exports.EARPIECE = 'earpiece';
exports.NORMAL = 'normal';
exports.RINGTONE = 'ringtone';

exports.setAudioMode = function (mode) {
    cordova.exec(null, null, 'AudioTogglePlugin', 'setAudioMode', [mode]);
};

Is it possible to change the JS in your plugin to suit my platform? If you could help in any way that'll be great. Mainly the part I couldn't understand was the exports / parameters below

exports.SPEAKER = 'speaker';
exports.EARPIECE = 'earpiece';
exports.NORMAL = 'normal';
exports.RINGTONE = 'ringtone';

Thanks once again,
M&M

Cordova NPMJS plugin

Now that phonegap needs us to use npmjs based plugins instead of pgb, I am trying to find the same plugin in npmjs, but couldn't find it. Can you help me?

Get current status (which speaker is enabled)

I'd like to know which audio output is used.
While my app is in background, during a call, I'd want to know if the user is using the the normale speaker or the earpiece.

I't would be great also listen for the event when the user toggle the audio in the native call display (outside my app)

Is it possible?

Doesn't work in iOS 12

I use ionic,
Use the following instructions to install。
$ ionic cordova plugin add cordova-plugin-audiotoggle --save
It is working in android,It is not working in ios。

How to use

Can you show me a demo code on how to use this in ionic ?

Adding plugin

Fetching plugin "com.dooble.audiotoggle" via npm

Fetching plugin "com.dooble.audiotoggle" via cordova plugins registry

Error: Failed to fetch plugin com.dooble.audiotoggle via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: connect ECONNREFUSED 50.17.177.14:80

Unable to install plugin

This command:

cordova plugin add com.dooble.audiotoggle

gives the following error:

Error: Registry returned 404 for GET on https://registry.npmjs.org/com.dooble.audiotoggle

Thanx

not working as expected? (iOS / Android)

Hey,

I was able to successfully install and run this plugin in my Ionic 1 project. I am setting AudioToggle to only be the earpiece, but it isn't working. There are no errors associated with this.

I'm using this plugin in combination with cordova-media-plugin. I am playing audio files and do not want the sound to come out of the speaker, only the earpiece. The file is playing perfectly fine.

Is anybody experiencing this issue? If so, how did you resolve this?

Error: AudioToggle is not defined

I have been trying to use this plugin in my controllers but it has never worked. its keeps giving me
Error: AudioToggle is not defined

Silent microphone

There any way to mute the microphone with this plugin or otherwise?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.