-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(web): add a web implementation #1886
Conversation
This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
FYI: This has been unreviewed for about 8 months, but I decided to give it a try. I manually integrated all the web implementation parts into our app and made a few adjustments, such as preventing multiple Shaka instances being registered. I also added support for Aside from that, the web component is quite solid. I'd love to see this integrated into the core (with some modifications) as it's very helpful and the API is almost identical. In case someone is interested how I did that (it's ugly, since I had to copy some source files because of some resolving issues). showtime-xyz/showtime-frontend@staging...feat/track-player I really like RNTP (beside of some hot reload issues) and its a solid library. I would love to see this merged, otherwise I'd be forced to maintain another fork, which is not helpful for the ecosystem imho. Some recap:
Pretty sure I did not test all of the cases (we only play a single track at a time), but I have fixed those above |
Thanks for checking it out @hirbod. I'm glad to hear it's working for you! This is definitely on our radar, and @jspizziri is part of the external core contributors and has been keeping us up to date on the work here. We're hard at work on the v4 release but I'm planning on taking a look at this once that's out :) |
@hirbod please submit PR's for all the work that you've done to improve things to my fork and I'll review and merge them in there. I've released my fork under @5stones/react-native-track-player and that's what I'm currently using (see the I'd greatly appreciate PR's for the issues you've identified to |
Thanks, @dcvz and @jspizziri, for the heads up. I'm glad to hear you guys have this on your radar. I can submit my minor bugfixes to your branch; they're straightforward. |
It's... complicated 😄. But no, I'm maintaining
Yep, I'm using v4 (which I'd recommend for you as well). There aren't that many BC changes between 3 & 4 and we've published a number of RC's. It's pretty close to being a formal v4 release and many folks, use it in prod. Regardless, any PR's you can send will make this a smoother process to get merged and released in the mainline in the coming months. Thanks! |
@jspizziri we started working on this feature again and I'd like to push my PRs to your repo. Would you mind to rebase to upstream and prepare a new version so I can incorporate some of the fixes? |
@jspizziri, after pulling in your branch, it appears that most of the issues I had are now resolved. I've PRs to your repo.
|
8f096c8
to
d768e69
Compare
@hirbod , I just did a rebase. It was a little messy due to all the upgrades done recently in the @dcvz just an FYI. Some of the improvements in the example app recently have caused some issues with web. Notably some things with the |
@jspizziri what kind of issues? Like those packages are not supported on web? or just typescript issues? |
@dcvz we discussed this on our call, but to leave a paper trail. The issues seemed to be specific with some of the new minor versions of the |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@dcvz I just finished my audit of the Currently Unimplemented
Stubbed But Not ImplementedAll the below stubbed methods can be seen here:
DeprecationsThere are several deprecated methods that I didn't implement. I'm personally not in favor of implementing currently deprecated APIs. Incorrectly ExposedCurrently, all of these getters/setters are public in the underlying Player class
Once you've taken a look at this LMK how you'd like to proceed and I can raise any issues in the issue tracker that we need to and fix whatever you want. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @jspizziri! Very clean implementation! I have mostly only minor comments. I did however notice that Whip (HLS) fails to load the duration / progress. More urgently though skipping past Whip throws an error. Is it perhaps the media type - next track is a live stream.
Also we probably (doesn't have to be part of this PR) want to leverage navigator.mediaSession to communicate with the OS and take advantage of media keys.
In my project where I control the files played, I wouldn't want to pull all those extra dependencies when I just need to play mp3s. So I'd suggest to let developers configure support for extra formats as needed. |
@SpadarShut , while allowing developers to configure support for extra formats sounds like an appealing option, the implementation of something like that would be quite tricky. |
Sure, I get it. Just wanted to share my context, that it would be nice to avoid those extra deps if possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jspizziri this looks good to go on my end! Looks like CI typescript check is failing, will be happy to merge once that's green
Co-authored-by: David Chavez <[email protected]>
…ument its installation
@dcvz I fixed the ci in this commit and I rebased on I think we should be good to go once the iOS job finishes taking its sweet time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
time to merge this @jspizziri! 🎉
Awesome work here @jspizziri! |
@dcvz huzzah! What are your thoughts on a minor release? Also, lmk if you'd like to see the docs site enhanced to incorporate the documentation (instead of just the readme). |
@jspizziri i think I'll be making a minor release tomorrow which will include web -- if there are any things you'd like to add to the docs, let's do it. I can only think of a few places where we say we support iOS, Android and Windows. |
@dcvz here's the web implementation I've been working on. You can test it out via the following:
yarn example web:start