amazon-chime-sdk-rails 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +8 -16
- data/CHANGELOG.md +21 -0
- data/Dockerfile +1 -1
- data/Gemfile +3 -1
- data/README.md +6 -2
- data/amazon-chime-sdk-rails.gemspec +1 -1
- data/config/spring.rb +2 -0
- data/gemfiles/Gemfile.rails-7.0 +1 -7
- data/gemfiles/Gemfile.rails-7.1 +26 -0
- data/lib/amazon-chime-sdk-rails.rb +2 -3
- data/lib/chime_sdk/config.rb +0 -10
- data/lib/chime_sdk/controller/common.rb +4 -19
- data/lib/chime_sdk/controller/meetings.rb +3 -3
- data/lib/chime_sdk/meeting_coordinator.rb +108 -74
- data/lib/chime_sdk/version.rb +1 -1
- data/lib/generators/templates/chime_sdk.rb +0 -3
- data/lib/generators/templates/views/meetings/index.html.erb +4 -21
- data/lib/generators/templates/views/meetings/show.html.erb +3 -3
- data/spec/rails_app/app/views/meetings/index.html.erb +4 -21
- data/spec/rails_app/app/views/meetings/show.html.erb +5 -13
- data/spec/rails_app/app/views/rooms/show.html.erb +1 -1
- data/spec/rails_app/config/initializers/chime_sdk.rb +0 -3
- data/spec/requests/atendees_spec.rb +13 -3
- data/spec/requests/meetings_spec.rb +34 -17
- data/templates/amazon-chime-sdk-policy.yml +11 -15
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7043551e2f5cda62424e44f900a17eacf61dd23c5031f4d84dbb130eac22e2cf
|
4
|
+
data.tar.gz: 7b13195e5ee0dce1365024f164b4ad39ae481ae09b28833dd6058729c17f6505
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd6dc1a0ae0c9794f0a2ac8fc2d0d24c05848229cbd8d5155a2cc4e1ca1e14a0fa62fa0f874b5d8d8d07dba49914c35af771c58fc7529fd8987d8e5080f7ba79
|
7
|
+
data.tar.gz: 51938a494e814da4641795fe2f698014c79d15a9c1d66568025f13af15403f770896150bf89083a6ce063234edb850bf69a406255118337a6c014178d458b8fa
|
data/.github/workflows/build.yml
CHANGED
@@ -11,8 +11,9 @@ on:
|
|
11
11
|
- '!images'
|
12
12
|
|
13
13
|
env:
|
14
|
-
# https://nodejs.org/en/download/
|
15
|
-
|
14
|
+
# https://nodejs.org/en/download/current
|
15
|
+
# https://nodejs.org/en/about/previous-releases
|
16
|
+
node-version: 21.6.2
|
16
17
|
|
17
18
|
jobs:
|
18
19
|
build:
|
@@ -21,26 +22,17 @@ jobs:
|
|
21
22
|
fail-fast: false
|
22
23
|
matrix:
|
23
24
|
gemfile:
|
24
|
-
- gemfiles/Gemfile.rails-5.0
|
25
|
-
- gemfiles/Gemfile.rails-5.1
|
26
|
-
- gemfiles/Gemfile.rails-5.2
|
27
|
-
- gemfiles/Gemfile.rails-6.0
|
28
25
|
- gemfiles/Gemfile.rails-6.1
|
29
26
|
- gemfiles/Gemfile.rails-7.0
|
27
|
+
- gemfiles/Gemfile.rails-7.1
|
30
28
|
include:
|
31
29
|
# https://www.ruby-lang.org/en/downloads
|
32
|
-
- gemfile: gemfiles/Gemfile.rails-5.0
|
33
|
-
ruby-version: 2.7.6
|
34
|
-
- gemfile: gemfiles/Gemfile.rails-5.1
|
35
|
-
ruby-version: 2.7.6
|
36
|
-
- gemfile: gemfiles/Gemfile.rails-5.2
|
37
|
-
ruby-version: 2.7.6
|
38
|
-
- gemfile: gemfiles/Gemfile.rails-6.0
|
39
|
-
ruby-version: 3.0.4
|
40
30
|
- gemfile: gemfiles/Gemfile.rails-6.1
|
41
|
-
ruby-version: 3.0
|
31
|
+
ruby-version: 3.3.0
|
42
32
|
- gemfile: gemfiles/Gemfile.rails-7.0
|
43
|
-
ruby-version: 3.0
|
33
|
+
ruby-version: 3.3.0
|
34
|
+
- gemfile: gemfiles/Gemfile.rails-7.1
|
35
|
+
ruby-version: 3.3.0
|
44
36
|
- gemfile: Gemfile
|
45
37
|
ruby-version: head
|
46
38
|
allow_failures: 'true'
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
## 2.0.0 / 2024-02-28
|
2
|
+
[Full Changelog](http://github.com/simukappu/amazon-chime-sdk-rails/compare/v1.1.1...v2.0.0)
|
3
|
+
|
4
|
+
Enhancements:
|
5
|
+
|
6
|
+
* Update [API namespace from Chime to ChimeSDKMeetings](https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html)
|
7
|
+
* Update embedded [Chime SDK from v2 to v3](https://aws.github.io/amazon-chime-sdk-js/modules/migrationto_3_0.html)
|
8
|
+
* Update test case with Rails 7.1
|
9
|
+
|
10
|
+
## 1.1.1 / 2023-07-17
|
11
|
+
[Full Changelog](http://github.com/simukappu/amazon-chime-sdk-rails/compare/v1.1.0...v1.1.1)
|
12
|
+
|
13
|
+
Enhancements:
|
14
|
+
|
15
|
+
* Remove unmaintained Rails versions from test cases
|
16
|
+
* Update test case with Rails 7.0
|
17
|
+
|
18
|
+
Bug Fixes:
|
19
|
+
|
20
|
+
* Remove unnecessary log for debug
|
21
|
+
|
1
22
|
## 1.1.0 / 2022-05-04
|
2
23
|
[Full Changelog](http://github.com/simukappu/amazon-chime-sdk-rails/compare/v1.0.0...v1.1.0)
|
3
24
|
|
data/Dockerfile
CHANGED
data/Gemfile
CHANGED
@@ -3,7 +3,9 @@ source 'https://rubygems.org'
|
|
3
3
|
gemspec
|
4
4
|
|
5
5
|
# Bundle Rails
|
6
|
-
gem 'rails', '~>
|
6
|
+
gem 'rails', '~> 7.1.0'
|
7
|
+
# https://github.com/lynndylanhurley/devise_token_auth/pull/1606
|
8
|
+
gem 'devise_token_auth', git: 'https://github.com/lynndylanhurley/devise_token_auth.git'
|
7
9
|
|
8
10
|
gem 'sqlite3'
|
9
11
|
gem 'puma'
|
data/README.md
CHANGED
@@ -20,6 +20,8 @@
|
|
20
20
|
* *Single Javascript Generator* - Generator to [bundle Amazon Chime SDK into a single .js file](https://github.com/aws-samples/amazon-chime-sdk/tree/main/utils/singlejs) and put it into [Asset Pipeline](https://guides.rubyonrails.org/asset_pipeline.html) for your Rails application with Action View.
|
21
21
|
* *View Generator* - Generator to create customizable meetings views for your Rails application with Action View.
|
22
22
|
|
23
|
+
Note: The latest *amazon-chime-sdk-rails* supports AWS SDK endpoint with latest [ChimeSDKMeetings](https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_Operations_Amazon_Chime_SDK_Meetings.html) namespace. If you want to use deprecated [Chime](https://docs.aws.amazon.com/chime/latest/APIReference/welcome.html) namespace, use older version of *amazon-chime-sdk-rails*. See [Migrating from the Amazon Chime namespace](https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html) for more details.
|
24
|
+
|
23
25
|
|
24
26
|
## Getting Started
|
25
27
|
|
@@ -137,7 +139,8 @@ Push "Continue" and go to the private meeting room!
|
|
137
139
|
|
138
140
|
### Deploy application to your AWS environment
|
139
141
|
|
140
|
-
At first, [install the latest version of AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
|
142
|
+
At first, [install the latest version of AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html), [set up AWS credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) and [](Installing the AWS SAM CLI) in your local environment.
|
143
|
+
At first, [install the latest version of AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html), [set up AWS credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) and [installing the AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html) in your local environment.
|
141
144
|
|
142
145
|
Deploy customized React Meeting Demo to your AWS environment:
|
143
146
|
|
@@ -178,7 +181,7 @@ $ copilot init
|
|
178
181
|
> ./Dockerfile
|
179
182
|
Enter custom path for your Dockerfile
|
180
183
|
Use an existing image instead
|
181
|
-
Would you like to deploy
|
184
|
+
Would you like to deploy an environment? [? for help] (y/N) no
|
182
185
|
$ mkdir copilot/rails-app/addons && cp templates/amazon-chime-sdk-policy.yml copilot/rails-app/addons/
|
183
186
|
$ copilot env init --name test --profile default --app amazon-chime-sdk-rails
|
184
187
|
Would you like to use the default configuration for a new environment?
|
@@ -189,6 +192,7 @@ $ copilot env init --name test --profile default --app amazon-chime-sdk-rails
|
|
189
192
|
> Yes, use default.
|
190
193
|
Yes, but I'd like configure the default resources (CIDR ranges, AZs).
|
191
194
|
No, I'd like to import existing resources (VPC, subnets).
|
195
|
+
$ copilot env deploy --name test
|
192
196
|
$ REACT_MEETING_DEMO_URL=`aws cloudformation describe-stacks --region us-east-1 --stack-name react-meeting-demo | jq -r '.Stacks[].Outputs[].OutputValue'`
|
193
197
|
$ gsed -i "s/#variables:/variables:/g" copilot/rails-app/manifest.yml
|
194
198
|
$ gsed -i "/variables:/a\ REACT_MEETING_DEMO_URL: $REACT_MEETING_DEMO_URL" copilot/rails-app/manifest.yml
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.required_ruby_version = '>= 2.2.2'
|
20
20
|
|
21
21
|
s.add_dependency 'railties', '>= 5.0.0'
|
22
|
-
s.add_dependency 'aws-sdk-
|
22
|
+
s.add_dependency 'aws-sdk-chimesdkmeetings', '>= 1.0.0'
|
23
23
|
|
24
24
|
s.add_development_dependency 'rspec-rails', '>= 4.0.1'
|
25
25
|
s.add_development_dependency 'factory_bot_rails', '>= 6.1.0'
|
data/config/spring.rb
ADDED
data/gemfiles/Gemfile.rails-7.0
CHANGED
@@ -4,24 +4,18 @@ gemspec path: '../'
|
|
4
4
|
|
5
5
|
# Bundle Rails
|
6
6
|
gem 'rails', '~> 7.0.0'
|
7
|
-
# https://github.com/lynndylanhurley/devise_token_auth/pull/1517
|
8
|
-
gem 'devise_token_auth', git: 'https://github.com/lynndylanhurley/devise_token_auth.git'
|
9
|
-
# Tentative measure for 'check_for_activated_spec!' with default gem in Ruby 3.0.3
|
10
|
-
gem 'digest', '3.0.0'
|
11
|
-
gem 'io-wait', '0.2.0'
|
12
7
|
|
13
8
|
gem 'sqlite3'
|
14
9
|
gem 'puma'
|
15
10
|
gem 'sass-rails'
|
16
11
|
gem 'turbolinks'
|
17
12
|
gem 'jbuilder'
|
18
|
-
gem 'sprockets-rails'
|
19
13
|
|
20
14
|
group :development do
|
21
15
|
gem 'web-console'
|
22
16
|
gem 'listen'
|
23
17
|
gem 'spring'
|
24
|
-
gem 'spring-watcher-listen'
|
18
|
+
gem 'spring-watcher-listen'
|
25
19
|
end
|
26
20
|
|
27
21
|
group :test do
|
@@ -0,0 +1,26 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gemspec path: '../'
|
4
|
+
|
5
|
+
# Bundle Rails
|
6
|
+
gem 'rails', '~> 7.1.0'
|
7
|
+
# https://github.com/lynndylanhurley/devise_token_auth/pull/1606
|
8
|
+
gem 'devise_token_auth', git: 'https://github.com/lynndylanhurley/devise_token_auth.git'
|
9
|
+
|
10
|
+
gem 'sqlite3'
|
11
|
+
gem 'puma'
|
12
|
+
gem 'sass-rails'
|
13
|
+
gem 'turbolinks'
|
14
|
+
gem 'jbuilder'
|
15
|
+
|
16
|
+
group :development do
|
17
|
+
gem 'web-console'
|
18
|
+
gem 'listen'
|
19
|
+
gem 'spring'
|
20
|
+
gem 'spring-watcher-listen'
|
21
|
+
end
|
22
|
+
|
23
|
+
group :test do
|
24
|
+
# gem 'coveralls', require: false
|
25
|
+
gem 'coveralls_reborn', require: false
|
26
|
+
end
|
@@ -17,7 +17,6 @@ module ChimeSdk
|
|
17
17
|
# config.appication_name = 'chime-sdk-rails'
|
18
18
|
# config.media_region = 'us-east-1'
|
19
19
|
# config.prefix = "#{config.application_name}-#{Rails.env}-"
|
20
|
-
# config.max_meeting_results = 10
|
21
20
|
# config.max_attendee_results = 10
|
22
21
|
# config.create_meeting_with_attendee = true
|
23
22
|
# config.create_attendee_from_meeting = true
|
@@ -27,8 +26,8 @@ module ChimeSdk
|
|
27
26
|
yield(config) if block_given?
|
28
27
|
end
|
29
28
|
|
30
|
-
# Load AWS SDK for Amazon Chime
|
31
|
-
require 'aws-sdk-
|
29
|
+
# Load AWS SDK for Amazon Chime SDK meetings
|
30
|
+
require 'aws-sdk-chimesdkmeetings'
|
32
31
|
|
33
32
|
# Load ChimeSdk helpers
|
34
33
|
require 'chime_sdk/controller/common'
|
data/lib/chime_sdk/config.rb
CHANGED
@@ -28,15 +28,6 @@ module ChimeSdk
|
|
28
28
|
# @return [Boolean] Prefix to make unique key of Chime SDK meetings and attendees
|
29
29
|
attr_accessor :prefix
|
30
30
|
|
31
|
-
# @overload max_meeting_results
|
32
|
-
# Return default max_results value used in list_meetings API.
|
33
|
-
# @return [Boolean] Default max_results value used in list_meetings API
|
34
|
-
# @overload max_meeting_results=(value)
|
35
|
-
# Set default max_results value used in list_meetings API.
|
36
|
-
# @param [Boolean] max_meeting_results The new max_meeting_results
|
37
|
-
# @return [Boolean] Default max_results value used in list_meetings API
|
38
|
-
attr_accessor :max_meeting_results
|
39
|
-
|
40
31
|
# @overload max_attendee_results
|
41
32
|
# Return default max_results value used in list_attendees API.
|
42
33
|
# @return [Boolean] Default max_results value used in list_attendees API
|
@@ -80,7 +71,6 @@ module ChimeSdk
|
|
80
71
|
@application_name = 'chime-sdk-rails'
|
81
72
|
@media_region = 'us-east-1'
|
82
73
|
@prefix = "#{@application_name}-#{Rails.env}-"
|
83
|
-
@max_meeting_results = 10
|
84
74
|
@max_attendee_results = 10
|
85
75
|
@create_meeting_with_attendee = true
|
86
76
|
@create_attendee_from_meeting = true
|
@@ -6,9 +6,9 @@ module ChimeSdk
|
|
6
6
|
extend ActiveSupport::Concern
|
7
7
|
|
8
8
|
included do
|
9
|
-
rescue_from Aws::
|
10
|
-
rescue_from Aws::
|
11
|
-
rescue_from Aws::
|
9
|
+
rescue_from Aws::ChimeSDKMeetings::Errors::ForbiddenException, with: :render_forbidden
|
10
|
+
rescue_from Aws::ChimeSDKMeetings::Errors::NotFoundException, with: :render_resource_not_found
|
11
|
+
rescue_from Aws::ChimeSDKMeetings::Errors::ValidationException, with: :render_resource_not_found
|
12
12
|
|
13
13
|
class ::String
|
14
14
|
# Convets to boolean.
|
@@ -39,14 +39,6 @@ module ChimeSdk
|
|
39
39
|
@attendee ? @attendee[:Attendee][:AttendeeId] : attendee_id_param
|
40
40
|
end
|
41
41
|
|
42
|
-
# List meetings by MeetingCoordinator.
|
43
|
-
# @api protected
|
44
|
-
# @return [Array<Hash>] Meeting list
|
45
|
-
def list_meetings
|
46
|
-
@meetings = ChimeSdk::MeetingCoordinator.list_meetings(prefix_filter: meeting_request_id)
|
47
|
-
@meetings = @meetings.map { |meeting| merge_application_meeting_metadata(meeting) }
|
48
|
-
end
|
49
|
-
|
50
42
|
# Create meeting by MeetingCoordinator.
|
51
43
|
# @api protected
|
52
44
|
# @return [Hash] Created meeting
|
@@ -82,7 +74,7 @@ module ChimeSdk
|
|
82
74
|
# @api protected
|
83
75
|
# @return [Hash] Created attendee
|
84
76
|
def create_attendee
|
85
|
-
@attendee = ChimeSdk::MeetingCoordinator.create_attendee(meeting_id, attendee_request_id
|
77
|
+
@attendee = ChimeSdk::MeetingCoordinator.create_attendee(meeting_id, attendee_request_id)
|
86
78
|
@attendee = merge_application_attendee_metadata(@attendee)
|
87
79
|
end
|
88
80
|
|
@@ -144,13 +136,6 @@ module ChimeSdk
|
|
144
136
|
tags + optional_meeting_tags
|
145
137
|
end
|
146
138
|
|
147
|
-
# Return tags for attendees from defined optional_attendee_tags.
|
148
|
-
# @api protected
|
149
|
-
# @return [Array<Hash>] Tags for attendees
|
150
|
-
def attendee_tags
|
151
|
-
tags + optional_attendee_tags
|
152
|
-
end
|
153
|
-
|
154
139
|
# Merge application metadata into meeting instance and return.
|
155
140
|
# @api protected
|
156
141
|
# @param [Hash] meeting Meeting JSON object as hash
|
@@ -21,10 +21,11 @@ module ChimeSdk
|
|
21
21
|
if params[:create_meeting].to_s.to_boolean(false) || ChimeSdk.config.create_meeting_by_get_request && params[:create_meeting].to_s.to_boolean(true)
|
22
22
|
create
|
23
23
|
else
|
24
|
-
|
24
|
+
@meeting_request_id = ChimeSdk.config.prefix + meeting_request_id
|
25
|
+
@attendee_request_id = ChimeSdk.config.prefix + attendee_request_id
|
25
26
|
respond_to do |format|
|
26
27
|
format.html
|
27
|
-
format.json { render json: {
|
28
|
+
format.json { render json: { meeting_request_id: @meeting_request_id, attendee_request_id: @attendee_request_id } }
|
28
29
|
end
|
29
30
|
end
|
30
31
|
end
|
@@ -37,7 +38,6 @@ module ChimeSdk
|
|
37
38
|
def show
|
38
39
|
get_meeting
|
39
40
|
if params[:create_attendee_from_meeting].to_s.to_boolean(false) || ChimeSdk.config.create_attendee_from_meeting && params[:create_attendee_from_meeting].to_s.to_boolean(true)
|
40
|
-
puts "create_attendee_from_meeting"
|
41
41
|
create_attendee_from_meeting
|
42
42
|
end
|
43
43
|
respond_to do |format|
|
@@ -1,74 +1,64 @@
|
|
1
1
|
module ChimeSdk
|
2
2
|
# Meeting coordinator as a wrapper module of AWS SDK for Ruby, which simulates AWS SDK for JavaScript.
|
3
|
-
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/
|
4
|
-
# @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/
|
3
|
+
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ChimeSDKMeetings/Client.html Aws::ChimeSDKMeetings::Client of AWS SDK for Ruby
|
4
|
+
# @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ChimeSDKMeetings.html AWS.ChimeSDKMeetings of AWS SDK for JavaScript
|
5
5
|
module MeetingCoordinator
|
6
|
-
require 'aws-sdk-
|
6
|
+
require 'aws-sdk-chimesdkmeetings'
|
7
7
|
|
8
|
-
# Return initialized Aws::
|
8
|
+
# Return initialized Aws::ChimeSDKMeetings::Client.
|
9
9
|
# You must use "us-east-1" as the region for Chime API and set the endpoint.
|
10
|
-
# @return [Aws::
|
10
|
+
# @return [Aws::ChimeSDKMeetings::Client] Initialized Aws::ChimeSDKMeetings::Client instance
|
11
11
|
# @see https://aws.github.io/amazon-chime-sdk-js/modules/gettingstarted.html
|
12
12
|
def self.client
|
13
|
-
@@client ||= Aws::
|
13
|
+
@@client ||= Aws::ChimeSDKMeetings::Client.new(region: 'us-east-1')
|
14
14
|
end
|
15
15
|
|
16
|
-
# Reset client with initialized Aws::
|
17
|
-
# @param [Aws::
|
18
|
-
# @return [Aws::
|
16
|
+
# Reset client with initialized Aws::ChimeSDKMeetings::Client instance.
|
17
|
+
# @param [Aws::ChimeSDKMeetings::Client] client Initialized Aws::ChimeSDKMeetings::Client instance
|
18
|
+
# @return [Aws::ChimeSDKMeetings::Client] Initialized Aws::ChimeSDKMeetings::Client instance
|
19
19
|
def self.reset_client(client)
|
20
20
|
@@client = client
|
21
21
|
end
|
22
22
|
|
23
|
-
# Wrapper of Aws::
|
24
|
-
# This function also provides prefix match filter of external_meeting_id.
|
25
|
-
# This method filters the result with ChimeSdk.config.prefix to return only meetings in your application.
|
26
|
-
# @param [Integer] max_results (ChimeSdk.config.max_meeting_results) The maximum number of results to return in a single call
|
27
|
-
# @param [String] prefix_filter (nil) Additional string for prefix match filter of external_meeting_id
|
28
|
-
# @return [Array<Hash>] Array of filtered meeting JSON object as hash
|
29
|
-
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Chime/Client.html#list_meetings-instance_method Aws::Chime::Client#list_meetings of AWS SDK for Ruby
|
30
|
-
def self.list_meetings(
|
31
|
-
max_results: ChimeSdk.config.max_meeting_results,
|
32
|
-
prefix_filter: nil
|
33
|
-
)
|
34
|
-
resp = client.list_meetings({
|
35
|
-
max_results: max_results
|
36
|
-
})
|
37
|
-
meetings = resp.meetings
|
38
|
-
meetings = meetings.select { |meeting| meeting.external_meeting_id.start_with?(ChimeSdk.config.prefix + prefix_filter) } if prefix_filter
|
39
|
-
meetings.map { |meeting| meeting_as_json(meeting) }
|
40
|
-
end
|
41
|
-
|
42
|
-
# Wrapper of Aws::Chime::Client#create_meeting method.
|
23
|
+
# Wrapper of Aws::ChimeSDKMeetings::Client#create_meeting method.
|
43
24
|
# This method uses 'ChimeSdk.config.prefix + meeting_request_id' for client_request_token and external_meeting_id.
|
44
25
|
# @param [required, String] meeting_request_id The unique identifier for the client request. Use a different token for different meetings.
|
45
|
-
# @param [String] meeting_host_id (nil) Reserved
|
46
26
|
# @param [String] media_region (ChimeSdk.config.media_region) The Region in which to create the meeting
|
47
|
-
# @param [
|
48
|
-
# @param [Aws::
|
27
|
+
# @param [String] meeting_host_id (nil) Reserved
|
28
|
+
# @param [Aws::ChimeSDKMeetings::Types::MeetingNotificationConfiguration] notifications_configuration (nil) The configuration for resource targets to receive notifications when meeting and attendee events occur
|
29
|
+
# @param [Aws::ChimeSDKMeetings::Types::MeetingFeaturesConfiguration] meeting_features (nil) Lists the audio and video features enabled for a meeting, such as echo reduction
|
30
|
+
# @param [String] primary_meeting_id (nil) When specified, replicates the media from the primary meeting to the new meeting
|
31
|
+
# @param [Array<String>] tenant_ids (nil) A consistent and opaque identifier, created and maintained by the builder to represent a segment of their users
|
32
|
+
# @param [Array<Aws::ChimeSDKMeetings::Types::Tag>] tags (nil) Applies one or more tags to an Amazon Chime SDK meeting
|
49
33
|
# @return [Hash] Created meeting JSON object as hash
|
50
|
-
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/
|
34
|
+
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ChimeSDKMeetings/Client.html#create_meeting-instance_method Aws::ChimeSDKMeetings::Client#create_meeting of AWS SDK for Ruby
|
51
35
|
def self.create_meeting(meeting_request_id,
|
52
|
-
meeting_host_id: nil,
|
53
36
|
media_region: ChimeSdk.config.media_region,
|
54
|
-
|
55
|
-
notifications_configuration: {}
|
37
|
+
meeting_host_id: nil,
|
38
|
+
notifications_configuration: {},
|
39
|
+
meeting_features: {},
|
40
|
+
primary_meeting_id: nil,
|
41
|
+
tenant_ids: nil,
|
42
|
+
tags: []
|
56
43
|
)
|
57
44
|
resp = client.create_meeting({
|
58
45
|
client_request_token: ChimeSdk.config.prefix + meeting_request_id,
|
59
|
-
external_meeting_id: ChimeSdk.config.prefix + meeting_request_id,
|
60
|
-
meeting_host_id: meeting_host_id,
|
61
46
|
media_region: media_region,
|
62
|
-
|
63
|
-
|
47
|
+
meeting_host_id: meeting_host_id,
|
48
|
+
external_meeting_id: ChimeSdk.config.prefix + meeting_request_id,
|
49
|
+
notifications_configuration: notifications_configuration,
|
50
|
+
meeting_features: meeting_features,
|
51
|
+
primary_meeting_id: primary_meeting_id,
|
52
|
+
tenant_ids: tenant_ids,
|
53
|
+
tags: tags
|
64
54
|
})
|
65
55
|
meeting_as_json(resp.meeting)
|
66
56
|
end
|
67
57
|
|
68
|
-
# Wrapper of Aws::
|
58
|
+
# Wrapper of Aws::ChimeSDKMeetings::Client#get_meeting method.
|
69
59
|
# @param [required, String] meeting_id The Amazon Chime SDK meeting ID
|
70
60
|
# @return [Hash] Meeting JSON object as hash
|
71
|
-
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/
|
61
|
+
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ChimeSDKMeetings/Client.html#get_meeting-instance_method Aws::ChimeSDKMeetings::Client#get_meeting of AWS SDK for Ruby
|
72
62
|
def self.get_meeting(meeting_id)
|
73
63
|
resp = client.get_meeting({
|
74
64
|
meeting_id: meeting_id
|
@@ -76,51 +66,60 @@ module ChimeSdk
|
|
76
66
|
meeting_as_json(resp.meeting)
|
77
67
|
end
|
78
68
|
|
79
|
-
# Wrapper of Aws::
|
69
|
+
# Wrapper of Aws::ChimeSDKMeetings::Client#delete_meeting method.
|
80
70
|
# @param [required, String] meeting_id The Amazon Chime SDK meeting ID
|
81
71
|
# @return [void]
|
82
|
-
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/
|
72
|
+
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ChimeSDKMeetings/Client.html#delete_meeting-instance_method Aws::ChimeSDKMeetings::Client#delete_meeting of AWS SDK for Ruby
|
83
73
|
def self.delete_meeting(meeting_id)
|
84
74
|
client.delete_meeting({
|
85
75
|
meeting_id: meeting_id
|
86
76
|
})
|
87
77
|
end
|
88
78
|
|
89
|
-
# Wrapper of Aws::
|
79
|
+
# Wrapper of Aws::ChimeSDKMeetings::Client#list_attendees method.
|
90
80
|
# @param [required, String] meeting_id The Amazon Chime SDK meeting ID
|
91
81
|
# @param [Integer] max_results (ChimeSdk.config.max_attendee_results) The maximum number of results to return in a single call
|
92
82
|
# @return [Array<Hash>] Array of attendee JSON object as hash
|
93
|
-
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/
|
83
|
+
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ChimeSDKMeetings/Client.html#list_attendees-instance_method Aws::ChimeSDKMeetings::Client#list_attendees of AWS SDK for Ruby
|
94
84
|
def self.list_attendees(meeting_id,
|
95
85
|
max_results: ChimeSdk.config.max_attendee_results
|
96
86
|
)
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
87
|
+
# attendees = [], next_token = nil
|
88
|
+
# loop do
|
89
|
+
resp = client.list_attendees({
|
90
|
+
meeting_id: meeting_id,
|
91
|
+
# next_token: next_token,
|
92
|
+
max_results: max_results
|
93
|
+
})
|
94
|
+
# next_token = resp.next_token
|
95
|
+
# attendees += resp.attendees
|
96
|
+
# break if next_token.nil?
|
97
|
+
# end
|
98
|
+
# attendees.map { |attendee| attendee_as_json(attendee) }
|
101
99
|
resp.attendees.map { |attendee| attendee_as_json(attendee) }
|
102
100
|
end
|
103
101
|
|
104
|
-
# Wrapper of Aws::
|
102
|
+
# Wrapper of Aws::ChimeSDKMeetings::Client#create_attendee method.
|
105
103
|
# This method uses 'ChimeSdk.config.prefix + attendee_request_id' for external_user_id.
|
106
104
|
# @param [required, String] meeting_id The Amazon Chime SDK meeting ID
|
107
105
|
# @param [required, String] attendee_request_id Part of the Amazon Chime SDK external user ID. Links the attendee to an identity managed by a builder application.
|
106
|
+
# @param [Aws::ChimeSDKMeetings::Types::AttendeeCapabilities] capabilities The capabilities (audio, video, or content) that you want to grant an attendee
|
108
107
|
# @return [Hash] Created attendee JSON object as hash
|
109
|
-
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/
|
110
|
-
def self.create_attendee(meeting_id, attendee_request_id,
|
108
|
+
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ChimeSDKMeetings/Client.html#create_attendee-instance_method Aws::ChimeSDKMeetings::Client#create_attendee of AWS SDK for Ruby
|
109
|
+
def self.create_attendee(meeting_id, attendee_request_id, capabilities: nil)
|
111
110
|
resp = client.create_attendee({
|
112
111
|
meeting_id: meeting_id,
|
113
112
|
external_user_id: ChimeSdk.config.prefix + attendee_request_id,
|
114
|
-
|
113
|
+
capabilities: capabilities
|
115
114
|
})
|
116
115
|
attendee_as_json(resp.attendee)
|
117
116
|
end
|
118
117
|
|
119
|
-
# Wrapper of Aws::
|
118
|
+
# Wrapper of Aws::ChimeSDKMeetings::Client#get_attendee method.
|
120
119
|
# @param [required, String] meeting_id The Amazon Chime SDK meeting ID
|
121
120
|
# @param [required, String] attendee_id The Amazon Chime SDK attendee ID
|
122
121
|
# @return [Hash] Attendee JSON object as hash
|
123
|
-
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/
|
122
|
+
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ChimeSDKMeetings/Client.html#get_attendee-instance_method Aws::ChimeSDKMeetings::Client#get_attendee of AWS SDK for Ruby
|
124
123
|
def self.get_attendee(meeting_id, attendee_id)
|
125
124
|
resp = client.get_attendee({
|
126
125
|
meeting_id: meeting_id,
|
@@ -129,10 +128,11 @@ module ChimeSdk
|
|
129
128
|
attendee_as_json(resp.attendee)
|
130
129
|
end
|
131
130
|
|
132
|
-
# Wrapper of Aws::
|
131
|
+
# Wrapper of Aws::ChimeSDKMeetings::Client#delete_attendee method.
|
132
|
+
# @param [required, String] meeting_id The Amazon Chime SDK meeting ID
|
133
133
|
# @param [required, String] attendee_id The Amazon Chime SDK attendee ID
|
134
134
|
# @return [void]
|
135
|
-
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/
|
135
|
+
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ChimeSDKMeetings/Client.html#delete_attendee-instance_method Aws::ChimeSDKMeetings::Client#delete_attendee of AWS SDK for Ruby
|
136
136
|
def self.delete_attendee(meeting_id, attendee_id)
|
137
137
|
client.delete_attendee({
|
138
138
|
meeting_id: meeting_id,
|
@@ -140,45 +140,79 @@ module ChimeSdk
|
|
140
140
|
})
|
141
141
|
end
|
142
142
|
|
143
|
-
# Build meeting JSON object as hash from Aws::
|
144
|
-
# @param [required, Aws::
|
143
|
+
# Build meeting JSON object as hash from Aws::ChimeSDKMeetings::Types::Meeting object
|
144
|
+
# @param [required, Aws::ChimeSDKMeetings::Types::Meeting] meeting Meeting response as Aws::ChimeSDKMeetings::Types::Meeting object
|
145
145
|
# @return [Hash] Meeting JSON object as hash
|
146
|
-
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/
|
147
|
-
# @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/
|
146
|
+
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ChimeSDKMeetings/Client.html#get_meeting-instance_method Aws::ChimeSDKMeetings::Client#get_meeting of AWS SDK for Ruby
|
147
|
+
# @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ChimeSDKMeetings.html#getMeeting-property AWS.Chime#getMeeting of AWS SDK for JavaScript
|
148
148
|
def self.meeting_as_json(meeting)
|
149
|
-
return {} unless meeting.is_a?(Aws::
|
150
|
-
{
|
149
|
+
return {} unless meeting.is_a?(Aws::ChimeSDKMeetings::Types::Meeting)
|
150
|
+
meeting_json = {
|
151
151
|
"Meeting": {
|
152
152
|
"MeetingId": meeting.meeting_id,
|
153
|
+
"MeetingHostId": meeting.meeting_host_id,
|
153
154
|
"ExternalMeetingId": meeting.external_meeting_id,
|
155
|
+
"MediaRegion": meeting.media_region,
|
154
156
|
"MediaPlacement": {
|
155
157
|
"AudioHostUrl": meeting.media_placement.audio_host_url,
|
156
158
|
"AudioFallbackUrl": meeting.media_placement.audio_fallback_url,
|
159
|
+
"SignalingUrl": meeting.media_placement.signaling_url,
|
160
|
+
"TurnControlUrl": meeting.media_placement.turn_control_url,
|
161
|
+
# This parameter is deprecated and no longer used by the Amazon Chime SDK
|
157
162
|
"ScreenDataUrl": meeting.media_placement.screen_data_url,
|
158
|
-
|
163
|
+
# This parameter is deprecated and no longer used by the Amazon Chime SDK
|
159
164
|
"ScreenViewingUrl": meeting.media_placement.screen_viewing_url,
|
160
|
-
|
161
|
-
"
|
165
|
+
# This parameter is deprecated and no longer used by the Amazon Chime SDK
|
166
|
+
"ScreenSharingUrl": meeting.media_placement.screen_sharing_url,
|
167
|
+
# This parameter is deprecated and no longer used by the Amazon Chime SDK
|
168
|
+
"EventIngestionUrl": meeting.media_placement.event_ingestion_url
|
162
169
|
},
|
163
|
-
"
|
170
|
+
"PrimaryMeetingId": meeting.primary_meeting_id,
|
171
|
+
"TenantIds": meeting.tenant_ids,
|
172
|
+
"MeetingArn": meeting.meeting_arn
|
164
173
|
}
|
165
174
|
}
|
175
|
+
unless meeting.meeting_features.nil?
|
176
|
+
meeting_json[:Meeting]["MeetingFeatures"] = {
|
177
|
+
"Audio": {
|
178
|
+
"EchoReduction": meeting.meeting_features.audio.echo_reduction
|
179
|
+
},
|
180
|
+
"Video": {
|
181
|
+
"MaxResolution": meeting.meeting_features.video.max_resolution
|
182
|
+
},
|
183
|
+
"Content": {
|
184
|
+
"MaxResolution": meeting.meeting_features.content.max_resolution
|
185
|
+
},
|
186
|
+
"Attendee": {
|
187
|
+
"MaxCount": meeting.meeting_features.attendee.max_count
|
188
|
+
}
|
189
|
+
}
|
190
|
+
end
|
191
|
+
meeting_json
|
166
192
|
end
|
167
193
|
|
168
|
-
# Build attendee JSON object as hash from Aws::
|
169
|
-
# @param [required, Aws::
|
194
|
+
# Build attendee JSON object as hash from Aws::ChimeSDKMeetings::Types::Attendee object
|
195
|
+
# @param [required, Aws::ChimeSDKMeetings::Types::Attendee] attendee Attendee response as Aws::ChimeSDKMeetings::Types::Attendee object
|
170
196
|
# @return [Hash] Attendee JSON object as hash
|
171
|
-
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/
|
172
|
-
# @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/
|
197
|
+
# @see https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/ChimeSDKMeetings/Client.html#get_attendee-instance_method Aws::ChimeSDKMeetings::Client#get_attendee of AWS SDK for Ruby
|
198
|
+
# @see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ChimeSDKMeetings.html#getAttendee-property AWS.Chime#getAttendee of AWS SDK for JavaScript
|
173
199
|
def self.attendee_as_json(attendee)
|
174
|
-
return {} unless attendee.is_a?(Aws::
|
175
|
-
{
|
200
|
+
return {} unless attendee.is_a?(Aws::ChimeSDKMeetings::Types::Attendee)
|
201
|
+
attendee_json = {
|
176
202
|
"Attendee": {
|
177
203
|
"ExternalUserId": attendee.external_user_id,
|
178
204
|
"AttendeeId": attendee.attendee_id,
|
179
205
|
"JoinToken": attendee.join_token
|
180
206
|
}
|
181
207
|
}
|
208
|
+
unless attendee.capabilities.nil?
|
209
|
+
attendee_json[:Attendee]["Capabilities"] = {
|
210
|
+
"Audio": attendee.capabilities.audio,
|
211
|
+
"Video": attendee.capabilities.video,
|
212
|
+
"Content": attendee.capabilities.content
|
213
|
+
}
|
214
|
+
end
|
215
|
+
attendee_json
|
182
216
|
end
|
183
217
|
end
|
184
218
|
end
|
data/lib/chime_sdk/version.rb
CHANGED
@@ -11,9 +11,6 @@ ChimeSdk.configure do |config|
|
|
11
11
|
# Default value is "#{config.application_name}-#{Rails.env}-".
|
12
12
|
config.prefix = "#{config.application_name}-#{Rails.env}-"
|
13
13
|
|
14
|
-
# Configure default max_results value used in list_meetings API.
|
15
|
-
config.max_meeting_results = 10
|
16
|
-
|
17
14
|
# Configure default max_results value used in list_attendees API.
|
18
15
|
config.max_attendee_results = 10
|
19
16
|
|
@@ -2,26 +2,9 @@
|
|
2
2
|
|
3
3
|
<h1>Meetings by Amazon Chime SDK</h1>
|
4
4
|
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<th>External Meeting ID</th>
|
10
|
-
<th>Media Region</th>
|
11
|
-
<th colspan="1"></th>
|
12
|
-
</tr>
|
13
|
-
</thead>
|
14
|
-
|
15
|
-
<tbody>
|
16
|
-
<% @meetings.each do |meeting| %>
|
17
|
-
<tr>
|
18
|
-
<td><%= link_to(meeting[:Meeting][:MeetingId], meeting_resource_path(meeting[:Meeting][:MeetingId])) %></td>
|
19
|
-
<td><%= meeting[:Meeting][:ExternalMeetingId] %></td>
|
20
|
-
<td><%= meeting[:Meeting][:MediaRegion] %></td>
|
21
|
-
<td><%= link_to 'Destroy', meeting_resource_path(meeting[:Meeting][:MeetingId]), method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
22
|
-
</tr>
|
23
|
-
<% end %>
|
24
|
-
</tbody>
|
25
|
-
</table>
|
5
|
+
<p>
|
6
|
+
Meeting Request ID : <%= @meeting_request_id %><br>
|
7
|
+
Attendee Request ID : <%= @attendee_request_id %><br>
|
8
|
+
</p>
|
26
9
|
|
27
10
|
<p><%= link_to 'Create Meeting', meeting_resources_path, method: :post %></p>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<h1>Meeting by Amazon Chime SDK</h1>
|
4
4
|
|
5
|
-
<p><%= link_to("
|
5
|
+
<p><%= link_to("Back to Meetings Index", meeting_resources_path) %></p>
|
6
6
|
|
7
7
|
<% if @meeting %>
|
8
8
|
<strong>Meeting</strong>
|
@@ -71,8 +71,8 @@
|
|
71
71
|
try {
|
72
72
|
const audioInputDevices = await meetingSession.audioVideo.listAudioInputDevices();
|
73
73
|
const audioOutputDevices = await meetingSession.audioVideo.listAudioOutputDevices();
|
74
|
-
await meetingSession.audioVideo.
|
75
|
-
await meetingSession.audioVideo.
|
74
|
+
await meetingSession.audioVideo.startAudioInput(audioInputDevices[0].deviceId);
|
75
|
+
await meetingSession.audioVideo.chooseAudioOutput(audioOutputDevices[0].deviceId);
|
76
76
|
} catch (error) {
|
77
77
|
// handle error - unable to acquire audio device perhaps due to permissions blocking
|
78
78
|
console.log(error);
|
@@ -2,27 +2,10 @@
|
|
2
2
|
|
3
3
|
<h1>Meetings by Amazon Chime SDK</h1>
|
4
4
|
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<th>External Meeting ID</th>
|
10
|
-
<th>Media Region</th>
|
11
|
-
<th colspan="1"></th>
|
12
|
-
</tr>
|
13
|
-
</thead>
|
14
|
-
|
15
|
-
<tbody>
|
16
|
-
<% @meetings.each do |meeting| %>
|
17
|
-
<tr>
|
18
|
-
<td><%= link_to(meeting[:Meeting][:MeetingId], meeting_resource_path(meeting[:Meeting][:MeetingId])) %></td>
|
19
|
-
<td><%= meeting[:Meeting][:ExternalMeetingId] %></td>
|
20
|
-
<td><%= meeting[:Meeting][:MediaRegion] %></td>
|
21
|
-
<td><%= link_to 'Destroy', meeting_resource_path(meeting[:Meeting][:MeetingId]), method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
22
|
-
</tr>
|
23
|
-
<% end %>
|
24
|
-
</tbody>
|
25
|
-
</table>
|
5
|
+
<p>
|
6
|
+
Meeting Request ID : <%= @meeting_request_id %><br>
|
7
|
+
Attendee Request ID : <%= @attendee_request_id %><br>
|
8
|
+
</p>
|
26
9
|
|
27
10
|
<p><%= link_to 'Create Meeting', meeting_resources_path, method: :post %></p>
|
28
11
|
<p><%= link_to("Back to Room", room_path(@room)) %></p>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<h1>Meeting by Amazon Chime SDK</h1>
|
4
4
|
|
5
|
-
<p><%= link_to("
|
5
|
+
<p><%= link_to("Back to Meetings Index", meeting_resources_path) %></p>
|
6
6
|
|
7
7
|
<% if ENV['REACT_MEETING_DEMO_URL'] %>
|
8
8
|
<p><input type="button" value="Open React Meeting Demo" onclick="openReactMeetingDemo()"></p>
|
@@ -83,21 +83,13 @@
|
|
83
83
|
try {
|
84
84
|
const audioInputDevices = await meetingSession.audioVideo.listAudioInputDevices();
|
85
85
|
const audioOutputDevices = await meetingSession.audioVideo.listAudioOutputDevices();
|
86
|
-
await meetingSession.audioVideo.
|
87
|
-
await meetingSession.audioVideo.
|
86
|
+
await meetingSession.audioVideo.startAudioInput(audioInputDevices[0].deviceId);
|
87
|
+
await meetingSession.audioVideo.chooseAudioOutput(audioOutputDevices[0].deviceId);
|
88
88
|
} catch (error) {
|
89
89
|
// handle error - unable to acquire audio device perhaps due to permissions blocking
|
90
|
-
|
91
|
-
console.error('Permission denied', error);
|
92
|
-
} else {
|
93
|
-
console.error(error);
|
94
|
-
}
|
95
|
-
}
|
96
|
-
try {
|
97
|
-
await meetingSession.audioVideo.bindAudioElement(audioOutputElement);
|
98
|
-
} catch (error) {
|
99
|
-
console.error('Failed to bind audio element', error);
|
90
|
+
console.log(error);
|
100
91
|
}
|
92
|
+
meetingSession.audioVideo.bindAudioElement(audioOutputElement);
|
101
93
|
meetingSession.audioVideo.start();
|
102
94
|
document.getElementById("meeting-status").innerHTML = '<p>Meeting : Online <input type="button" value="Leave a meeting" onclick="leave()"></p><div id="audio-status"></div>';
|
103
95
|
document.getElementById("audio-status").innerHTML = '<p>Audio : Active <input type="button" value="Mute" onclick="mute()"></p>';
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
<p>
|
9
9
|
<strong>Private Meeting:</strong>
|
10
|
-
<p><%= link_to 'Show Meetings', room_meetings_path(@room) %></p>
|
10
|
+
<p><%= link_to 'Show Meetings Index', room_meetings_path(@room) %></p>
|
11
11
|
<p>
|
12
12
|
Create Meeting
|
13
13
|
<%= link_to 'GET', room_meetings_path(@room, create_meeting: true) %>
|
@@ -11,9 +11,6 @@ ChimeSdk.configure do |config|
|
|
11
11
|
# Default value is "#{config.application_name}-#{Rails.env}-".
|
12
12
|
config.prefix = "#{config.application_name}-#{Rails.env}-"
|
13
13
|
|
14
|
-
# Configure default max_results value used in list_meetings API.
|
15
|
-
config.max_meeting_results = 10
|
16
|
-
|
17
14
|
# Configure default max_results value used in list_attendees API.
|
18
15
|
config.max_attendee_results = 10
|
19
16
|
|
@@ -11,16 +11,26 @@ describe ChimeSdk::Controller::Attendees, type: :request do
|
|
11
11
|
test_attendee = {
|
12
12
|
external_user_id: "ChimeSdkRailsApp-test-User-#{@attendee_user.id}",
|
13
13
|
attendee_id: @attendee_id,
|
14
|
-
join_token: "dummy"
|
14
|
+
join_token: "dummy",
|
15
|
+
capabilities: {
|
16
|
+
audio: "SendReceive",
|
17
|
+
video: "SendReceive",
|
18
|
+
content: "SendReceive"
|
19
|
+
}
|
15
20
|
}
|
16
21
|
dummy_attendee = {
|
17
22
|
external_user_id: "ChimeSdkRailsApp-test-User-0",
|
18
23
|
attendee_id: @dummy_attendee_id,
|
19
|
-
join_token: "dummy"
|
24
|
+
join_token: "dummy",
|
25
|
+
capabilities: {
|
26
|
+
audio: "SendReceive",
|
27
|
+
video: "SendReceive",
|
28
|
+
content: "SendReceive"
|
29
|
+
}
|
20
30
|
}
|
21
31
|
|
22
32
|
# Use stubs for the AWS SDK for Ruby
|
23
|
-
client = Aws::
|
33
|
+
client = Aws::ChimeSDKMeetings::Client.new(stub_responses: true)
|
24
34
|
client.stub_responses(:list_attendees, {
|
25
35
|
attendees: [ test_attendee, dummy_attendee ]
|
26
36
|
})
|
@@ -8,30 +8,51 @@ describe ChimeSdk::Controller::Meetings, type: :request do
|
|
8
8
|
dummy_media_placement = {
|
9
9
|
audio_host_url: "dummy",
|
10
10
|
audio_fallback_url: "dummy",
|
11
|
+
signaling_url: "dummy",
|
12
|
+
turn_control_url: "dummy",
|
11
13
|
screen_data_url: "dummy",
|
12
|
-
screen_sharing_url: "dummy",
|
13
14
|
screen_viewing_url: "dummy",
|
14
|
-
|
15
|
-
|
15
|
+
screen_sharing_url: "dummy",
|
16
|
+
event_ingestion_url: "dummy"
|
17
|
+
}
|
18
|
+
meeting_features = {
|
19
|
+
audio: {
|
20
|
+
echo_reduction: "AVAILABLE"
|
21
|
+
},
|
22
|
+
video: {
|
23
|
+
max_resolution: "HD"
|
24
|
+
},
|
25
|
+
content: {
|
26
|
+
max_resolution: "FHD"
|
27
|
+
},
|
28
|
+
attendee: {
|
29
|
+
max_count: 100
|
30
|
+
}
|
16
31
|
}
|
17
32
|
test_meeting = {
|
18
33
|
meeting_id: @meeting_id,
|
34
|
+
meeting_host_id: nil,
|
19
35
|
external_meeting_id: "ChimeSdkRailsApp-test-PrivateRoom-#{@room.id}",
|
36
|
+
media_region: "us-east-1",
|
20
37
|
media_placement: dummy_media_placement,
|
21
|
-
|
38
|
+
meeting_features: meeting_features,
|
39
|
+
primary_meeting_id: nil,
|
40
|
+
tenant_ids: [],
|
41
|
+
meeting_arn: "arn:aws:chime:us-east-1:000000000000:meeting/#{@meeting_id}"
|
22
42
|
}
|
23
43
|
dummy_meeting = {
|
24
44
|
meeting_id: @dummy_meeting_id,
|
25
45
|
external_meeting_id: "ChimeSdkRailsApp-test-PrivateRoom-0",
|
46
|
+
media_region: "us-east-1",
|
26
47
|
media_placement: dummy_media_placement,
|
27
|
-
|
48
|
+
meeting_features: meeting_features,
|
49
|
+
primary_meeting_id: nil,
|
50
|
+
tenant_ids: [],
|
51
|
+
meeting_arn: "arn:aws:chime:us-east-1:000000000000:meeting/#{@meeting_id}"
|
28
52
|
}
|
29
53
|
|
30
54
|
# Use stubs for the AWS SDK for Ruby
|
31
|
-
client = Aws::
|
32
|
-
client.stub_responses(:list_meetings, {
|
33
|
-
meetings: [ test_meeting, dummy_meeting ]
|
34
|
-
})
|
55
|
+
client = Aws::ChimeSDKMeetings::Client.new(stub_responses: true)
|
35
56
|
client.stub_responses(:get_meeting, -> (context) {
|
36
57
|
context.params[:meeting_id] == @meeting_id ? { meeting: test_meeting } : 'NotFoundException'
|
37
58
|
})
|
@@ -101,12 +122,12 @@ describe ChimeSdk::Controller::Meetings, type: :request do
|
|
101
122
|
expect(response).to have_http_status(200)
|
102
123
|
end
|
103
124
|
|
104
|
-
it "returns
|
105
|
-
expect(JSON.parse(response.body)["
|
125
|
+
it "returns meeting_request_id" do
|
126
|
+
expect(JSON.parse(response.body)["meeting_request_id"]).not_to be_nil
|
106
127
|
end
|
107
128
|
|
108
|
-
it "returns
|
109
|
-
expect(JSON.parse(response.body)["
|
129
|
+
it "returns attendee_request_id" do
|
130
|
+
expect(JSON.parse(response.body)["attendee_request_id"]).not_to be_nil
|
110
131
|
end
|
111
132
|
end
|
112
133
|
|
@@ -287,10 +308,6 @@ describe ChimeSdk::Controller::Meetings, type: :request do
|
|
287
308
|
expect(response).to have_http_status(200)
|
288
309
|
expect(response.body).to include("Meetings by Amazon Chime SDK")
|
289
310
|
end
|
290
|
-
|
291
|
-
it "returns valid meeting in the list" do
|
292
|
-
expect(response.body).to include(@meeting_id)
|
293
|
-
end
|
294
311
|
end
|
295
312
|
|
296
313
|
context "with true as create_meeting parameter" do
|
@@ -10,7 +10,8 @@ Parameters:
|
|
10
10
|
Description: The name of the service.
|
11
11
|
|
12
12
|
Resources:
|
13
|
-
# https://docs.aws.amazon.com/chime-sdk/latest/
|
13
|
+
# https://docs.aws.amazon.com/chime-sdk/latest/ag/security_iam_id-based-policy-examples-chime-sdk.html
|
14
|
+
# https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_Operations_Amazon_Chime_SDK_Meetings.html
|
14
15
|
AmazonChimeSdkPolicy:
|
15
16
|
Type: AWS::IAM::ManagedPolicy
|
16
17
|
Properties:
|
@@ -21,26 +22,21 @@ Resources:
|
|
21
22
|
Effect: Allow
|
22
23
|
Action:
|
23
24
|
- chime:CreateMeeting
|
24
|
-
- chime:CreateMeetingWithAttendees
|
25
|
-
- chime:DeleteMeeting
|
25
|
+
# - chime:CreateMeetingWithAttendees
|
26
26
|
- chime:GetMeeting
|
27
|
-
- chime:
|
27
|
+
- chime:DeleteMeeting
|
28
28
|
- chime:CreateAttendee
|
29
|
-
- chime:BatchCreateAttendee
|
30
|
-
- chime:DeleteAttendee
|
31
|
-
- chime:GetAttendee
|
32
29
|
- chime:ListAttendees
|
33
|
-
- chime:
|
34
|
-
- chime:
|
30
|
+
- chime:GetAttendee
|
31
|
+
- chime:DeleteAttendee
|
32
|
+
# - chime:BatchCreateAttendee
|
33
|
+
# - chime:BatchUpdateAttendeeCapabilitiesExcept
|
34
|
+
# - chime:UpdateAttendeeCapabilities
|
35
35
|
- chime:ListTagsForResource
|
36
|
-
- chime:TagAttendee
|
37
|
-
- chime:TagMeeting
|
38
36
|
- chime:TagResource
|
39
|
-
- chime:UntagAttendee
|
40
|
-
- chime:UntagMeeting
|
41
37
|
- chime:UntagResource
|
42
|
-
- chime:StartMeetingTranscription
|
43
|
-
- chime:StopMeetingTranscription
|
38
|
+
# - chime:StartMeetingTranscription
|
39
|
+
# - chime:StopMeetingTranscription
|
44
40
|
Resource: "*"
|
45
41
|
|
46
42
|
Outputs:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amazon-chime-sdk-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shota Yamazaki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 5.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: aws-sdk-
|
28
|
+
name: aws-sdk-chimesdkmeetings
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -128,6 +128,7 @@ files:
|
|
128
128
|
- README.md
|
129
129
|
- Rakefile
|
130
130
|
- amazon-chime-sdk-rails.gemspec
|
131
|
+
- config/spring.rb
|
131
132
|
- docs/Develop_Rails_API_Application.md
|
132
133
|
- docs/Develop_Rails_View_Application.md
|
133
134
|
- gemfiles/Gemfile.rails-5.0
|
@@ -136,6 +137,7 @@ files:
|
|
136
137
|
- gemfiles/Gemfile.rails-6.0
|
137
138
|
- gemfiles/Gemfile.rails-6.1
|
138
139
|
- gemfiles/Gemfile.rails-7.0
|
140
|
+
- gemfiles/Gemfile.rails-7.1
|
139
141
|
- lib/amazon-chime-sdk-rails.rb
|
140
142
|
- lib/chime_sdk/config.rb
|
141
143
|
- lib/chime_sdk/controller/attendees.rb
|
@@ -264,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
264
266
|
- !ruby/object:Gem::Version
|
265
267
|
version: '0'
|
266
268
|
requirements: []
|
267
|
-
rubygems_version: 3.
|
269
|
+
rubygems_version: 3.4.6
|
268
270
|
signing_key:
|
269
271
|
specification_version: 4
|
270
272
|
summary: Server-side implementation of Amazon Chime SDK for Ruby on Rails application
|