Skip to content
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

Decouple the Player from the Web Application #4

Closed
nicolaslevy opened this issue Nov 22, 2024 · 7 comments
Closed

Decouple the Player from the Web Application #4

nicolaslevy opened this issue Nov 22, 2024 · 7 comments
Assignees

Comments

@nicolaslevy
Copy link
Collaborator

Currently, the MoQ player is built as part of the web application. This issue proposes separating the player into an independent module that can be published and utilized by other web applications. This modular approach will enhance re-usability and make the player easier to integrate into different projects

@emilsas
Copy link

emilsas commented Nov 28, 2024

To continue this thread, one idea to decouple the player is by creating a WebComponent for the player, ensuring that everything is encapsulated and reusable on any page.

Additionally, if the player is to remain within this repository, it would be beneficial to make all player-related content and the export of pertinent components the primary focus, while moving the example page to a directory named sample.

To address these points, I will open two new issues to track each discussion separately.
#10
#11

@nicolaslevy
Copy link
Collaborator Author

I really like this idea, I think we should close this issue and continue discussions in those @emilsas created

@JoaquinBCh
Copy link
Contributor

With @nicolaslevy we are going to work on this.

@englishm
Copy link
Owner

englishm commented Dec 3, 2024

I really like the idea of using Web Components. If we implement the <video> element API as described in #10, that should also allow us to use media-chrome's generic UI elements and player.style themes like this great X-mas theme. I imagine we could also port some of the work already done in #12 over to that model, too.

@englishm
Copy link
Owner

englishm commented Dec 3, 2024

It's worth mentioning that the main way that the player is currently coupled to the site has to do with how the workers are configured to work with different build/packaging systems.

Before the transfork split, @rmallick6806 had a go at sorting that out in a fork, and I found I was able to use that package on a very bare-bones vanilla HTML/JS demo page like so: https://gist.github.com/englishm/1fed0f40de9f05bfc98e5aadd7b65d3b

There may be some details of interest in the commit history of @rmallick6806's moq-js fork, but I think newer work in that repo now tracks transfork changes.

I think if we can not only sort out the worker packaging/build issues, but also go all the way to a generic web component, that would be ideal. Getting to someplace similar to the above bare-bones demo might be a good intermediate milestone along the way for #11.

@JoaquinBCh
Copy link
Contributor

JoaquinBCh commented Dec 9, 2024

PR created.

@arturparkhisenko
Copy link

@englishm And one more cleanup, the PR was merged :)

@englishm englishm closed this as completed Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants