Coder Social home page Coder Social logo

Comments (7)

comoris avatar comoris commented on May 19, 2024 1

hi @Elecash
I'm working on the same project as @matthiasdv , is there a way other than *ngFor to trigger a source-update (on one source-object instead of an array)?.

 constructor(
        private appRef: ApplicationRef,
        private zone: NgZone) {
        this.fsAPI = VgFullscreenAPI;

        this.video = {
                src: "http://static.videogular.com/assets/videos/videogular.mp4",
                type: "video/mp4"
            };
  }

 onClickUpdateSource() {
        this.newVideo = {
            src: "http://techslides.com/demos/sample-videos/small.mp4",
            type: "video/mp4",
        }

        // appRef
        this.video = Object.assign({}, this.newVideo);
        this.appRef.tick();

        // via zone
        this.zone.run( () => {
                this.video = Object.assign({}, this.newVideo)
            }
        )
        // via setTimeout()
        setTimeout( () => { 
            this.video = Object.assign({}, this.newVideo);
        }, 3000);

    }

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 in advance

from videogular2.

Elecash avatar Elecash commented on May 19, 2024 1

@fdambrosio this is a bug probably introduced in the last release. I will fix it asap.

from videogular2.

Elecash avatar Elecash commented on May 19, 2024

Hi,

You don't need to use vg-master or registerMedia() at all. I've seen that error before but it's pretty hard for me to reproduce it. Can you reproduce that error always? If you can, can you tell me how?

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.

from videogular2.

matthiasdv avatar matthiasdv commented on May 19, 2024

@Elecash

Thanks for referring me to the proper example, it helped a lot.

Turns out the following exception:
localhost/:1 Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause().

is thrown whenever api.play() is being called on an invalid video source. i.e. attempting to press the play button when the source url returns a 404.

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?

from videogular2.

daslicht avatar daslicht commented on May 19, 2024

I have the same issue,

broken link:
https://github.com/videogular/videogular2/tree/master/examples/bound-player

Where do I find this example please?

from videogular2.

Elecash avatar Elecash commented on May 19, 2024

This has been moved here: https://github.com/videogular/videogular2-showroom/tree/master/src/app/bound-player

from videogular2.

fdambrosio avatar fdambrosio commented on May 19, 2024

Hi @Elecash I'm testing the bound-player and it doesn't work.
When I click the 'update source' button the player reloads the first video (videogular.mp4).
I've the same issue on a project based on videogular.
My environment: Chrome 58 on Mac 10.12

from videogular2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.