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

Customized Style? #27

Closed
enigmablue opened this issue May 20, 2020 · 9 comments
Closed

Customized Style? #27

enigmablue opened this issue May 20, 2020 · 9 comments

Comments

@enigmablue
Copy link

Hi mate,

I had to fork this to fix two issues, one was that start and end time (which i think you fixed in the latest). fixed by adding date.setMinutes(0); date.setHours(0);

But also the style where the controls had some align issue.
alignerror

I had to manually increase a marginBottom: -150 to the mediacontrols.style.ts

But i much prefer not to fork and have a custom git (as it causes issues to my yarn).
Wonder if we can fix it here and have the styles in the ?

@charliesbot
Copy link
Owner

I haven’t seen those UI issues. Do you have an example that I can see?

And yeah, the issue about the wrong times is already fixed in the latest release 👌

@enigmablue
Copy link
Author

hey Charlie thanks. I checked the latest and it looks better somehow. But i do have a problem when i can't move the bar it clashes with my other component :( which causes the control to not be usable. I do have a button below it unfortunately so i can't really move that text down easily.

image

My other problem was that the controls show up automatically default to true. I had to change that to false in mediacontrols.tsx

const [opacity] = useState(new Animated.Value(0));
const [isVisible, setIsVisible] = useState(false);

@enigmablue
Copy link
Author

the last thing is when the video is set to repeat true, the controls does not restart when the video repeats.

@charliesbot
Copy link
Owner

charliesbot commented May 22, 2020

@enigmablue do you have an example that I can replicate? I would need to recreate this, because from the screenshot it looks to me that you wrapped this component in a flexbox container.

I do need a code example to debug this.

Regarding the last comment, in version 2.0.3 you can do that with the prop showOnStart={false}

What do you mean by "the controls doesn't restart"?

@enigmablue
Copy link
Author

enigmablue commented May 25, 2020 via email

@enigmablue
Copy link
Author

Hi Charlie, i created a code example that you can try to debug this. Its quite basic. one thing to note its within a native-base component hmm.

Also one thing to note that you will see, when the video is repeat = {true} the controls dosen't reset. I dont know how to make that work either.

https://github.com/enigmablue/mediasample

image

@charliesbot
Copy link
Owner

thanks for the sample! Will take a look

@charliesbot
Copy link
Owner

ok, I took a look into your question about the controls that doesn't change if you use repeat in the video player.

Please notice that this library is just a UI overlay on top of any player. That means that I don't control how the controls behave, that's on your side.

I added more cases in the example project (PR -> #32).

If you enable the repeat option, that means you don't need the state ENDED, as you will never reach it. Based on that, I just removed that line in the onEnd event.

@enigmablue
Copy link
Author

Please notice that this library is just a UI overlay on top of any player. That means that I don't control how the controls behave, that's on your side.

thanks man. I appreciate that. Its also with your help on mentioning those cases that helps us to understand how to manage / use the controls better. Thanks!

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

2 participants