spec/rails_app/app/views/meetings/show.html.erb in amazon-chime-sdk-rails-1.1.1 vs spec/rails_app/app/views/meetings/show.html.erb in amazon-chime-sdk-rails-2.0.0

- old
+ new

@@ -1,10 +1,10 @@ <p id="notice"><%= notice %></p> <h1>Meeting by Amazon Chime SDK</h1> -<p><%= link_to("Show Meetings", meeting_resources_path) %></p> +<p><%= link_to("Back to Meetings Index", meeting_resources_path) %></p> <% if ENV['REACT_MEETING_DEMO_URL'] %> <p><input type="button" value="Open React Meeting Demo" onclick="openReactMeetingDemo()"></p> <% end %> <div id="react_meeting_demo_url" url="<%= ENV['REACT_MEETING_DEMO_URL'] %>"></div> @@ -81,24 +81,16 @@ async function join() { try { const audioInputDevices = await meetingSession.audioVideo.listAudioInputDevices(); const audioOutputDevices = await meetingSession.audioVideo.listAudioOutputDevices(); - await meetingSession.audioVideo.chooseAudioInputDevice(audioInputDevices[0].deviceId); - await meetingSession.audioVideo.chooseAudioOutputDevice(audioOutputDevices[0].deviceId); + await meetingSession.audioVideo.startAudioInput(audioInputDevices[0].deviceId); + await meetingSession.audioVideo.chooseAudioOutput(audioOutputDevices[0].deviceId); } catch (error) { // handle error - unable to acquire audio device perhaps due to permissions blocking - if (error instanceof PermissionDeniedError) { - console.error('Permission denied', error); - } else { - console.error(error); - } + console.log(error); } - try { - await meetingSession.audioVideo.bindAudioElement(audioOutputElement); - } catch (error) { - console.error('Failed to bind audio element', error); - } + meetingSession.audioVideo.bindAudioElement(audioOutputElement); meetingSession.audioVideo.start(); document.getElementById("meeting-status").innerHTML = '<p>Meeting : Online <input type="button" value="Leave a meeting" onclick="leave()"></p><div id="audio-status"></div>'; document.getElementById("audio-status").innerHTML = '<p>Audio : Active <input type="button" value="Mute" onclick="mute()"></p>'; document.getElementById("attendee-status").innerHTML = '<strong>Present Attendees</strong>'; parepareAttendeeStatus(); \ No newline at end of file