diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dd3ce5b --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +npm-debug.log +.DS_Store + +app/**/*.js +hooks/ +lib/ +node_modules/ +platforms/ +tmp/ +typings/ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c7c1623 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "typescript.tsdk": "./node_modules/typescript/lib" +} \ No newline at end of file diff --git a/app/App_Resources/Android/AndroidManifest.xml b/app/App_Resources/Android/AndroidManifest.xml new file mode 100644 index 0000000..9db8321 --- /dev/null +++ b/app/App_Resources/Android/AndroidManifest.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/App_Resources/Android/app.gradle b/app/App_Resources/Android/app.gradle new file mode 100644 index 0000000..a7b9dd2 --- /dev/null +++ b/app/App_Resources/Android/app.gradle @@ -0,0 +1,23 @@ +// Add your native dependencies here: + +// Uncomment to add recyclerview-v7 dependency +//dependencies { +// compile 'com.android.support:recyclerview-v7:+' +//} + +android { + defaultConfig { + generatedDensities = [] + applicationId = "org.nativescript.pocopentok" + + //override supported platforms + // ndk { + // abiFilters.clear() + // abiFilters "armeabi-v7a" + // } + + } + aaptOptions { + additionalParameters "--no-version-vectors" + } +} diff --git a/app/App_Resources/Android/drawable-hdpi/background.png b/app/App_Resources/Android/drawable-hdpi/background.png new file mode 100644 index 0000000..eb381c2 Binary files /dev/null and b/app/App_Resources/Android/drawable-hdpi/background.png differ diff --git a/app/App_Resources/Android/drawable-hdpi/icon.png b/app/App_Resources/Android/drawable-hdpi/icon.png new file mode 100755 index 0000000..1034356 Binary files /dev/null and b/app/App_Resources/Android/drawable-hdpi/icon.png differ diff --git a/app/App_Resources/Android/drawable-hdpi/logo.png b/app/App_Resources/Android/drawable-hdpi/logo.png new file mode 100644 index 0000000..5218f4c Binary files /dev/null and b/app/App_Resources/Android/drawable-hdpi/logo.png differ diff --git a/app/App_Resources/Android/drawable-ldpi/background.png b/app/App_Resources/Android/drawable-ldpi/background.png new file mode 100644 index 0000000..748b2ad Binary files /dev/null and b/app/App_Resources/Android/drawable-ldpi/background.png differ diff --git a/app/App_Resources/Android/drawable-ldpi/icon.png b/app/App_Resources/Android/drawable-ldpi/icon.png new file mode 100755 index 0000000..ddfc17a Binary files /dev/null and b/app/App_Resources/Android/drawable-ldpi/icon.png differ diff --git a/app/App_Resources/Android/drawable-ldpi/logo.png b/app/App_Resources/Android/drawable-ldpi/logo.png new file mode 100644 index 0000000..b9e102a Binary files /dev/null and b/app/App_Resources/Android/drawable-ldpi/logo.png differ diff --git a/app/App_Resources/Android/drawable-mdpi/background.png b/app/App_Resources/Android/drawable-mdpi/background.png new file mode 100644 index 0000000..efeaf29 Binary files /dev/null and b/app/App_Resources/Android/drawable-mdpi/background.png differ diff --git a/app/App_Resources/Android/drawable-mdpi/icon.png b/app/App_Resources/Android/drawable-mdpi/icon.png new file mode 100755 index 0000000..486e410 Binary files /dev/null and b/app/App_Resources/Android/drawable-mdpi/icon.png differ diff --git a/app/App_Resources/Android/drawable-mdpi/logo.png b/app/App_Resources/Android/drawable-mdpi/logo.png new file mode 100644 index 0000000..6263387 Binary files /dev/null and b/app/App_Resources/Android/drawable-mdpi/logo.png differ diff --git a/app/App_Resources/Android/drawable-nodpi/splash_screen.xml b/app/App_Resources/Android/drawable-nodpi/splash_screen.xml new file mode 100644 index 0000000..ada77f9 --- /dev/null +++ b/app/App_Resources/Android/drawable-nodpi/splash_screen.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/app/App_Resources/Android/drawable-xhdpi/background.png b/app/App_Resources/Android/drawable-xhdpi/background.png new file mode 100644 index 0000000..612bbd0 Binary files /dev/null and b/app/App_Resources/Android/drawable-xhdpi/background.png differ diff --git a/app/App_Resources/Android/drawable-xhdpi/icon.png b/app/App_Resources/Android/drawable-xhdpi/icon.png new file mode 100644 index 0000000..f291882 Binary files /dev/null and b/app/App_Resources/Android/drawable-xhdpi/icon.png differ diff --git a/app/App_Resources/Android/drawable-xhdpi/logo.png b/app/App_Resources/Android/drawable-xhdpi/logo.png new file mode 100644 index 0000000..ad8ee2f Binary files /dev/null and b/app/App_Resources/Android/drawable-xhdpi/logo.png differ diff --git a/app/App_Resources/Android/drawable-xxhdpi/background.png b/app/App_Resources/Android/drawable-xxhdpi/background.png new file mode 100644 index 0000000..0fa88e2 Binary files /dev/null and b/app/App_Resources/Android/drawable-xxhdpi/background.png differ diff --git a/app/App_Resources/Android/drawable-xxhdpi/icon.png b/app/App_Resources/Android/drawable-xxhdpi/icon.png new file mode 100644 index 0000000..4f69cb2 Binary files /dev/null and b/app/App_Resources/Android/drawable-xxhdpi/icon.png differ diff --git a/app/App_Resources/Android/drawable-xxhdpi/logo.png b/app/App_Resources/Android/drawable-xxhdpi/logo.png new file mode 100644 index 0000000..6683278 Binary files /dev/null and b/app/App_Resources/Android/drawable-xxhdpi/logo.png differ diff --git a/app/App_Resources/Android/drawable-xxxhdpi/background.png b/app/App_Resources/Android/drawable-xxxhdpi/background.png new file mode 100644 index 0000000..c650f64 Binary files /dev/null and b/app/App_Resources/Android/drawable-xxxhdpi/background.png differ diff --git a/app/App_Resources/Android/drawable-xxxhdpi/icon.png b/app/App_Resources/Android/drawable-xxxhdpi/icon.png new file mode 100644 index 0000000..50887a8 Binary files /dev/null and b/app/App_Resources/Android/drawable-xxxhdpi/icon.png differ diff --git a/app/App_Resources/Android/drawable-xxxhdpi/logo.png b/app/App_Resources/Android/drawable-xxxhdpi/logo.png new file mode 100644 index 0000000..fa6331c Binary files /dev/null and b/app/App_Resources/Android/drawable-xxxhdpi/logo.png differ diff --git a/app/App_Resources/Android/values-v21/colors.xml b/app/App_Resources/Android/values-v21/colors.xml new file mode 100644 index 0000000..a64641a --- /dev/null +++ b/app/App_Resources/Android/values-v21/colors.xml @@ -0,0 +1,4 @@ + + + #3d5afe + \ No newline at end of file diff --git a/app/App_Resources/Android/values-v21/styles.xml b/app/App_Resources/Android/values-v21/styles.xml new file mode 100644 index 0000000..dac8727 --- /dev/null +++ b/app/App_Resources/Android/values-v21/styles.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/App_Resources/Android/values/colors.xml b/app/App_Resources/Android/values/colors.xml new file mode 100644 index 0000000..74ad882 --- /dev/null +++ b/app/App_Resources/Android/values/colors.xml @@ -0,0 +1,7 @@ + + + #F5F5F5 + #757575 + #33B5E5 + #272734 + \ No newline at end of file diff --git a/app/App_Resources/Android/values/styles.xml b/app/App_Resources/Android/values/styles.xml new file mode 100644 index 0000000..1e8c7f2 --- /dev/null +++ b/app/App_Resources/Android/values/styles.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..5f53593 --- /dev/null +++ b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,128 @@ +{ + "images" : [ + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "icon-40@3x.png", + "scale" : "3x" + }, + { + "size" : "57x57", + "idiom" : "iphone", + "filename" : "icon-57.png", + "scale" : "1x" + }, + { + "size" : "57x57", + "idiom" : "iphone", + "filename" : "icon-57@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "icon-60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "icon-60@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "icon-29.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "icon-29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "icon-40.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "50x50", + "idiom" : "ipad", + "filename" : "icon-50.png", + "scale" : "1x" + }, + { + "size" : "50x50", + "idiom" : "ipad", + "filename" : "icon-50@2x.png", + "scale" : "2x" + }, + { + "size" : "72x72", + "idiom" : "ipad", + "filename" : "icon-72.png", + "scale" : "1x" + }, + { + "size" : "72x72", + "idiom" : "ipad", + "filename" : "icon-72@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "icon-76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "icon-76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "icon-83.5@2x.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png new file mode 100644 index 0000000..9e15af0 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png new file mode 100644 index 0000000..7b9e555 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png new file mode 100644 index 0000000..76f61ec Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png new file mode 100644 index 0000000..15b06db Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png new file mode 100644 index 0000000..585065f Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png new file mode 100644 index 0000000..a450c42 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png new file mode 100755 index 0000000..4a62478 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png new file mode 100755 index 0000000..01ff7c1 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png new file mode 100755 index 0000000..beea819 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png new file mode 100755 index 0000000..c3dc7b0 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png new file mode 100644 index 0000000..457b6d9 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png new file mode 100644 index 0000000..fa5a6ac Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png new file mode 100755 index 0000000..556bdd6 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png new file mode 100755 index 0000000..4f69cb2 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png new file mode 100644 index 0000000..94abcf7 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png new file mode 100644 index 0000000..2e71dd3 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png new file mode 100644 index 0000000..4abc9ec Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/Contents.json b/app/App_Resources/iOS/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/app/App_Resources/iOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000..4414bad --- /dev/null +++ b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,158 @@ +{ + "images" : [ + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "736h", + "filename" : "Default-736h@3x.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "736h", + "filename" : "Default-Landscape@3x.png", + "minimum-system-version" : "8.0", + "orientation" : "landscape", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "667h", + "filename" : "Default-667h@2x.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default@2x.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "retina4", + "filename" : "Default-568h@2x.png", + "minimum-system-version" : "7.0", + "orientation" : "portrait", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait@2x.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape@2x.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default.png", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default@2x.png", + "extent" : "full-screen", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default-568h@2x.png", + "extent" : "full-screen", + "subtype" : "retina4", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait.png", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape.png", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait@2x.png", + "extent" : "full-screen", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape@2x.png", + "extent" : "full-screen", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png new file mode 100644 index 0000000..d7f17fc Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png new file mode 100644 index 0000000..b884154 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png new file mode 100644 index 0000000..faab4b6 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png new file mode 100644 index 0000000..3365ba3 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png new file mode 100644 index 0000000..a44945c Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png new file mode 100644 index 0000000..e6dca62 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png new file mode 100644 index 0000000..1a50079 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png new file mode 100644 index 0000000..73d8b92 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png new file mode 100644 index 0000000..9f1f6ce Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png new file mode 100644 index 0000000..514fc5c Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json b/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json new file mode 100644 index 0000000..4f4e9c5 --- /dev/null +++ b/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchScreen-AspectFill.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchScreen-AspectFill@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png b/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png new file mode 100644 index 0000000..c293f9c Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png b/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png new file mode 100644 index 0000000..233693a Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json b/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json new file mode 100644 index 0000000..23c0ffd --- /dev/null +++ b/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchScreen-Center.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchScreen-Center@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png b/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png new file mode 100644 index 0000000..a5a775a Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png differ diff --git a/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png b/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png new file mode 100644 index 0000000..154c193 Binary files /dev/null and b/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png differ diff --git a/app/App_Resources/iOS/Info.plist b/app/App_Resources/iOS/Info.plist new file mode 100644 index 0000000..ea3e3ea --- /dev/null +++ b/app/App_Resources/iOS/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiresFullScreen + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/app/App_Resources/iOS/LaunchScreen.storyboard b/app/App_Resources/iOS/LaunchScreen.storyboard new file mode 100644 index 0000000..2ad9471 --- /dev/null +++ b/app/App_Resources/iOS/LaunchScreen.storyboard @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/App_Resources/iOS/build.xcconfig b/app/App_Resources/iOS/build.xcconfig new file mode 100644 index 0000000..4b01184 --- /dev/null +++ b/app/App_Resources/iOS/build.xcconfig @@ -0,0 +1,7 @@ +// You can add custom settings here +// for example you can uncomment the following line to force distribution code signing +// CODE_SIGN_IDENTITY = iPhone Distribution +// To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html +// DEVELOPMENT_TEAM = YOUR_TEAM_ID; +ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; +ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; diff --git a/app/app.component.html b/app/app.component.html new file mode 100644 index 0000000..9da03ae --- /dev/null +++ b/app/app.component.html @@ -0,0 +1,5 @@ + + + + + diff --git a/app/app.component.ts b/app/app.component.ts new file mode 100644 index 0000000..27b9f6f --- /dev/null +++ b/app/app.component.ts @@ -0,0 +1,13 @@ +import { Component } from "@angular/core"; + +// import { setStatusBarColors } from "./utils/status-bar-util"; + +@Component({ + selector: "main", + template: "" +}) +export class AppComponent { + constructor() { + // setStatusBarColors(); + } +} diff --git a/app/app.css b/app/app.css new file mode 100644 index 0000000..a1502e2 --- /dev/null +++ b/app/app.css @@ -0,0 +1,20 @@ +/* +In NativeScript, the app.css file is where you place CSS rules that +you would like to apply to your entire application. Check out +http://docs.nativescript.org/ui/styling for a full list of the CSS +selectors and properties you can use to style UI components. + +/* +For example, the following CSS rule changes the font size of all UI +components that have the btn class name. +*/ +.btn { + font-size: 18; +} + +/* +In many cases you may want to use the NativeScript core theme instead +of writing your own CSS rules. For a full list of class names in the theme +refer to http://docs.nativescript.org/ui/theme. +*/ +@import 'nativescript-theme-core/css/core.light.css'; diff --git a/app/app.module.ts b/app/app.module.ts new file mode 100644 index 0000000..4951923 --- /dev/null +++ b/app/app.module.ts @@ -0,0 +1,24 @@ +import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; +import { NativeScriptModule } from "nativescript-angular/nativescript.module"; + +import { NativeScriptHttpModule } from "nativescript-angular/http"; +import { NativeScriptRouterModule } from "nativescript-angular/router"; + +import { AppComponent } from "./app.component"; +import { routes, navigatableComponents } from "./app.routing"; + +@NgModule({ + declarations: [ + AppComponent, + ...navigatableComponents, + ], + bootstrap: [AppComponent], + imports: [ + NativeScriptModule, + NativeScriptHttpModule, + NativeScriptRouterModule, + NativeScriptRouterModule.forRoot(routes) + ], + schemas: [NO_ERRORS_SCHEMA] +}) +export class AppModule { } diff --git a/app/app.routing.ts b/app/app.routing.ts new file mode 100644 index 0000000..6b7222b --- /dev/null +++ b/app/app.routing.ts @@ -0,0 +1,13 @@ +// import { LoginComponent } from "./pages/login/login.component"; +import { OpentokComponent } from "./pages/opentok/opentok.component"; +// import { ListComponent } from "./pages/list/list.component"; + +export const routes = [ + { path: "", component: OpentokComponent }, + // { path: "list", component: ListComponent } +]; + +export const navigatableComponents = [ + OpentokComponent, + // ListComponent +]; diff --git a/app/main.aot.ts b/app/main.aot.ts new file mode 100644 index 0000000..8f033e9 --- /dev/null +++ b/app/main.aot.ts @@ -0,0 +1,6 @@ +// this import should be first in order to load some required settings (like globals and reflect-metadata) +import { platformNativeScript } from "nativescript-angular/platform-static"; + +import { AppModuleNgFactory } from "./app.module.ngfactory"; + +platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory); diff --git a/app/main.ts b/app/main.ts new file mode 100644 index 0000000..8a5c234 --- /dev/null +++ b/app/main.ts @@ -0,0 +1,10 @@ +// this import should be first in order to load some required settings (like globals and reflect-metadata) +import { platformNativeScriptDynamic } from "nativescript-angular/platform"; + +import { AppModule } from "./app.module"; +import { registerElement } from 'nativescript-angular/element-registry'; + +registerElement('TNSOTPublisher', () => require('nativescript-opentok').TNSOTPublisher); +registerElement("TNSOTSubscriber", () => require("nativescript-opentok").TNSOTSubscriber); + +platformNativeScriptDynamic().bootstrapModule(AppModule); \ No newline at end of file diff --git a/app/package.json b/app/package.json new file mode 100644 index 0000000..7afc17b --- /dev/null +++ b/app/package.json @@ -0,0 +1,50 @@ +{ + "private": false, + "nativescript": { + "id": "org.nativescript.helloworldng" + }, + "name": "tns-template-hello-world-ng", + "main": "main.js", + "version": "2.4.5", + "author": "Telerik ", + "description": "Nativescript Angular Hello World template", + "license": "BSD", + "keywords": [ + "telerik", + "mobile", + "angular", + "nativescript", + "{N}", + "tns", + "appbuilder", + "template" + ], + "repository": { + "type": "git", + "url": "git://github.com/NativeScript/template-hello-world-ng" + }, + "homepage": "https://github.com/NativeScript/template-hello-world-ng", + "android": { + "v8Flags": "--expose_gc" + }, + "dependencies": { + "nativescript-theme-core": "^0.2.1", + "nativescript-angular": "1.3.0", + "@angular/core": "2.3.1", + "@angular/common": "2.3.1", + "@angular/compiler": "2.3.1", + "@angular/http": "2.3.1", + "@angular/platform-browser": "2.3.1", + "@angular/platform-browser-dynamic": "2.3.1", + "@angular/forms": "2.3.1", + "@angular/router": "3.3.1", + "rxjs": "5.0.0-rc.4", + "reflect-metadata": "~0.1.8" + }, + "devDependencies": { + "zone.js": "~0.7.2", + "typescript": "~2.0.10", + "nativescript-dev-typescript": "^0.3.2", + "nativescript-dev-android-snapshot": "^0.*.*" + } +} \ No newline at end of file diff --git a/app/pages/login/login-common.css b/app/pages/login/login-common.css new file mode 100644 index 0000000..f18c22f --- /dev/null +++ b/app/pages/login/login-common.css @@ -0,0 +1,20 @@ +StackLayout { + margin-left: 30; + margin-right: 30; + padding-bottom: 15; + background-color: white; +} +Image { + margin-top: 5; + margin-bottom: 20; +} +Button, TextField { + margin-left: 16; + margin-right: 16; + margin-bottom: 10; +} +.submit-button { + background-color: #CB1D00; + color: white; + margin-top: 20; +} \ No newline at end of file diff --git a/app/pages/login/login.android.css b/app/pages/login/login.android.css new file mode 100644 index 0000000..f0f39a2 --- /dev/null +++ b/app/pages/login/login.android.css @@ -0,0 +1,3 @@ +StackLayout { + height: 340; +} \ No newline at end of file diff --git a/app/pages/login/login.component.js.map b/app/pages/login/login.component.js.map new file mode 100644 index 0000000..ff030f8 --- /dev/null +++ b/app/pages/login/login.component.js.map @@ -0,0 +1 @@ +{"version":3,"file":"login.component.js","sourceRoot":"","sources":["login.component.ts"],"names":[],"mappings":";AAAA,sCAAyE;AACzE,0CAAyC;AACzC,+BAA8B;AAC9B,gCAA+B;AAI/B,+CAA8C;AAC9C,+DAA6D;AAC7D,mDAAqD;AAQrD,IAAa,cAAc;IAQzB,wBAAoB,MAAc,EAAU,WAAwB,EAAU,IAAU;QAApE,WAAM,GAAN,MAAM,CAAQ;QAAU,gBAAW,GAAX,WAAW,CAAa;QAAU,SAAI,GAAJ,IAAI,CAAM;QANxF,gBAAW,GAAG,IAAI,CAAC;QAOjB,IAAI,CAAC,IAAI,GAAG,IAAI,WAAI,EAAE,CAAC;IACzB,CAAC;IAED,iCAAQ,GAAR;QACE,IAAI,CAAC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,oBAAoB,GAAG,gBAAgB,CAAC;IACtF,CAAC;IAED,+BAAM,GAAN;QACE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;YAC9B,KAAK,CAAC,8BAA8B,CAAC,CAAC;YACtC,MAAM,CAAC;QACT,CAAC;QAED,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACrB,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,CAAC;IACH,CAAC;IAED,8BAAK,GAAL;QAAA,iBAMC;QALC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;aAC9B,SAAS,CACR,cAAM,OAAA,KAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAA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EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACzD,wBAAY,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC9D,CAAC;IACH,qBAAC;AAAD,CAAC,AAvED,IAuEC;AAnEyB;IAAvB,gBAAS,CAAC,WAAW,CAAC;8BAAY,iBAAU;iDAAC;AAC1B;IAAnB,gBAAS,CAAC,OAAO,CAAC;8BAAQ,iBAAU;6CAAC;AACf;IAAtB,gBAAS,CAAC,UAAU,CAAC;8BAAW,iBAAU;gDAAC;AANjC,cAAc;IAN1B,gBAAS,CAAC;QACT,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,CAAC,0BAAW,CAAC;QACxB,WAAW,EAAE,wBAAwB;QACrC,SAAS,EAAE,CAAC,8BAA8B,EAAE,uBAAuB,CAAC;KACrE,CAAC;qCAS4B,eAAM,EAAuB,0BAAW,EAAgB,WAAI;GAR7E,cAAc,CAuE1B;AAvEY,wCAAc"} \ No newline at end of file diff --git a/app/pages/login/login.component.ts b/app/pages/login/login.component.ts new file mode 100644 index 0000000..a656fad --- /dev/null +++ b/app/pages/login/login.component.ts @@ -0,0 +1,177 @@ +import { Component, ElementRef, OnInit, ViewChild } from "@angular/core"; +import { Router } from "@angular/router"; +import { Color } from "color"; +import { Page } from "ui/page"; +import { TextField } from "ui/text-field"; +import { View } from "ui/core/view"; +import platformModule = require("platform"); +import * as dialogs from "ui/dialogs"; +import {TNSOTSession, TNSOTPublisher, TNSOTSubscriber} from "nativescript-opentok"; + + +@Component({ + selector: "my-app", + providers: [], + templateUrl: "pages/login/login.html", + styleUrls: ["pages/login/login-common.css", "pages/login/login.css"], +}) +export class LoginComponent implements OnInit { + + private _apiKey: string = '45750712'; + private _sessionId: string = '1_MX40NTc1MDcxMn5-MTQ4NDYzODIxNjEzMH5vZnE4WVV5M2FoQUl2cGhkYmN4bDZmUFl-fg'; + private _sessionIdRelayed: string = '1_MX40NTc1MD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ZTgwMjQ1ZDY1MGY2YTZhM2U5N2M2NGQ4ZGViZmJlYmEyZTpzZXNzaW9uX2lkPTFfTVg0ME5UYzFNRGN4TW41LU1UUTRORFl6T0RJeE5qRXpNSDV2Wm5FNFdWVjVNMkZvUVVsMmNHaGtZbU40YkRabVVGbC1mZyZjcmVhdGVfdGltZT0xNDg0NjM4OTY4Jm5vbmNlPTAuMzM0MDgxMzc1MDY0MzM1MiZyb2xlPXN1YnNjcmliZXImZXhwaXJlX3RpbWU9MTQ4NTI0Mzc2NQ=='; + + private session: TNSOTSession; + private sessionSub: TNSOTSession; + private subscriberObject: TNSOTSubscriber; + private publisherObject: TNSOTPublisher; + private token: string; + + @ViewChild("publisher") publisher: ElementRef; + @ViewChild("subscriber") subscriber: ElementRef; + + // constructor(private router: Router, private page: Page) { + // } + + // ngOnInit() { + // this.page.actionBarHidden = true; + // } + + constructor() { + this.session = TNSOTSession.initWithApiKeySessionId(this._apiKey, this._sessionIdRelayed); + // this.subscriberObject = this.subscriber.nativeElement; + // this.publisherObject = this.publisher.nativeElement; + // this.session.subscriber = this.subscriberObject; + // this.sessionSub = TNSOTSession.initWithApiKeySessionId(this._apiKey, this._sessionId); + if(platformModule.device.model == 'ONEPLUS A3003'){ + this.token = this._tokenRelP; + }else{ + this.token = this._tokenRelS; + } + console.log("Device model: " + platformModule.device.model); + console.log('<<<<<<<<<<<<<<<<<<<<, token used: '+this.token); + + } + + ngOnInit() { + console.log('ngOnInit'); + // this.session.subscriber = this.subscriber.nativeElement; + // this.session.connect(this._token); + // let publisher:TNSOTPublisher = this.publisher.nativeElement; + + // publisher.publish(this.session); + // // console.dump(this.session); + + // this.session.events.on('connectionCreated', (data) => { + // console.dump(data); + // // connectionCreated + // // this.subscriber.nativeElement.subscribe(this.session); + // let subscriber:TNSOTSubscriber = this.subscriber.nativeElement; + // // subscriber.subscribe(this.session, data.object.get('stream')); + // console.log('connectionCreated'); + // }); + // // let subscriber:TNSOTSubscriber = this.subscriber.nativeElement; + // // subscriber.subscribe(this.session); + + // let subscriber:TNSOTSubscriber = this.subscriber.nativeElement; + // subscriber.subscribe(this.session, ); + // + if(platformModule.device.model == 'ONEPLUS A3003') { + + this.session.subscriber = this.subscriber.nativeElement; + this.session.connect(this.token); + let publisher:TNSOTPublisher = this.publisher.nativeElement; + publisher.publish(this.session, '', 'HIGH', '30'); + + // this.session.events.on('streamCreated', (data) => { + // this.subscriber.subscribe(this.session); + // }); + + this.session.events.on('streamReceived', (data) => { + console.dump(data.object.get('stream')); + // connectionCreated + // this.subscriber.nativeElement.subscribe(this.session); + // let subscriber:TNSOTSubscriber = this.subscriber.nativeElement; + // console.dump(subscriber); + // // subscriber.setVideoActive(true); + // subscriber.subscribe(this.session, data.object.get('stream')); + + // this.session.subscriber.subscribe(this.session, data.object.get('stream')) + + console.log('streamCreated'); + }); + }else{ + this.session.subscriber = this.subscriber.nativeElement; + this.session.connect(this.token); + // let publisher:TNSOTPublisher = this.publisher.nativeElement; + // publisher.publish(this.session); + + this.session.events.on('streamCreated', (data) => { + console.dump(data.object.get('stream')); + // connectionCreated + // this.subscriber.nativeElement.subscribe(this.session); + let subscriber:TNSOTSubscriber = this.subscriber.nativeElement; + subscriber.subscribe(this.session, data.object.get('stream')); + console.log('streamCreated'); + }); + } + } + + // constructor() { + // this.session = TNSOTSession.initWithApiKeySessionId(this._apiKey, this._sessionId); + // } + + // ngOnInit() { + + // this.session.events.on('streamCreated', (data) => { + // console.dump(data.object.get('stream')); + // // connectionCreated + // // this.subscriber.nativeElement.subscribe(this.session); + // let subscriber:TNSOTSubscriber = this.subscriber.nativeElement; + // subscriber.subscribe(this.session, data.object.get('stream')); + // console.log('streamCreated'); + // }); + + // this.session.subscriber = this.subscriber.nativeElement; + // this.session.connect(this._token); + // let publisher: TNSOTPublisher = this.publisher.nativeElement; + // publisher.publish(this.session); + // } + + // publish() { + // this.session.connect(this._token); + // this.publisherObject.publish(this.session, '', 'HIGH', '30'); + // } + + // switchCamera() { + // this.publisherObject.cycleCamera(); + // } + + // toggleVideo() { + // this.publisherObject.toggleCamera() + // } + + // toggleMute() { + // this.publisherObject.toggleMute(); + // } + + // unpublish() { + // this.publisherObject.unpublish(this.session); + // } + + // unsubscribe() { + // this.subscriberObject.unsubscribe(this.session); + // } + + // disconnect() { + // this.session.disconnect(); + // } + +} diff --git a/app/pages/login/login.html b/app/pages/login/login.html new file mode 100644 index 0000000..a13b1ef --- /dev/null +++ b/app/pages/login/login.html @@ -0,0 +1,17 @@ + + + + + + + \ No newline at end of file diff --git a/app/pages/login/login.ios.css b/app/pages/login/login.ios.css new file mode 100644 index 0000000..a94c721 --- /dev/null +++ b/app/pages/login/login.ios.css @@ -0,0 +1,6 @@ +StackLayout { + height: 305; +} +Button { + height: 40; +} diff --git a/app/pages/opentok/opentok.component.css b/app/pages/opentok/opentok.component.css new file mode 100644 index 0000000..5a77cfb --- /dev/null +++ b/app/pages/opentok/opentok.component.css @@ -0,0 +1,3 @@ +.opentok { + +} \ No newline at end of file diff --git a/app/pages/opentok/opentok.component.html b/app/pages/opentok/opentok.component.html new file mode 100644 index 0000000..038b5cb --- /dev/null +++ b/app/pages/opentok/opentok.component.html @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/pages/opentok/opentok.component.ts b/app/pages/opentok/opentok.component.ts new file mode 100644 index 0000000..3c03ec9 --- /dev/null +++ b/app/pages/opentok/opentok.component.ts @@ -0,0 +1,49 @@ +import { Component, ElementRef, OnInit, ViewChild } from "@angular/core"; +import { TextField } from "ui/text-field"; +import { View } from "ui/core/view"; +import platformModule = require("platform"); +import * as dialogs from "ui/dialogs"; +import {TNSOTSession, TNSOTPublisher, TNSOTSubscriber} from "nativescript-opentok"; + +@Component({ + selector: 'opentok', + templateUrl: 'pages/opentok/opentok.component.html', + styleUrls: ['pages/opentok/opentok.component.css'] +}) + +export class OpentokComponent implements OnInit { + + private _apiKey: string = '45750712'; + private _sessionIdRelayed: string = '1_MX40NTc1MDcxMn5-MTQ4NDY2MDg4OTM4Nn50VEdabDVzT2ZwTGNrNm12b0NRNEFsK09-UH4'; + private _tokenRelP: string = 'T1==cGFydG5lcl9pZD00NTc1MDcxMiZzaWc9OTJkNmNmNTEwYTgyMWIyMGYzY2IxMDM4OTJkM2Y5NDg2ZmE4Mzc5ZjpzZXNzaW9uX2lkPTFfTVg0ME5UYzFNRGN4TW41LU1UUTRORFkyTURnNE9UTTRObjUwVkVkYWJEVnpUMlp3VEdOck5tMTJiME5STkVGc0swOS1VSDQmY3JlYXRlX3RpbWU9MTQ4NTMzMzc1MyZub25jZT0wLjA5NjMzNzQwMzA1NjEyMDE1JnJvbGU9cHVibGlzaGVyJmV4cGlyZV90aW1lPTE0ODU5Mzg1NTI='; + + private session: TNSOTSession; + private token: string; + + @ViewChild("publisher") publisher: ElementRef; + @ViewChild("subscriber") subscriber: ElementRef; + + constructor() { + this.session = TNSOTSession.initWithApiKeySessionId(this._apiKey, this._sessionIdRelayed); + } + + ngOnInit() { + this.session.subscriber = this.subscriber.nativeElement; + this.session.connect(this._tokenRelP); + let publisher:TNSOTPublisher = this.publisher.nativeElement; + publisher.publish(this.session, '', 'HIGH', '30'); + + this.session.events.on('streamReceived', (data) => { + console.dump(data.object.get('stream')); + // // connectionCreated + // // this.subscriber.nativeElement.subscribe(this.session); + // let subscriber:TNSOTSubscriber = this.subscriber.nativeElement; + // console.dump(subscriber); + // // subscriber.setVideoActive(true); + // this.session.subscribe(subscriber); + this.session.subscriber.subscribe(this.session, data.object.get('stream')); + + console.log('streamCreated'); + }); + } +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..cef9900 --- /dev/null +++ b/package.json @@ -0,0 +1,38 @@ +{ + "description": "NativeScript Application", + "license": "SEE LICENSE IN ", + "readme": "NativeScript Application", + "repository": "", + "nativescript": { + "id": "org.nativescript.pocopentok", + "tns-android": { + "version": "2.4.1" + } + }, + "dependencies": { + "@angular/common": "2.3.1", + "@angular/compiler": "2.3.1", + "@angular/core": "2.3.1", + "@angular/forms": "2.3.1", + "@angular/http": "2.3.1", + "@angular/platform-browser": "2.3.1", + "@angular/platform-browser-dynamic": "2.3.1", + "@angular/router": "3.3.1", + "nativescript-angular": "1.3.0", + "nativescript-opentok": "^1.6.4", + "nativescript-theme-core": "^0.2.1", + "reflect-metadata": "~0.1.8", + "rxjs": "5.0.0-rc.4", + "tns-core-modules": "2.4.4" + }, + "devDependencies": { + "babel-traverse": "6.21.0", + "babel-types": "6.21.0", + "babylon": "6.15.0", + "lazy": "1.0.11", + "nativescript-dev-android-snapshot": "^0.*.*", + "nativescript-dev-typescript": "^0.3.2", + "typescript": "~2.0.10", + "zone.js": "~0.7.2" + } +} \ No newline at end of file diff --git a/references.d.ts b/references.d.ts new file mode 100644 index 0000000..b14f383 --- /dev/null +++ b/references.d.ts @@ -0,0 +1 @@ +/// Needed for autocompletion and compilation. \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..3bd4ae0 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "noEmitHelpers": true, + "noEmitOnError": true + }, + "exclude": [ + "node_modules", + "platforms", + "**/*.aot.ts" + ] +} \ No newline at end of file