-
Notifications
You must be signed in to change notification settings - Fork 213
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
Best practice regarding updating video sources #257
Comments
Hi, You don't need to use In this example you can see what you want to do and I can't reproduce in my machine that error. https://github.com/videogular/videogular2/tree/master/examples/bound-player It would be great if you can publish an example to debug with chrome what can be the problem. |
hi @Elecash
tried some change detection strategies, but none of them worked updated te video visually, meaning: the source input is changed to the new url but the video plays the old. Any Suggestions |
Thanks for referring me to the proper example, it helped a lot. Turns out the following exception: is thrown whenever What made it even more confusing in my particular case was that my application's backend was stuck in a loop encoding the video file over and over again, causing the client to neither fire a 404 response, nor be able to buffer the continuously changing file. So you may consider this issue closed. Perhaps throwing a more verbose error on invalid source files would be a nice enhancement? |
I have the same issue, broken link: Where do I find this example please? |
This has been moved here: https://github.com/videogular/videogular2-showroom/tree/master/src/app/bound-player |
Hi @Elecash I'm testing the bound-player and it doesn't work. |
@fdambrosio this is a bug probably introduced in the last release. I will fix it asap. |
Description
I'm struggling with implementing a feature that updates sources for Videogular 2. The basic user flow is as follows;
I've tried a few possible approaches to this problem and read trough the documentation for videogular 2, as well as the documentation and examples for the Angular 1.x implementation, to no avail.
Actual Behavior
Currently I simply update the
[src]
binding on the<source/>
-element contained within<video vg-media/>
. This throws no errors, but theplay()
function seems to hang. A consecutivepause()
throws the following exception:This is my HTML:
Edit:
When I log
this.medias
in the API'splay()
function it returns the following object:Both the canPlay and canPlayThrough properties are set to false. When I load my page with a static source link pointing to the same file it plays correctly. Should I reload the videogular component in some way?
Updating
video.src
in[src]="video.src"
triggers theonChanges()
function but does not provide a playable video element (see behaviour described above). Do I need to utilise the master-media functionality in order to dynamically update the video sources? I've noticed there's theregisterMedia()
function in the API, should I use this to register new sources ?Could you briefly explain the best practices regarding what I'm attempting to achieve?
Thank you!
The text was updated successfully, but these errors were encountered: