-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
how do I abort a video while it is playing #28
Comments
I'm not sure your specific use case, but I'll share how I'm doing this. I have a playlist of videos that the user can see in a panel on the right side of the webpage. When a video is playing and it reached the end, it will automatically queue up the next video and begin to auto play. Or if the user clicks a new link in the playlist, I will adjust bound properties. I adjust the correct properties bound to the BlazoredVideo component and then make the following calls:
|
Hi Chris,
I have a list hyperlinks of video titles in a Blazor page. When I click on any one, it plays the video.
This works fine if no video is playing when I select a video.
If there is a video playing and select a different hyperlink, that is when the problem happens. Is that clear?
The problem is how to stop or dispose of the playing video so the new selection is launched successfully.
Regards,
Robert
From: Chris Langston ***@***.***>
Sent: Thursday, June 20, 2024 4:38 AM
To: Blazored/Video ***@***.***>
Cc: Robert Clancy ***@***.***>; Author ***@***.***>
Subject: Re: [Blazored/Video] how do I abort a video while it is playing (Issue #28)
I'm not sure your specific use case, but I'll share how I'm doing this.
I have a playlist of videos that the user can see in a panel on the right side of the webpage. When a video is playing and it reached the end, it will automatically queue up the next video and begin to auto play. Or if the user clicks a new link in the playlist, I will adjust bound properties.
I adjust the correct properties bound to the BlazoredVideo component and then make the following calls:
await MyBlazorVideo.ReloadControl();
await MyBlazorVideo.StartPlayback();
<BlazoredVideo @ref="MyBlazorVideo"
TimeUpdateEvent="OnEvent"
Play="OnPlay"
Ended="OnEnded"
VideoEventOptions="options"
class="w-100"
autofocus="true"
controls="controls">
<source ***@***.***" type="video/mp4" />
</BlazoredVideo>
—
Reply to this email directly, view it on GitHub<#28 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AACFTLK7DWIKZWJFUHWT353ZIHFXXAVCNFSM6AAAAABJSRHUR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZZGI4TONJRGY>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Makes sense.
Do you have a repo you can share and I’ll take a look?
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: rclancy ***@***.***>
Sent: Wednesday, June 19, 2024 6:26:28 PM
To: Blazored/Video ***@***.***>
Cc: Chris Langston ***@***.***>; Comment ***@***.***>
Subject: Re: [Blazored/Video] how do I abort a video while it is playing (Issue #28)
Hi Chris,
I have a list hyperlinks of video titles in a Blazor page. When I click on any one, it plays the video.
This works fine if no video is playing when I select a video.
If there is a video playing and select a different hyperlink, that is when the problem happens. Is that clear?
The problem is how to stop or dispose of the playing video so the new selection is launched successfully.
Regards,
Robert
From: Chris Langston ***@***.***>
Sent: Thursday, June 20, 2024 4:38 AM
To: Blazored/Video ***@***.***>
Cc: Robert Clancy ***@***.***>; Author ***@***.***>
Subject: Re: [Blazored/Video] how do I abort a video while it is playing (Issue #28)
I'm not sure your specific use case, but I'll share how I'm doing this.
I have a playlist of videos that the user can see in a panel on the right side of the webpage. When a video is playing and it reached the end, it will automatically queue up the next video and begin to auto play. Or if the user clicks a new link in the playlist, I will adjust bound properties.
I adjust the correct properties bound to the BlazoredVideo component and then make the following calls:
await MyBlazorVideo.ReloadControl();
await MyBlazorVideo.StartPlayback();
<BlazoredVideo @ref="MyBlazorVideo"
TimeUpdateEvent="OnEvent"
Play="OnPlay"
Ended="OnEnded"
VideoEventOptions="options"
class="w-100"
autofocus="true"
controls="controls">
<source ***@***.***" type="video/mp4" />
</BlazoredVideo>
—
Reply to this email directly, view it on GitHub<#28 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AACFTLK7DWIKZWJFUHWT353ZIHFXXAVCNFSM6AAAAABJSRHUR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZZGI4TONJRGY>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
—
Reply to this email directly, view it on GitHub<#28 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AD3ON4IRMJBCMYRBAESMKTLZIIARJAVCNFSM6AAAAABJSRHUR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZZGUZDIMBXGA>.
You are receiving this because you commented.Message ID: ***@***.***>
|
No I don't sorry. Is it not clear?
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Chris Langston ***@***.***>
Sent: Thursday, June 20, 2024 10:21:25 AM
To: Blazored/Video ***@***.***>
Cc: Robert Clancy ***@***.***>; Author ***@***.***>
Subject: Re: [Blazored/Video] how do I abort a video while it is playing (Issue #28)
Makes sense.
Do you have a repo you can share and I’ll take a look?
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: rclancy ***@***.***>
Sent: Wednesday, June 19, 2024 6:26:28 PM
To: Blazored/Video ***@***.***>
Cc: Chris Langston ***@***.***>; Comment ***@***.***>
Subject: Re: [Blazored/Video] how do I abort a video while it is playing (Issue #28)
Hi Chris,
I have a list hyperlinks of video titles in a Blazor page. When I click on any one, it plays the video.
This works fine if no video is playing when I select a video.
If there is a video playing and select a different hyperlink, that is when the problem happens. Is that clear?
The problem is how to stop or dispose of the playing video so the new selection is launched successfully.
Regards,
Robert
From: Chris Langston ***@***.***>
Sent: Thursday, June 20, 2024 4:38 AM
To: Blazored/Video ***@***.***>
Cc: Robert Clancy ***@***.***>; Author ***@***.***>
Subject: Re: [Blazored/Video] how do I abort a video while it is playing (Issue #28)
I'm not sure your specific use case, but I'll share how I'm doing this.
I have a playlist of videos that the user can see in a panel on the right side of the webpage. When a video is playing and it reached the end, it will automatically queue up the next video and begin to auto play. Or if the user clicks a new link in the playlist, I will adjust bound properties.
I adjust the correct properties bound to the BlazoredVideo component and then make the following calls:
await MyBlazorVideo.ReloadControl();
await MyBlazorVideo.StartPlayback();
<BlazoredVideo @ref="MyBlazorVideo"
TimeUpdateEvent="OnEvent"
Play="OnPlay"
Ended="OnEnded"
VideoEventOptions="options"
class="w-100"
autofocus="true"
controls="controls">
<source ***@***.***" type="video/mp4" />
</BlazoredVideo>
—
Reply to this email directly, view it on GitHub<#28 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AACFTLK7DWIKZWJFUHWT353ZIHFXXAVCNFSM6AAAAABJSRHUR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZZGI4TONJRGY>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
—
Reply to this email directly, view it on GitHub<#28 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AD3ON4IRMJBCMYRBAESMKTLZIIARJAVCNFSM6AAAAABJSRHUR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZZGUZDIMBXGA>.
You are receiving this because you commented.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub<#28 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AACFTLNKP6HFBFJ6F5665MLZIIOALAVCNFSM6AAAAABJSRHUR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZZGYYDGOBVGI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi @rclancy , Take a look at the sample repo that I pushed for an example. This is just a clone of the main repo with a few changes to show the example. Note, I'm not doing anything with byte arrays, but rather just changing the value that is bound to "VideoSource" See the file in "SharedRCL/Pages/Controls/razor". I created a sample button that when the user clicks, it will change the value for @VideoSource and then just call "video.ReloadControl()". If you want it to start playing, you can call video.StartPlayback(). |
Ok, thanks
From: Chris Langston ***@***.***>
Sent: Saturday, June 22, 2024 2:33 AM
To: Blazored/Video ***@***.***>
Cc: Robert Clancy ***@***.***>; Mention ***@***.***>
Subject: Re: [Blazored/Video] how do I abort a video while it is playing (Issue #28)
Hi @rclancy<https://github.com/rclancy> ,
Take a look at the sample repo that I pushed for an example. This is just a clone of the main repo with a few changes to show the example. Note, I'm not doing anything with byte arrays, but rather just changing the value that is bound to "VideoSource"
See the file in "SharedRCL/Pages/Controls/razor". I created a sample button that when the user clicks, it will change the value for @VideoSource and then just call "video.ReloadControl()". If you want it to start playing, you can call video.StartPlayback().
https://github.com/chrislangston/Blazored.Video
—
Reply to this email directly, view it on GitHub<#28 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AACFTLMMKB6NQMMXTLDL2GTZIRIULAVCNFSM6AAAAABJSRHUR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTGA3TGMBVG4>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
I have a Blazor web application that passes byte arrays to BlazoredVideo but when I want to change the source, the application freezest. How can I abort the current video so I can change the source?
The text was updated successfully, but these errors were encountered: