Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Commit

Permalink
Merge pull request #25 from sean-perkins/1.6-upgrade
Browse files Browse the repository at this point in the history
1.6 upgrade
  • Loading branch information
Sean Perkins authored Dec 9, 2016
2 parents fd5fb9e + f7ddab9 commit 53ccd4b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 33 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-opentok",
"version": "1.6.1",
"version": "1.6.3",
"description": "Integrates OpenTok for NativeScript.",
"main": "opentok.js",
"typings": "./opentok.d.ts",
Expand Down Expand Up @@ -53,5 +53,6 @@
"@types/es6-promise": "0.0.28"
},
"dependencies": {
"nativescript-permissions": "^1.2.1"
}
}
}
43 changes: 13 additions & 30 deletions src/android/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,37 +30,20 @@ export class TNSOTSession {
private _sessionEvents: Observable;
private options: any;

/*
constructor(apiKey: string, config: any, options?: any) {
this.apiKey = apiKey;
this.config = config;
this._sessionEvents = new Observable();
this.options = options;
/*if (currentapiVersion >= MARSHMALLOW) {
const perms = [android.Manifest.permission.CAMERA, android.Manifest.permission.RECORD_AUDIO, android.Manifest.permission.MODIFY_AUDIO_SETTINGS, android.Manifest.permission.BLUETOOTH, android.Manifest.permission.BROADCAST_STICKY];
if (options && options.explanation) {
permissions.requestPermission(perms, this.options.explanation)
.then(function () {
})
.catch(function (ex) {
});
} else {
permissions.requestPermission(perms)
.then(function () {
})
.catch(function (ex) {
});
}
}
else {}
}

*/
constructor() {
if (currentapiVersion >= MARSHMALLOW) {
const perms = [android.Manifest.permission.CAMERA, android.Manifest.permission.RECORD_AUDIO, android.Manifest.permission.MODIFY_AUDIO_SETTINGS, android.Manifest.permission.BLUETOOTH, android.Manifest.permission.BROADCAST_STICKY];
permissions.requestPermission(perms)
.then(function () {

})
.catch(function (ex) {

});
}
}

public static initWithApiKeySessionId(apiKey: string, sessionId: string) {
let tnsSession = new TNSOTSession();
tnsSession._sessionEvents = new Observable();
Expand Down
3 changes: 2 additions & 1 deletion src/ios/subscriber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {TNSOTPublisher} from './publisher';
declare var OTSubscriber: any,
OTStream: any,
OTSubscriberKitDelegate: any,
interop: any;
interop: any,
CGRectMake: any;

export class TNSOTSubscriber extends ContentView {

Expand Down
7 changes: 7 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
"types": [
]
},
"files": [
"node_modules/tns-core-modules/tns-core-modules.d.ts",
"node_modules/tns-platform-declarations/ios/ios.d.ts",
"node_modules/tns-platform-declarations/android/android17.d.ts",
"opentok.android.ts",
"opentok.ios.ts"
],
"exclude": [
"demo",
"node_modules"
Expand Down

0 comments on commit 53ccd4b

Please sign in to comment.