-
-
Notifications
You must be signed in to change notification settings - Fork 364
feat(Meeting): add Meeting component #6092
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8fd6088
添加Meet示例
j4587698 7985cf3
例子中添加更多说明以及支持自定义服务器地址
j4587698 9005da0
doc: 增加菜单
ArgoZhang 79768fd
chore: 增加源码映射关系
ArgoZhang 7824731
doc: 更新示例
ArgoZhang dc9c0f8
chore: 更新依赖
ArgoZhang 103a0f7
Merge branch 'main' into feat-meeting
ArgoZhang fb0721b
refactor: 精简代码
ArgoZhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| @page "/meet" | ||
|
|
||
| <h3>JitsiMeet会议</h3> | ||
|
|
||
| <h4>通过JitsiMeet创建会议</h4> | ||
|
|
||
| <PackageTips Name="BootstrapBlazor.JitsiMeet" /> | ||
|
|
||
| <Tips class="mt-3"> | ||
| <p>JitsiMeet是一个开源的WebRTC会议程序,可以自托管安装也可以使用官方的托管服务(免费计划为25MAU),此组件仅为JitsiMeet的客户端程序,不含服务端。</p> | ||
| <p>默认的测试会议仅支持5分钟的会议,并且主持人需要登录。子托管以及官方托管服务不需要。</p> | ||
| </Tips> | ||
|
|
||
| <DemoBlock Title="使用JitsiMeet创建会议室" Introduction="使用JitsiMeet创建会议室,支持执行命令,支持OnLoad回调(meet.jit.si不会触发回调也不会响应命令,请使用8x8.vc或子托管域名测试)。例子中隐藏了内置的邀请程序,无法在会议中找到邀请链接。" Name="Normal"> | ||
| <section class="row form-inline g-3"> | ||
| <div class="col-12 col-sm-6"> | ||
| <Display Value="_domain" DisplayText="服务器地址" ShowLabel="true"></Display> | ||
| </div> | ||
| <div class="col-12 col-sm-6"> | ||
| <Button OnClick="RunCommand">执行命令</Button> | ||
| </div> | ||
| </section> | ||
| <Meet @ref="@_meet" Option="@_option" Domain="@_domain" OnLoad="OnLoad"></Meet> | ||
| </DemoBlock> | ||
56 changes: 56 additions & 0 deletions
56
src/BootstrapBlazor.Server/Components/Samples/Meets.razor.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the Apache 2.0 License | ||
| // See the LICENSE file in the project root for more information. | ||
| // Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone | ||
|
|
||
| namespace BootstrapBlazor.Server.Components.Samples; | ||
|
|
||
| /// <summary> | ||
| /// Meet 视频会议组件示例 | ||
| /// </summary> | ||
| public partial class Meets : ComponentBase | ||
| { | ||
| private MeetOption? _option; | ||
| private Meet? _meet; | ||
| private readonly string _domain = "meet.jit.si"; | ||
|
|
||
| [Inject, NotNull] | ||
| private ToastService? ToastService { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// <inheritdoc /> | ||
| /// </summary> | ||
| protected override void OnInitialized() | ||
| { | ||
| base.OnInitialized(); | ||
|
|
||
| _option = new MeetOption | ||
| { | ||
| RoomName = "BootstrapBlazor", | ||
| Width = "100%", | ||
| Height = 700, | ||
| ConfigOverwrite = new | ||
| { | ||
| Lobby = new { EnableChat = false }, | ||
| HiddenPremeetingButtons = new string[] { "invite" }, | ||
| DisableInviteFunctions = true, | ||
| ButtonsWithNotifyClick = new[] { new { key = "invite", preventExecution = true } } | ||
| }, | ||
| UserInfo = new UserInfo() { DisplayName = "BootstrapBlazor", Email = "[email protected]" } | ||
| }; | ||
| } | ||
|
|
||
| private void OnLoad() | ||
| { | ||
| ToastService.Information("Meet 示例", "会议室加载完成"); | ||
| } | ||
|
|
||
| private async Task RunCommand() | ||
| { | ||
| if (_meet != null) | ||
| { | ||
| await _meet.ExecuteCommand("toggleChat"); | ||
| } | ||
| } | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (bug_risk): Use @-prefixed C# binding for Value parameter
Value="_domain" sets the parameter to the string "_domain" instead of the variable's value. Use Value="@_domain" to bind the variable.