BootstrapBlazor.VideoPlayer 7.0.0
Blazor VideoPlayer 视频播放器 组件
示例:
https://blazor.app1.es/videoPlayers
使用方法:
1.nuget包
BootstrapBlazor.VideoPlayer
2._Imports.razor 文件 或者页面添加 添加组件库引用
@using BootstrapBlazor.Components
3.razor页面
<VideoPlayer SourcesType="application/x-mpegURL" SourcesUrl="https://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8" Debug="true" />
<VideoPlayer SourcesType="video/mp4" SourcesUrl="//vjs.zencdn.net/v/oceans.mp4" />
4.参数说明
参数 | 说明 | 默认值 |
---|---|---|
SourcesUrl | 资源地址 | null |
SourcesType | 资源类型,video/mp4, application/x-mpegURL, video/ogg .. 更多参考 EnumVideoType | application/x-mpegURL |
Width | 宽度 | 300 |
Height | 高度 | 200 |
Controls | 显示控制条 | true |
Autoplay | 自动播放 | true |
Poster | 设置封面资源,相对或者绝对路径 | |
Option | 播放器选项, 不为空则优先使用播放器选项,否则使用参数构建 | null |
async Task Reload(string? url, string? type) | 切换播放资源 | |
async Task SetPoster(string? poster) | 设置封面 | |
Func<string, Task>? OnError | 错误回调 |
Blazor 组件
AlexChow
今日头条 | 博客园 | 知乎 | Gitee | GitHub
No packages depend on BootstrapBlazor.VideoPlayer.
.NET 6.0
- Microsoft.AspNetCore.Components.Web (>= 6.0.0)
.NET 7.0
- Microsoft.AspNetCore.Components.Web (>= 7.0.0)
Version | Downloads | Last updated |
---|---|---|
9.0.3 | 0 | 2025/2/10 |
9.0.2 | 0 | 2024/12/3 |
9.0.1 | 1 | 2025/6/9 |
9.0.0 | 0 | 2024/11/13 |
9.0.0-beta02 | 1 | 2025/6/10 |
9.0.0-beta01 | 1 | 2025/6/10 |
8.0.7 | 0 | 2024/9/22 |
8.0.7-beta1 | 0 | 2024/5/5 |
8.0.6 | 0 | 2023/12/9 |
8.0.5 | 1 | 2025/6/10 |
8.0.4 | 1 | 2025/6/10 |
8.0.3 | 1 | 2025/6/10 |
8.0.2 | 1 | 2025/6/10 |
8.0.1 | 1 | 2025/6/10 |
8.0.0 | 0 | 2023/11/15 |
7.0.4 | 1 | 2025/6/8 |
7.0.3 | 0 | 2023/2/2 |
7.0.2 | 1 | 2025/6/9 |
7.0.1 | 0 | 2022/12/16 |
7.0.0 | 1 | 2025/6/10 |
0.0.1 | 0 | 2022/12/14 |