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

Video: Update to VidstackPlayer library #5609

Merged
merged 37 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
728f1ad
Update video to use VidstackPlayer
stsrki Jul 4, 2024
167d200
Merge branch 'master' into dev-video-update-to-vidstack
stsrki Jul 16, 2024
a124c01
Use latest dash and hls JS files
stsrki Jul 16, 2024
5458510
Use Plyr implemetation of vidstack
stsrki Jul 16, 2024
e046194
Remove unused code
stsrki Jul 16, 2024
498515f
Expand VideoTracks
stsrki Jul 17, 2024
7e9e63d
Register events
stsrki Jul 17, 2024
b755b63
Add tracks
stsrki Jul 17, 2024
527f6a2
Fix control functions
stsrki Jul 18, 2024
a4e9f03
Change tracks on updateSource
stsrki Jul 18, 2024
f5ce4d1
Fix VideoTrack
stsrki Jul 18, 2024
9de1e0d
Add test subtitles
stsrki Jul 18, 2024
fdf7b38
Fix controls
stsrki Jul 19, 2024
0589a8d
Merge branch 'master' into dev-video-update-to-vidstack
stsrki Jul 19, 2024
a67edba
Remove unused hls event
stsrki Jul 19, 2024
6b0b2b6
controls-change event
stsrki Jul 19, 2024
e85e28a
Methods to control text tracks
stsrki Jul 19, 2024
ac818cf
Release notes
stsrki Jul 20, 2024
e64c05f
Merge branch 'master' into dev-video-update-to-vidstack
stsrki Jul 20, 2024
4bff93e
Add hls protection for widevine
stsrki Jul 20, 2024
c6d2724
Fix drmSystems
stsrki Jul 20, 2024
f846e55
Add ProtectionServerCertificateUrl to support apple fairplay
stsrki Jul 20, 2024
98b7269
Remove exceptions from ParseAspectRatio
stsrki Jul 20, 2024
7e95324
Add PlayReady to hls
stsrki Jul 20, 2024
3c4c9d3
Merge branch 'master' into dev-video-update-to-vidstack
stsrki Jul 21, 2024
3504f84
Remove change of DefaultQuality in the demo
stsrki Jul 22, 2024
06077d7
Update to latest player version
stsrki Jul 22, 2024
6136fd9
Use width in demo
stsrki Jul 22, 2024
ee43c68
Add default player theme css
stsrki Jul 22, 2024
2bfbc57
Switch to default VidstackPlayer with Plyr layout
stsrki Jul 22, 2024
197d6d0
Add Thumbnails API
stsrki Jul 22, 2024
f22ec4e
Add chapters file
stsrki Jul 22, 2024
fa9d727
Merge branch 'master' into dev-video-update-to-vidstack
stsrki Jul 22, 2024
3f90f34
Rewrite release notes
stsrki Jul 23, 2024
0c3288e
Mention new parameters
stsrki Jul 23, 2024
da3b9f6
Fix stop action
stsrki Jul 23, 2024
508a3e9
Detect source Type from extension if none was provided
stsrki Jul 23, 2024
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
38 changes: 25 additions & 13 deletions Demos/Blazorise.Demo/Pages/Tests/VideoPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,50 @@
<Button Color="Color.Primary" Clicked="@(()=>videoRef.Stop())">
<Icon Name="IconName.Stop" />
</Button>
<Button Color="Color.Primary" Clicked="@(()=>videoRef.TogglePlay())">
<Icon Name="IconName.PlayCircle" />
</Button>
</Buttons>
<Button Color="Color.Primary" Clicked="@OnChangeVideoUrl">Change Video</Button>
<Button Color="Color.Primary" Clicked="@OnChangeCurrentTime">Go to 20 seconds</Button>
<Button Color="Color.Secondary" Clicked="@OnChangeQuality">Change Quality to 1080</Button>
</CardBody>
<CardBody>
<Video @ref="@videoRef" Source="@videoSource" CurrentTime="@currentTime" DefaultQuality="@quality" />
<Video @ref="@videoRef" Source="@videoSource" Thumbnails="https://files.vidstack.io/sprite-fight/thumbnails.vtt" CurrentTime="@currentTime" DefaultQuality="@defaultQuality" />
</CardBody>
</Card>
</Column>
</Row>
@code {
Video videoRef;
// VideoSource videoSource = new VideoSource()
stsrki marked this conversation as resolved.
Show resolved Hide resolved
// {
// Medias = new ValueEqualityList<VideoMedia>
// {
// new VideoMedia("https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-576p.mp4", "video/mp4", 1024, 576),
// new VideoMedia("https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-720p.mp4", "video/mp4", 1280, 720),
// new VideoMedia("https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-1080p.mp4", "video/mp4", 1920, 1080),
// },
// Tracks = new ValueEqualityList<VideoTrack>
// {
// new VideoTrack("_content/Blazorise.Demo/subtitles/View_From_A_Blue_Moon_Trailer-HD.en.vtt", "en-US"){ Kind = "subtitles", Label = "English", Default = true },
// new VideoTrack("_content/Blazorise.Demo/subtitles/View_From_A_Blue_Moon_Trailer-HD.fr.vtt", "fr-FR"){ Kind = "subtitles", Label = "French" },
// }
// };
VideoSource videoSource = new VideoSource()
{
Medias = new ValueEqualityList<VideoMedia>
{
new VideoMedia("https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-576p.mp4", "video/mp4", 576),
new VideoMedia("https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-720p.mp4", "video/mp4", 720),
new VideoMedia("https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-1080p.mp4", "video/mp4", 1080),
new VideoMedia("https://files.vidstack.io/sprite-fight/720p.mp4", "video/mp4", 1280, 720),
},
Tracks = new ValueEqualityList<VideoTrack>
{
new VideoTrack("_content/Blazorise.Demo/subtitles/sprite-fight.en.vtt", "en-US"){ Kind = "subtitles", Label = "English", Default = true },
new VideoTrack("_content/Blazorise.Demo/subtitles/sprite-fight.es.vtt", "es-ES"){ Kind = "subtitles", Label = "Spanish" },
}
};

double currentTime = 10;
int quality = 576;
int defaultQuality = 720;

Task OnChangeVideoUrl()
{
Expand All @@ -56,11 +75,4 @@

return Task.CompletedTask;
}

Task OnChangeQuality()
{
quality = 1080;

return Task.CompletedTask;
}
}
31 changes: 31 additions & 0 deletions Demos/Blazorise.Demo/wwwroot/chapters/sprite-fight.vtt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
WEBVTT

