algora-io / tv

Open source Twitch for developers
https://algora.tv
Other
1.01k stars 59 forks source link

chore: migrate `VideoPlayer()` to Vidstack #84

Closed kaf-lamed-beyt closed 1 month ago

kaf-lamed-beyt commented 2 months ago

@zcesur, could you review when you're free? Here's an overview of what I did though.

demo

Screencast from 05-09-2024 00:33:01.webm

Some issues I'm having

/claim #45

CLAassistant commented 2 months ago

CLA assistant check
All committers have signed the CLA.

kaf-lamed-beyt commented 1 month ago

Thanks for the PR @kaf-lamed-beyt! Works great overall, can merge it in once these are addressed

Smooth! Thanks for the feedback

kaf-lamed-beyt commented 1 month ago

hi @zcesur, please take a look. I added the onAutoplayFail() callback too, lemme know if I'm on the right track, thanks!

I forgot to add .lexical to gitignore, git tracked it. I also tried deleting the file from this PR, but it seems that's not possible? because I can still see it here.

kaf-lamed-beyt commented 1 month ago

despite adding /.lexical to gitignore, and deleting it here, I can still see it being generated. What could be the issue?

zcesur commented 1 month ago

Autoplay still doesn't work, there's a chance onAutoPlayFail is not available in vanilla JS build of the player. Can you try and see if something like this works?

this.player.subscribe(({ autoPlayError }) => {
  if (autoPlayError) {
    this.player.muted = true;
    this.player.play();
  }
});

Not sure why .lexical got tracked. Did you try pushing a new commit with its deletion?

kaf-lamed-beyt commented 1 month ago

Okay. I'll try this.

About lexical... when I deleted the folder, and I went on with my stuff, it auto-generated it again. Perhaps, I'll remove the extension. Hopefully that fixes it.

mazz commented 1 month ago

This is awesome!!