Skip to main content

AngularJS - Tables

Table data is normally repeatable by nature. ng-repeat directive can be used to draw table easily.  Following example states the use of ng-repeat directive to draw a table. <table> <tr> <th> Name </th> <th> Marks </th> </tr> <tr ng-repeat = "subject in student.subjects" > <td> {{ subject.name }} </td> <td> {{ subject.marks }} </td> </tr> </table> Table can be styled using CSS Styling. <style> table , th , td { border : 1px solid grey ; border - collapse : collapse ; padding : 5px ; } table tr : nth - child ( odd ) { background - color : #f2f2f2; } table tr : nth - child ( even ) { background - color : #ffffff; } </style> Example Following example will showcase all the above mentioned directive. <html> <head> <...

Audio Conference Call Demo Application(iOS) by voxeet

Download Demo Application

Voxeet iOS SDK

Voxeet SDK logo
The Voxeet SDK is a Swift library allowing users to:
  • Create demo/normal conferences
  • Join conferences
  • Change sounds angle and direction for each conference user
  • Broadcast messages to other participants
  • Send and receive video stream

Table of contents

  1. Requirements
  2. Sample Application
  3. Installing the iOS SDK
  4. SDK Initialization
  5. SDK Usage
  6. VTAudioSound Usage
  7. Available delegates / callbacks

Requirements

  • iOS 8.0+
  • Xcode 7.3+

Sample Application

A sample application is available on this public repository on GitHub.

Installing the iOS SDK

You need to disable Bitcode in your Xcode target settings: 'Build Settings' -> 'Enable Bitcode' -> No
To enable background mode, go to your target settings -> 'Capabilities' -> 'Background Modes'
Turn on 'Audio, AirPlay and Picture in Picture'
Turn on 'Voice over IP'

Installation with CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate VoxeetSDK into your Xcode project using CocoaPods, specify it in your Podfile:
use_frameworks!

target "YourTarget" do
       pod 'VoxeetSDK', '~> 1.0'
end
Then, run the following command:
$ pod install

Installation with Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate VoxeetSDK into your Xcode project using Carthage, specify it in your Cartfile:
github "voxeet/ios-sdk-sample" ~> 1.0
Run carthage update to build the framework and drag the built VoxeetSDK.framework into your Xcode project.

SDK Initialization

Initialize the SDK in the AppDelegate.swift of your application:
import VoxeetSDK

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

        // Initialization of the Voxeet SDK.
        VoxeetSDK.sharedInstance.initializeSDK("consumerKey", consumerSecret: "consumerSecret")

        return true
    }

    ...
}

SDK Usage

Initializing

VoxeetSDK.sharedInstance.initializeSDK("consumerKey", consumerSecret: "consumerSecret")
If you use external login like O365, LDAP, or custom login to retrieve contact details it's now possible to also add your contact ID with the display name and the photo URL avatar.
This allows you to ask guest users to introduce themselves and provide their display name and for your authenticated users in your enterprise or for your clients the ID that can be retrieved from O365 (name, department, etc).
VoxeetSDK.sharedInstance.initializeSDK("consumerKey", consumerSecret: "consumerSecret", externalID: "ID", name: "name", avatarURL: "URL")

Creating a demo conference

VoxeetSDK.sharedInstance.conference.createDemo { (error) in 
}

Creating a conference

VoxeetSDK.sharedInstance.conference.create(success: { (confID, confAlias) in
    }, fail: { (error) in
})

Joining a conference

VoxeetSDK.sharedInstance.conference.join(conferenceID: confID) { (error) in
}
VoxeetSDK.sharedInstance.conference.join(conferenceAlias: confAlias) { (error) in
}

Leaving a conference

VoxeetSDK.sharedInstance.conference.leave { (error) in
}

Getting a specific conference status

VoxeetSDK.sharedInstance.conference.status(conferenceID: "", success: { (json) in
    }) { (error) in
}

Getting own users

let ownUser = VoxeetSDK.sharedInstance.conference.getOwnUser()

Getting current conference users

let users = VoxeetSDK.sharedInstance.conference.getUsers()

Getting a specific user's information

let infos = VoxeetSDK.sharedInstance.conference.getUserInfo("userID")

Changing user position

