-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Configuration #4
Conversation
One important thing to note is that if you pass in a configuration object via props it will completely replace the default one. If preserving the other defaults while changing one thing is important to you, I can try to merge the configuration objects instead. |
@@ -38,6 +38,15 @@ export default class App extends Component { | |||
this.setState(state) | |||
} | |||
} | |||
onConfigSubmit = () => { | |||
var config |
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.
You should use let
here I think
Hi @Fauntleroy. Many thanks for your contribution! I'm wondering if a prop for a config for each player is polluting the top level props too much, and maybe something like a I also wonder if the deep structure is slightly overkill at this point, and whether we should just use |
Also, I've just pushed |
No problem, @cookpete! I'm more than happy to contribute to anything that'll rid me of JWPlayer (and the delicate Concerning the use of top-level props like
|
33ddd8e
to
9d8850a
Compare
I responded to the code review comments, updated the way default |
@@ -6,9 +7,20 @@ import Base from './Base' | |||
const IFRAME_SRC = 'https://player.vimeo.com/video/' | |||
const MATCH_URL = /https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/ | |||
const MATCH_MESSAGE_ORIGIN = /^https?:\/\/player.vimeo.com/ | |||
const DEFAULT_IFRAMEPARAMS = { |
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.
Can we call this DEFAULT_IFRAME_PARAMS
?
Typo: |
Looking good Tim. I've made a few more notes, then we should be more or less good to merge :) |
896a20a
to
a537cd9
Compare
Variable names changed, commit message amended. |
Nice work. Could you squash the commits up into the different features you added? I think it could just be one for the config stuff, and one for the volume setting fixes. Leaving in fixup commits feels a bit untidy. |
a537cd9
to
be63e27
Compare
be63e27
to
d984daf
Compare
Commits squashed. |
Objective
Allow configuration of media players via
props
, specifically theclient_id
of the SoundCloud player.What I did
soundcloudConfig
,vimeoConfig
, andyoutubeConfig
props.defaultProps
accordingly.How to verify
npm run start
Screenshots