00:00 --> 01:13
The Forest

01:13 --> 02:31
Camp Site

02:31 --> 03:57
The Sprites

03:57 --> 04:10
Campfire

04:10 --> 07:01
Escape

07:01 --> 07:50
Eat Salt!

07:50 --> 08:21
Motacilla Flava

08:21 --> 08:43
Tree Bridge

08:43 --> 09:14
March Home

09:14 --> 10:29
Credits
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
WEBVTT FILE

1
00:00:09.500 --> 00:00:12.000
The ocean floor rises 5 miles to the shores

2
00:00:12.001 --> 00:00:16.500
of what people call, the seven mile miracle

3
00:00:25.500 --> 00:00:28.000
What would it be like to be born on this island?

4
00:00:32.500 --> 00:00:34.500
To grow up on these shores

5
00:00:37.500 --> 00:00:40.000
To witness this water, every day

6
00:00:43.500 --> 00:00:46.000
You're about to meet someone, who did

7
00:02:45.500 --> 00:02:49.000
This is a film about John John Florence
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
WEBVTT FILE

1
00:00:09.500 --> 00:00:12.000
Le fond de l'océan monte 5 miles des rives

2
00:00:12.001 --> 00:00:16.500
de ce que les gens appellent le miracle de sept mile

3
00:00:25.500 --> 00:00:28.000
Que serait-il d'être né sur cette île?

4
00:00:32.500 --> 00:00:34.500
Pour grandir sur ces rivages

5
00:00:37.500 --> 00:00:40.000
Pour assister à cette eau, tous les jours

6
00:00:43.500 --> 00:00:46.000
Vous êtes sur le point de rencontrer quelqu'un, qui ne

7
00:02:45.500 --> 00:02:49.000
Ceci est un film sur John John Florence
Loading
Loading