Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新V4.9.1代码 #251

Merged
merged 21 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions SampleCode/Android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId "com.netease.yunxin.kit.meeting.sampleapp"
minSdkVersion 21
targetSdkVersion 34
versionCode 40700
versionName "4.7.0"
versionCode 40900
versionName "4.9.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -50,22 +50,21 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar","*.aar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.permissionx.guolindev:permissionx:1.2.2'
implementation 'com.guolindev.permissionx:permissionx:1.6.0'
implementation 'androidx.preference:preference:1.1.1'
implementation "androidx.activity:activity:1.2.0-beta02"
implementation "androidx.fragment:fragment:1.3.0-beta02"
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
implementation 'com.google.android:flexbox:2.0.1'
implementation 'com.google.android.flexbox:flexbox:3.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

implementation 'com.kyleduo.switchbutton:library:2.0.2'
implementation 'com.kyleduo.switchbutton:library:2.1.0'
implementation "androidx.navigation:navigation-fragment-ktx:2.3.0"
implementation "androidx.navigation:navigation-ui-ktx:2.3.0"
implementation 'com.manu:MDatePicker:1.0.1'

implementation("com.netease.yunxin.kit.meeting:meeting:4.7.0")
implementation("com.netease.yunxin.kit.meeting:meeting:4.9.1")

compileOnly 'com.netease.yunxin:nertc-full:5.5.40'
compileOnly 'com.netease.nimlib:basesdk:9.16.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,24 +371,36 @@ private static String[] getMenuItemTitle(NEMeetingMenuItem item) {
return new String[] {"管理参会者"};
case NEMenuIDs.SWITCH_SHOW_TYPE_MENU_ID:
return new String[] {"视图布局"};
case NEMenuIDs.NOTIFY_CENTER_MENU_ID:
return new String[] {"通知"};
case NEMenuIDs.INVITE_MENU_ID:
return new String[] {"邀请"};
case NEMenuIDs.SECURITY_MENU_ID:
return new String[] {"安全"};
case NEMenuIDs.CHAT_MENU_ID:
return new String[] {"聊天"};
case NEMenuIDs.NOTIFY_CENTER_MENU_ID:
return new String[] {"通知"};
case NEMenuIDs.SIP_CALL_MENU_ID:
return new String[] {"呼叫"};
case NEMenuIDs.SETTINGS_MENU_ID:
return new String[] {"设置"};
case NEMenuIDs.WHITEBOARD_MENU_ID:
return new String[] {"共享白板", "退出白板"};
case NEMenuIDs.CLOUD_RECORD_MENU_ID:
return new String[] {"云录制", "结束录制"};
case NEMenuIDs.SECURITY_MENU_ID:
return new String[] {"安全"};
case NEMenuIDs.DISCONNECT_AUDIO_MENU_ID:
return new String[] {"断开音频", "连接音频"};
case NEMenuIDs.SETTINGS_MENU_ID:
return new String[] {"设置"};
case NEMenuIDs.SIP_CALL_MENU_ID:
return new String[] {"呼叫"};
case NEMenuIDs.CAPTIONS_MENU_ID:
return new String[] {"字幕"};
case NEMenuIDs.TRANSCRIPTION_MENU_ID:
return new String[] {"实时转写"};
case NEMenuIDs.INTERPRETATION_MENU_ID:
return new String[] {"同声传译"};
case NEMenuIDs.BEAUTY_MENU_ID:
return new String[] {"美颜"};
case NEMenuIDs.VIRTUAL_BACKGROUND_MENU_ID:
return new String[] {"虚拟背景"};
case NEMenuIDs.LIVE_MENU_ID:
return new String[] {"直播"};
case NEMenuIDs.FEEDBACK_MENU_ID:
return new String[] {"问题反馈"};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
package com.netease.yunxin.kit.meeting.sampleapp.utils;