// Values for angle and distance are between: angle = [-1, 1] and distance = [0, 1]
VoxeetSDK.sharedInstance.conference.setUserPosition("userID", angle: 0, distance: 0)
VoxeetSDK.sharedInstance.conference.setUserAngle("userID", angle: 0)
VoxeetSDK.sharedInstance.conference.setUserDistance("userID", distance: 0)

Getting a specific user position

let (angle, distance) = VoxeetSDK.sharedInstance.conference.getUserPosition("userID")

Sending broadcast message in a conference

VoxeetSDK.sharedInstance.conference.sendBroadcastMessage("message", completion: { (error) in
})

Muting / Unmuting a user

VoxeetSDK.sharedInstance.conference.muteUser("userID", mute: true)

Checking if a user is muted

let isMute = VoxeetSDK.sharedInstance.conference.isUserMuted("userID")

Changing output device

if VoxeetSDK.sharedInstance.conference.setOutputDevice(VTOutputDeviceType.BuildInReceiver) {
    print("The output device has been changed.")
}

Getting output devices

let (currentOutputDevice, availableOutputDevices) = VoxeetSDK.sharedInstance.conference.getOutputDevices()

Connecting the SDK with the API (manually)

This optional method is automatically called before a regular request anyway. For example 'createDemoConference' calls internally 'connect'.
VoxeetSDK.sharedInstance.connect { (error) in
}

Disonnecting the SDK with the API (manually)

This optional method can help to disconnect the SDK if you don't use it anymore.
VoxeetSDK.sharedInstance.disconnect { (error) in
}

Available delegates / callbacks

Session

class myClass: VTSessionStateDelegate {
    init() {
        // Session delegate.
        VoxeetSDK.sharedInstance.sessionStateDelegate = self
    }

    func sessionStateChanged(state: VTSessionState) {
    }
}
or
VoxeetSDK.sharedInstance.sessionStateChanged = { state in
}

Conference

class myClass: VTConferenceDelegate {
    init() {
        // Conference delegate.
        VoxeetSDK.sharedInstance.conference.delegate = self
    }

    func userJoined(userID: String, userInfo: [String: AnyObject]) {
    }

    func userLeft(userID: String, userInfo: [String: AnyObject]) {
    }

    func messageReceived(userID: String, userInfo: [String: AnyObject], message: String) {
    }
}
or
VoxeetSDK.sharedInstance.conference.userJoined = { (userID, userInfo) in
}

VoxeetSDK.sharedInstance.conference.userLeft = { (userID, userInfo) in
}

VoxeetSDK.sharedInstance.conference.messageReceived = { (userID, userInfo, message) in
}

Conference media

class myClass: VTConferenceMediaDelegate {
    @IBOutlet weak var videoRenderer: VideoRenderer!

    init() {
        // Conference media delegate.
        VoxeetSDK.sharedInstance.conference.mediaDelegate = self
    }

    func streamAdded(stream: MediaStream, peerID: String) {
        // Attaching a video stream to a renderer.
        VoxeetSDK.sharedInstance.conference.attachMediaStream(videoRenderer, stream: stream)
    }

    func streamRemovedForPeer(peerID: String) {
    }

    func streamScreenShareAdded(stream: MediaStream, peerID: String) {
        // Attaching a video stream to a renderer.
        VoxeetSDK.sharedInstance.conference.attachMediaStream(videoRenderer, stream: stream)
    }

    func streamScreenShareRemoved(peerID: String) {
    }
}
or
VoxeetSDK.sharedInstance.conference.streamAdded = { (stream: MediaStream, peerID: String) in
}

VoxeetSDK.sharedInstance.conference.streamRemoved = { (peerID: String) in
}

VoxeetSDK.sharedInstance.conference.streamScreenShareAdded = { (stream: MediaStream, peerID: String) in
}

VoxeetSDK.sharedInstance.conference.streamScreenShareRemoved = { (peerID: String) in
}

Available enums

Session state:

public enum VTSessionState {
    case NotConnected
    case Connected
    case Connecting
    case Reconnecting
}

Output devices:

public enum VTOutputDeviceType: Int {
    case BuildInReceiver
    case BuiltInSpeaker
    case Headset
    case LineOut
    case Bluetooth
    case CarAudio
    case HDMI
    case AirPlay
}

Error handler:

