videogular / videogular2

The HTML5 video player for Angular 2
https://videogular.github.io/videogular2-showroom/#/
MIT License
672 stars 211 forks source link

help with multiple videos single player #859

Open bhenderson opened 5 years ago

bhenderson commented 5 years ago

Hi, wondering if you can help me. I have a service that is receiving video tracks from twilio. The service is sending the tracks through an observable as a collected array. The video tracks come in at different times, but they correspond to a live feed. I need to play them all synchronously whenever I get them. I'm assuming this is best done in one player but I'm having trouble. When the additional tracks come in after the player has finished "onPlayerReady" the "registerMedia" function receives new media, but the id is set to "". This results in the player only controlling one video at a time. Is there a good way to trigger a "re-register" after the media comes in and after angular sets the id field?

Here is a stackblitz:

https://stackblitz.com/edit/angular-videogular-gt8wtl?file=app%2Fhello.component.ts

Wondering what I'm doing wrong or if there is a bug somewhere.

thank you so much for your time!

Seliah commented 4 years ago

Hi @bhenderson

Did you come up with a solution to this problem? The ability to create multiple video components from a list and control them with one player would be a very elegant solution to my problem. Furthermore, it would save me from implementing the logic myself.

Thanks in advance! :)