import android.app.DatePickerDialog;
import android.app.TimePickerDialog;
import android.content.Context;
import android.view.Gravity;
import android.widget.DatePicker;
import com.manu.mdatepicker.MDatePickerDialog;

import java.util.Calendar;
import java.util.Date;

public class CalendarUtil {
private static MDatePickerDialog dialog;
private static DatePickerDialog dialog;

public static DatePickerDialog showDatePickerDialog(
Context context, int mYear, int mMonth, int mDay, OnDateSetListener onDateSetListener) {
Expand All @@ -30,19 +32,48 @@ public static DatePickerDialog showDatePickerDialog(
return datePickerDialog;
}

public static void showDatePickerDialog(
Context context, MDatePickerDialog.OnDateResultListener onDateResultListener) {
dialog =
new MDatePickerDialog.Builder(context)
//附加设置(非必须,有默认值)
.setCanceledTouchOutside(true)
.setGravity(Gravity.BOTTOM)
.setSupportTime(true)
.setTwelveHour(false)
//结果回调(必须)
.setOnDateResultListener(onDateResultListener)
.build();
dialog.show();
public interface OnDateResultCallback {
void onDateResult(long date);
}

public static void showDateTimePickerDialog(Context context, long time, OnDateResultCallback listener) {
Calendar calendar = Calendar.getInstance();
if (time != 0) {
calendar.setTime(new Date(time));
}
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH);
int day = calendar.get(Calendar.DAY_OF_MONTH);

dialog =
new DatePickerDialog(
context,
(view, selectedYear, monthOfYear, dayOfMonth) -> {
calendar.set(Calendar.YEAR, selectedYear);
calendar.set(Calendar.MONTH, monthOfYear);
calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);

int hour = calendar.get(Calendar.HOUR_OF_DAY);
int minute = calendar.get(Calendar.MINUTE);

TimePickerDialog timePickerDialog =
new TimePickerDialog(
context,
(view1, hourOfDay, minute1) -> {
calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
calendar.set(Calendar.MINUTE, minute1);
listener.onDateResult(calendar.getTime().getTime());
},
hour,
minute,
true);

timePickerDialog.show();
},
year,
month,
day);
dialog.show();
}

public static void closeOptionsMenu() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ void initView() {
binding.etPassword.setHint("请输入密码");
binding.etPersonalTag.setHint("个人TAG");
binding.etEncryption.setHint("媒体流加密密钥");
binding.etPluginNotifyDuration.setHint("小应用通知弹窗时间,单位ms,为0不显示通知弹窗;value<0则弹窗不自动消失");
binding.etNickname.setSingleLine();
binding.etPassword.setSingleLine();
binding.etPersonalTag.setSingleLine();
Expand Down Expand Up @@ -166,6 +167,7 @@ public NEMeetingOptions getMeetingOptions(NEMeetingOptions options) {
options.noVideo = !settingsService.isTurnOnMyVideoWhenJoinMeetingEnabled();
options.noAudio = !settingsService.isTurnOnMyAudioWhenJoinMeetingEnabled();
options.showMeetingTime = settingsService.isShowMyMeetingElapseTimeEnabled();
options.showNotYetJoinedMembers = settingsService.isShowNotYetJoinedMembersEnabled();
options.enableSpeakerSpotlight = settingsService.isSpeakerSpotlightEnabled();
options.enableFrontCameraMirror = settingsService.isFrontCameraMirrorEnabled();
options.enableTransparentWhiteboard = settingsService.isTransparentWhiteboardEnabled();
Expand Down Expand Up @@ -196,6 +198,10 @@ public NEMeetingOptions getMeetingOptions(NEMeetingOptions options) {
options.noLive = binding.noLive.isChecked();
options.showMemberTag = binding.showMemberTag.isChecked();
options.showMeetingRemainingTip = binding.showMeetingRemainingTip.isChecked();
String notifyDurationStr = binding.etPluginNotifyDuration.getText().toString();
if (!notifyDurationStr.isEmpty()) {
options.pluginNotifyDuration = Integer.parseInt(notifyDurationStr);
}
if (MeetingConfigRepository.INSTANCE.getEnableAudioOptions()) {
options.audioProfile =
new NEAudioProfile(
Expand Down Expand Up @@ -226,7 +232,10 @@ public NEMeetingOptions getMeetingOptions(NEMeetingOptions options) {
options.enableAudioShare = binding.enableAudioShare.isChecked();
options.showCloudRecordingUI = binding.showCloudRecordingUI.isChecked();
options.showCloudRecordMenuItem = binding.showCloudRecordMenuItem.isChecked();
// options.enablePictureInPicture = isCheckedById(R.id.enablePictureInPicture);
options.enablePictureInPicture = binding.enablePictureInPicture.isChecked();
options.showNotYetJoinedMembers = binding.showNotYetJoinedMembers.isChecked();
options.enableDirectMemberMediaControlByHost =
binding.enableDirectMemberMediaControlByHost.isChecked();
return options;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import androidx.navigation.Navigation;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.manu.mdatepicker.MDatePickerDialog;
import com.netease.yunxin.kit.meeting.sampleapp.R;
import com.netease.yunxin.kit.meeting.sampleapp.ToastCallback;
import com.netease.yunxin.kit.meeting.sampleapp.adapter.ScheduleMeetingAdapter;
Expand Down Expand Up @@ -93,48 +92,41 @@ protected void initView() {
.getRecycledViewPool()
.setMaxRecycledViews(ScheduleMeetingAdapter.VIEW_TYPE, 0);
mAdapter.setOnItemClickListener(
(view, position) -> {
ScheduleMeetingItem item = dataList.get(position);
switch (item.getClickAction()) {
case ScheduleMeetingItem.SET_START_TIME_ACTION:
CalendarUtil.showDatePickerDialog(
getActivity(),
new MDatePickerDialog.OnDateResultListener() {

@Override
public void onDateResult(long date) {
startTime = date;
mAdapter
.getData()
.get(ScheduleMeetingItem.SET_START_TIME_ACTION)
.setTimeTip(formatTime(date));
mAdapter.updateData(
ScheduleMeetingItem.SET_START_TIME_ACTION,
mAdapter.getData().get(ScheduleMeetingItem.SET_START_TIME_ACTION));
}
});
break;
case ScheduleMeetingItem.SET_END_TIME_ACTION:
CalendarUtil.showDatePickerDialog(
getActivity(),
new MDatePickerDialog.OnDateResultListener() {

@Override
public void onDateResult(long date) {
//TODO 必须大于当前开始时间
endTime = date;
mAdapter
.getData()
.get(ScheduleMeetingItem.SET_END_TIME_ACTION)
.setTimeTip(formatTime(date));
mAdapter.updateData(
ScheduleMeetingItem.SET_END_TIME_ACTION,
mAdapter.getData().get(ScheduleMeetingItem.SET_END_TIME_ACTION));
}
});
break;
}
});
(view, position) -> {
ScheduleMeetingItem item = dataList.get(position);
switch (item.getClickAction()) {
case ScheduleMeetingItem.SET_START_TIME_ACTION:
CalendarUtil.showDateTimePickerDialog(
getActivity(),
startTime,
date -> {
startTime = date;
mAdapter
.getData()
.get(ScheduleMeetingItem.SET_START_TIME_ACTION)
.setTimeTip(formatTime(date));
mAdapter.updateData(
ScheduleMeetingItem.SET_START_TIME_ACTION,
mAdapter.getData().get(ScheduleMeetingItem.SET_START_TIME_ACTION));
});
break;
case ScheduleMeetingItem.SET_END_TIME_ACTION:
CalendarUtil.showDateTimePickerDialog(
getActivity(),
endTime,
date -> {
endTime = date;
mAdapter
.getData()
.get(ScheduleMeetingItem.SET_END_TIME_ACTION)
.setTimeTip(formatTime(date));
mAdapter.updateData(
ScheduleMeetingItem.SET_END_TIME_ACTION,
mAdapter.getData().get(ScheduleMeetingItem.SET_END_TIME_ACTION));
});
break;
}
});
mAdapter.setOnCheckedChangeListener(
(compoundButton, enable, clickAction) -> {
if (compoundButton != null && compoundButton.getId() == R.id.sb_meeting_switch) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,27 @@
android:layout_height="wrap_content"
android:checked="false"
android:text="音频共享" />
<!-- <CheckBox-->
<!-- android:id="@+id/enablePictureInPicture"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:checked="false"-->
<!-- android:text="后台开启画中画" />-->

<CheckBox
android:id="@+id/enablePictureInPicture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="退后台自动小窗" />

<CheckBox
android:id="@+id/showNotYetJoinedMembers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="展示未入会成员" />

<CheckBox
android:id="@+id/enableDirectMemberMediaControlByHost"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:text="主持人直接开关成员音视频" />

<CheckBox
android:id="@+id/noLive"
Expand Down Expand Up @@ -379,7 +394,7 @@
app:flow_maxElementsWrap="1"
app:flow_verticalStyle="packed"
app:layout_constraintHorizontal_weight="1"
app:constraint_referenced_ids="cloudRecord,showCloudRecordingUI,showCloudRecordMenuItem,noSip,noWhiteBoard,defaultWhiteBoard,showMemberTag,showMeetingRemainingTip,audioOffNotAllowSelfOn,audioOffAllowSelfOn,videoOffAllowSelfOn,videoOffNotAllowSelfOn,noMuteAllVideo,noMuteAllAudio,detectMutedMic,unpubAudioOnMute,showScreenShareUserVideo,showWhiteboardShareUserVideo,showFloatingMicrophone,enableAudioShare" />
app:constraint_referenced_ids="cloudRecord,showCloudRecordingUI,showCloudRecordMenuItem,noSip,noWhiteBoard,defaultWhiteBoard,showMemberTag,showMeetingRemainingTip,audioOffNotAllowSelfOn,audioOffAllowSelfOn,videoOffAllowSelfOn,videoOffNotAllowSelfOn,noMuteAllVideo,noMuteAllAudio,detectMutedMic,unpubAudioOnMute,showScreenShareUserVideo,showWhiteboardShareUserVideo,showFloatingMicrophone,enableAudioShare,enablePictureInPicture,showNotYetJoinedMembers,enableDirectMemberMediaControlByHost" />



Expand Down Expand Up @@ -471,6 +486,18 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/checkbox_flow_1"
app:layout_constraintBottom_toTopOf="@id/et_plugin_notify_duration"
/>

<EditText
android:id="@+id/et_plugin_notify_duration"
android:layout_width="0dp"
android:layout_height="56dp"
android:layout_margin="10dp"
android:textSize="16sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/et_encryption"
app:layout_constraintBottom_toTopOf="@id/configToolbarMenus"
/>

Expand Down
2 changes: 1 addition & 1 deletion SampleCode/Android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ kotlin.code.style=official
# eg. major.minor.hotfix{.buildNum}
# eg. 1.0.0.0
# eg. 1.0.0
VERSION_NAME=4.5.1
VERSION_NAME=4.8.0

#versionSuffix=SNAPSHOT
#generateJavaDoc=false
2 changes: 1 addition & 1 deletion SampleCode/iOS/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ target 'NEMeetingDemo' do
pod 'Masonry', '~> 1.1.0'
pod 'Reachability'

pod 'NEMeetingKit', '~> 4.8.0'
pod 'NEMeetingKit', '~> 4.9.1'
end

post_install do |installer|
Expand Down
Loading