Skip to content

Commit 885651e

Browse files
committed
doc: 更新文档
1 parent f7d7251 commit 885651e

File tree

5 files changed

+47
-24
lines changed

5 files changed

+47
-24
lines changed

src/BootstrapBlazor.Server/Components/Samples/VideoDevices.razor

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,26 @@
55

66
<h4>@Localizer["VideoDeviceIntro"]</h4>
77

8-
<p>@((MarkupString)Localizer["VideoDeviceDescription"].Value)</p>
9-
108
<Pre>[Inject, NotNull]
119
private IBluetooth? BluetoothService { get; set; }</Pre>
1210

13-
<Tips>
14-
<ul class="ul-demo">
15-
<li>@((MarkupString)Localizer["VideoDeviceTipsLi1"].Value)</li>
16-
<li>@((MarkupString)Localizer["VideoDeviceTipsLi2"].Value)</li>
17-
</ul>
18-
<div>@((MarkupString)Localizer["VideoDeviceTipsTitle"].Value)</div>
19-
</Tips>
20-
2111
<DemoBlock Title="@Localizer["BaseUsageTitle"]"
2212
Introduction="@Localizer["BaseUsageIntro"]"
2313
Name="Normal">
24-
<section ignore>
25-
@Localizer["UsageDesc"]
26-
</section>
2714
<div class="row form-inline g-3">
2815
<div class="col-12">
2916
<Button Text="@Localizer["VideoDeviceRequestText"]" Icon="fa-solid fa-photo-film" OnClick="OnRequestDevice"></Button>
30-
<Button Text="@Localizer["VideoDeviceOpenText"]" Icon="fa-solid fa-play" OnClick="OnOpenVideo"></Button>
31-
<Button Text="@Localizer["VideoDeviceCloseText"]" Icon="fa-solid fa-stop" OnClick="OnCloseVideo"></Button>
32-
<Button Text="@Localizer["VideoDeviceCaptureText"]" Icon="fa-solid fa-camera" OnClick="OnCapture"></Button>
33-
<Button Text="@Localizer["VideoDeviceFlipText"]" Icon="fa-solid fa-camera" OnClick="OnFlip"></Button>
17+
<Button Text="@Localizer["VideoDeviceOpenText"]" Icon="fa-solid fa-play" OnClick="OnOpenVideo" class="ms-2"></Button>
18+
<Button Text="@Localizer["VideoDeviceCloseText"]" Icon="fa-solid fa-stop" OnClick="OnCloseVideo" class="ms-2"></Button>
19+
<Button Text="@Localizer["VideoDeviceCaptureText"]" Icon="fa-solid fa-camera" OnClick="OnCapture" class="ms-2"></Button>
20+
<Button Text="@Localizer["VideoDeviceFlipText"]" Icon="fa-solid fa-camera-rotate" OnClick="OnFlip" class="ms-2"></Button>
21+
</div>
22+
<div class="col-12">
23+
<Select Items="@_items" @bind-Value="_deviceId" DisplayText="Devices" ShowLabel="true"></Select>
3424
</div>
3525
</div>
3626

37-
<Select Items="@_items" @bind-Value="_deviceId"></Select>
38-
39-
<div>Video</div>
40-
41-
<video class="bb-video" muted playsinline autoplay style="height: auto; width: auto;"></video>
42-
43-
<div>Preview</div>
27+
<video class="bb-video" muted playsinline autoplay></video>
4428

4529
@if (!string.IsNullOrEmpty(_previewUrl))
4630
{

src/BootstrapBlazor.Server/Components/Samples/VideoDevices.razor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ private async Task OnOpenVideo()
4646

4747
private async Task OnCloseVideo()
4848
{
49+
_previewUrl = "";
4950
await VideoDeviceService.Close(".bb-video");
5051
}
5152

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.bb-video {
2+
min-height: 240px;
3+
height: auto;
4+
width: auto;
5+
transform: scaleX(-1);
6+
margin-top: 1rem;
7+
display: block;
8+
}
9+
10+
.bb-image {
11+
border: 1px solid var(--bs-border-color);
12+
border-radius: var(--bs-border-radius);
13+
transform: scaleX(-1);
14+
margin-top: 1rem;
15+
display: block;
16+
}

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7117,5 +7117,16 @@
71177117
"UrlDesc": "Use your iPhone's camera or the QR code scanning function to scan the QR code below, then open the <code>Safari</code> browser and open the current address",
71187118
"WiFiDesc": "Use your iPhone's camera or the QR code scanner to scan the QR code below to automatically join the <code>WiFi</code> network.",
71197119
"EmailDesc": "Use your iPhone's camera or the QR code scanner to scan the QR code below, then open the <code>Email</code> app to send an email."
7120+
},
7121+
"BootstrapBlazor.Server.Components.Samples.VideoDevices": {
7122+
"VideoDeviceTitle": "IVideoDevice",
7123+
"VideoDeviceIntro": "Get video equipment operation capabilities through this service",
7124+
"BaseUsageTitle": "Basic usage",
7125+
"BaseUsageIntro": "Perform different operations by calling different API methods",
7126+
"VideoDeviceRequestText": "List",
7127+
"VideoDeviceOpenText": "Open",
7128+
"VideoDeviceCloseText": "Close",
7129+
"VideoDeviceCaptureText": "Capture",
7130+
"VideoDeviceFlipText": "Flip"
71207131
}
71217132
}

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7117,5 +7117,16 @@
71177117
"UrlDesc": "使用 <code>iPhone</code> 手机相机或者扫描二维码功能扫描下方二维码后,打开 <code>Safari</code> 浏览器并且打开当前地址",
71187118
"WiFiDesc": "使用 <code>iPhone</code> 手机相机或者扫描二维码功能扫描下方二维码后,自动加入 <code>WiFi</code> 网络",
71197119
"EmailDesc": "使用 <code>iPhone</code> 手机相机或者扫描二维码功能扫描下方二维码后,打开 <code>Email</code> 应用发送邮件"
7120+
},
7121+
"BootstrapBlazor.Server.Components.Samples.VideoDevices": {
7122+
"VideoDeviceTitle": "IVideoDevice 视频设备服务",
7123+
"VideoDeviceIntro": "通过此服务获得视频设备操作能力",
7124+
"BaseUsageTitle": "基本用法",
7125+
"BaseUsageIntro": "通过调用不同的 api 方法进行不同操作",
7126+
"VideoDeviceRequestText": "枚举设备",
7127+
"VideoDeviceOpenText": "打开设备",
7128+
"VideoDeviceCloseText": "关闭设备",
7129+
"VideoDeviceCaptureText": "截图",
7130+
"VideoDeviceFlipText": "翻转镜头"
71207131
}
71217132
}

0 commit comments

Comments
 (0)