Skip to content

Wraps linphone library functions to allow adding videophone features to a phonegap (cordova) app

License

MIT, GPL-2.0 licenses found

Licenses found

MIT
LICENSE
GPL-2.0
LICENSE.gpl
Notifications You must be signed in to change notification settings

KbaylonH/LinPhoneGap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Phonegap (Cordova) plugin to wrap the linphone softphone library for phonegap videophone applications.

Important

In order to use this plugin you will need to download and build the linphone iOS libraries and then add them to your phonegap project.

This is a challenging task. Start at linphone.org

This is a preliminary implementation refactored from a working project. At this point we've not taken this refactored code forward to build a working app. Useful as a reference or starting point for your own plugin. YMMV.

If there's interest we'll commit more time to enhancing and maintaining this.

Usage

<div>
    <input type="text" id="number" value="Guest" />
    <button id="call" onClick="javascript:doCall();" disabled>Call</button>
    <button id="hangup" onClick="javascript:doHangup();" disabled>Hangup</button>
    <button id="videoOn" onClick="javascript:doVideoOn();" disabled>Video On</button>
    <button id="videoOff" onClick="javascript:doVideoOff();" disabled>Video Off</button>
</div>
<script>
    // see below
</script>
    var inCall = false;
    function onCallUpdate(dict) {
        document.getElementById('call').disabled = (dict.canCall!==true);
        document.getElementById('hangup').disabled = (dict.canHangup!==true);
        document.getElementById('videoOn').disabled = (dict.canStartVideo!==true);
        document.getElementById('videoOff').disabled = (dict.canStopVideo!==true);
        inCall = (dict.canCall!==true);
        }

    function setup() {
        window.plugins.LinPhoneGap.initPhone(onCallUpdate);
        }

    function doCall() {
        var number = document.getElementById('number').value;
        window.plugins.LinPhoneGap.call(number,function(err){});
        }

    function doHangup() { window.plugins.LinPhoneGap.hangup(function(err){}); }
    function doVideoOn() { window.plugins.LinPhoneGap.videoOn(function(err){}); }
    function doVideoOff() { window.plugins.LinPhoneGap.videoOff(function(err){}); }

    /* *IMPORTANT*
    You will need to invoke the setup() function above to initialize and before use.
    Exactly how you do that will depend on your environment, frameworks and target
    browsers.
    */
    

Installation

cordova plugin add https://github.com/babelroom/LinPhoneGap.git

About

Wraps linphone library functions to allow adding videophone features to a phonegap (cordova) app

Resources

License

MIT, GPL-2.0 licenses found

Licenses found

MIT
LICENSE
GPL-2.0
LICENSE.gpl

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 87.9%
  • JavaScript 12.1%