Skip to content

Commit

Permalink
Merge pull request #48 from shoutem/feature/platform-release-2.5.1
Browse files Browse the repository at this point in the history
Extensins as of platform release 2.5.1
  • Loading branch information
majaklajic authored Jan 14, 2021
2 parents 66ed776 + 0199699 commit eaec523
Show file tree
Hide file tree
Showing 477 changed files with 58,211 additions and 2,034 deletions.
2 changes: 1 addition & 1 deletion shoutem.about/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shoutem.about",
"version": "2.4.4-rc.1",
"version": "2.5.0",
"description": "Shoutem Extension with basic information about business",
"peerDependencies": {
"@shoutem/redux-io": "*",
Expand Down
16 changes: 12 additions & 4 deletions shoutem.about/extension.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
{
"name": "about",
"version": "2.4.4-rc.1",
"platform": "2.4.*",
"version": "2.5.0",
"platform": "2.5.*",
"title": "About",
"description": "Show info about your app or your business",
"icon": "server/assets/add-about-image.png",
"dependencies": ["shoutem.layouts", "shoutem.cms"],
"categories": ["content"],
"dependencies": [
"shoutem.layouts",
"shoutem.cms"
],
"categories": [
"content"
],
"i18n": {
"locale": "en",
"translationPath": "server/translations/en.json"
Expand All @@ -21,6 +26,9 @@
"title": "About",
"icon": "theme://about.png",
"screen": "@.AboutScreen",
"capabilities": [
"shoutem.cms.import-csv"
],
"adminPages": [
{
"page": "shoutem.cms.CmsPage",
Expand Down
2 changes: 1 addition & 1 deletion shoutem.about/server/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "shoutem.about",
"version": "2.4.4-rc.1"
"version": "2.5.0"
}
2 changes: 1 addition & 1 deletion shoutem.advertising/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shoutem.advertising",
"version": "2.4.3",
"version": "2.5.0",
"description": "Integrate AdMob and embed ads to your application",
"dependencies": {
"@react-native-firebase/app": "7.1.0",
Expand Down
4 changes: 2 additions & 2 deletions shoutem.advertising/extension.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "advertising",
"title": "Advertising",
"version": "2.4.3",
"version": "2.5.0",
"description": "Integrate AdMob and embed ads to your application",
"icon": "server/assets/add-advertising-image.png",
"platform": "~2.4.1",
"platform": "2.5.*",
"i18n": {
"locale": "en",
"translationPath": "server/translations/en.json"
Expand Down
2 changes: 1 addition & 1 deletion shoutem.advertising/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shoutem.advertising",
"version": "2.4.3",
"version": "2.5.0",
"description": "Integrate AdMob and embed ads to your application",
"scripts": {
"lint": "eslint --no-eslintrc -c .eslintrc src/**/*.{js,jsx}",
Expand Down
2 changes: 1 addition & 1 deletion shoutem.agora/app/components/LocalVideoContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function LocalVideoContainer({ onCameraSwitchPress, style }) {
styleName="clear"
>
<Icon
name="cam-switch"
name="camSwitch"
style={style.switchCameraIcon}
styleName="clear"
/>
Expand Down
2 changes: 1 addition & 1 deletion shoutem.agora/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shoutem.agora",
"version": "2.4.4",
"version": "2.5.1",
"dependencies": {
"react-native-agora": "~2.9.1-alpha.4",
"react-native-stopwatch-timer": "~0.0.21",
Expand Down
31 changes: 28 additions & 3 deletions shoutem.agora/app/screens/VideoCallScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@ import { connectStyle } from '@shoutem/theme';
import { NavigationBar } from 'shoutem.navigation';
import { getUser, isAuthenticated } from 'shoutem.auth';
import { getExtensionSettings } from 'shoutem.application/redux';
import {
checkPermissions,
openDeviceSettings,
PERMISSION_RESULT_TYPES,
PERMISSION_TYPES,
requestPermissions,
} from 'shoutem.permissions';
import WaitingForPeerView from '../components/WaitingForPeerView';
import VideoCallView from '../components/VideoCallView';
import VideoCallStartingView from '../components/VideoCallStartingView';
import { checkPermissions, requestPermissions } from '../services/permissions';
import * as Agora from '../services/agora';
import { images } from '../assets/index';
import { ext } from '../const';

const { CAMERA, MICROPHONE } = PERMISSION_TYPES;
const { GRANTED } = PERMISSION_RESULT_TYPES;

class VideoCallScreen extends PureComponent {
constructor(props) {
super(props);
Expand All @@ -43,7 +52,7 @@ class VideoCallScreen extends PureComponent {

componentDidMount() {
// Requesting Mic and Camera permissions
requestPermissions();
requestPermissions(CAMERA, MICROPHONE);

// If new user has joined
RtcEngine.on(Agora.EVENTS.REMOTE_USER_JOINED, (data) => {
Expand Down Expand Up @@ -147,7 +156,23 @@ class VideoCallScreen extends PureComponent {
return Agora.authFailedAlert();
}

checkPermissions()
/* this function checks camera and microphone status and opens Settings Page
if permissions have not been granted */
checkPermissions(CAMERA, MICROPHONE)
.then((statuses) => {
const camera = statuses[CAMERA];
const microphone = statuses[MICROPHONE];

if (microphone === GRANTED && camera === GRANTED) {
return true;
}

openDeviceSettings();
return false;
})
.catch((error) => {
console.log('Check permissions failed:', error);
})
.then((permissionsGranted) => {
if (permissionsGranted) {
return this.startCall();
Expand Down
75 changes: 0 additions & 75 deletions shoutem.agora/app/services/permissions.js

This file was deleted.

10 changes: 7 additions & 3 deletions shoutem.agora/extension.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
{
"name": "agora",
"title": "Agora video calls",
"version": "2.4.4",
"version": "2.5.1",
"icon": "server/assets/add-videos-image.png",
"description": "Connect your users with real-time video conferencing!",
"platform": "2.4.*",
"platform": "~2.5.1",
"releaseNotes": "* Handled device permissions using the shoutem.permissions extension",
"i18n": {
"locale": "en",
"translationPath": "server/translations/en.json"
},
"dependencies": ["shoutem.auth"],
"dependencies": [
"shoutem.auth",
"shoutem.permissions"
],
"screens": [
{
"name": "VideoCallScreen"
Expand Down
Loading

0 comments on commit eaec523

Please sign in to comment.