public enum VTErrorType: ErrorType {
    case Credential(String)
    case InternalServer
    case AccessToken
    case NoLiveConference
    case LeaveConference
    case CreateConference
    case JoinConference
    case SendBroadcastMessage
    case ServerError(String?)
    case Error(ErrorType?)
}

VTAudioSound Usage

VTAudioSound helps you to play a TrueVoice 3D audio sound into your application.
The sound must be encoded in mono to be played spatialized.

Initializing

var sound: VTAudioSound?

if let path = NSBundle.mainBundle().pathForResource("myFile", ofType: "mp3") {
    do {
        sound = try VTAudioSound(url: NSURL(fileURLWithPath: path))
    } catch let error {
        // Debug.
        print("::DEBUG:: \(error)")
    }
}

Playing sound

try? sound?.play() {
    // Debug.
    print("::DEBUG:: The sound has finished being played.")
}

Stopping sound

sound?.stop()

Checking if the sound is playing

let isPlaying = sound?.isPlaying

Looping on the current sound

sound?.loop = true

Getting filename of the sound

let filename = sound?.filename

Setting / Getting volume

// The range of valid values are from 0.0 to 1.0.
sound?.volume = 1
let volume = sound?.volume

Setting / Getting angle

// The range of valid values are from -1.0 to 1.0.
sound?.angle = 0
let angle = sound?.angle

Setting / Getting distance

// The range of valid values are from 0.0 to 1.0.
sound?.distance = 0
let distance = sound?.distance

Version

1.0.1.9

Tech

The Voxeet iOS SDK uses a number of open source projects to work properly:
  • Starscream - Starscream is a conforming WebSocket (RFC 6455) client library in Swift for iOS and OSX.
  • Alamofire - Alamofire is an HTTP networking library written in Swift.
  • SwiftyJSON - SwiftyJSON makes it easy to deal with JSON data in Swift.
  • CryptoSwift - Crypto related functions and helpers for Swift implemented in Swift.

Comments

Popular posts from this blog

AngularJS - Tables

Table data is normally repeatable by nature. ng-repeat directive can be used to draw table easily.  Following example states the use of ng-repeat directive to draw a table. <table> <tr> <th> Name </th> <th> Marks </th> </tr> <tr ng-repeat = "subject in student.subjects" > <td> {{ subject.name }} </td> <td> {{ subject.marks }} </td> </tr> </table> Table can be styled using CSS Styling. <style> table , th , td { border : 1px solid grey ; border - collapse : collapse ; padding : 5px ; } table tr : nth - child ( odd ) { background - color : #f2f2f2; } table tr : nth - child ( even ) { background - color : #ffffff; } </style> Example Following example will showcase all the above mentioned directive. <html> <head> <...

10 Reasons That Makes Magento The Dominating eCommerce Platform in 2018

In eCommerce market, for marketers, manufacturers and consumer 2017 was a great year, and it seems to be growing in 2018 as well. Every passing year shows tremendous growth in e-commerce sale that helps to take the business to new levels of success. The world's greatest brands love  Magento  for its adaptability since the present shoppers and their purchasing designs are changing incrementally. Just Magento — open source and nimble — can enable you to adjust and flourish. With a worldwide biological community of 150,000 engineers and a system of 300+ profoundly prepared arrangement accomplices, Magento helps your online deals while expanding gross edges. Magento organizations offer more at a lower TCO than dealers on aggressive trade stages. Maintaining an e-commerce business isn't a simple undertaking and expects you to put steady endeavors and to strategize to build up a solid web nearness that encourages you to give an upper hand. Wh...

Top Tips to get Results from Direct Mail

Studies demonstrate a compelling regular postal mail crusade should attract a 0.5 percent to 1 percent reaction. These “Top Tips to get Results from Direct Mail” will enable you and your partners to get the outcomes you need. Top Tips to get Results from Direct Mail Here are the top tips to get results from direct mail. 1. An intense feature Incorporate a solitary, focal message on the envelope or the front of the postcard. Case: “The Crest Team Sells More Real Estate.” The feature should fill no less than 15 percent of the front of the mailer. 2. A realistic that strengthens the focal message The realistic ought to be straightforward. Illustration: a home with a Sold sign plainly obvious. 3. Shading that pops When you take a gander at a taunt up of the card, do you see the feature first? Influence the feature and other content to emerge by utilizing shading that stands out from the foundation shading. 4. Subheads that lead into content On the off chance that ...