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

Support for posters? #62

Closed
Morganjackson opened this issue May 17, 2016 · 7 comments
Closed

Support for posters? #62

Morganjackson opened this issue May 17, 2016 · 7 comments

Comments

@Morganjackson
Copy link

Is there anyway to set the poster along with the url?

 url={url} poster={poster}

The player is working perfectly except that it often shows a black screen for mp4 videos and doesn't always show the max res for YouTube, so it would be great if we could optionally set the poster manually.

@denisflorkin
Copy link

denisflorkin commented May 19, 2016

Hello, I'm curious why this issue has been closed? I think the ability to manually set poster might be really useful for the FilePlayer in certain instance. I'm using react-player to play mp3 from Deezer, and the FilePlayer has no idea of the context of this (Deezer and the existence of a linked illustration) so the ability to pass a props poster or ìllustration to just the file player is really interesting imho.
I have a version to propose that allow optionnally passing poster props to FilePlayer but i'm having issue with passing the test

@cookpete
Copy link
Owner

I have a version to propose that allow optionnally passing poster props to FilePlayer but i'm having issue with passing the test

This is a good idea so I'll reopen the issue, although I think something like passing an attributes object to apply to the video or audio element will cover all use cases, including the currently open PR.

doesn't always show the max res for YouTube

I imagine custom YouTube posters would be quite fiddly as they are rendered inside the YT player frame?

@cookpete cookpete reopened this May 19, 2016
@cookpete
Copy link
Owner

As of 0.6.0 you can now do:

<ReactPlayer
  url={url}
  fileConfig={{ attributes: { poster: 'poster.jpg' } }}
/>

@denisflorkin
Copy link

Indeed great way of killing two birds in one stone, and as of youtube poster customizations, transparent iframe until the initial play of a video to let place to poster but would require a node around the iframe (or maybe pseudo elements), or maybe those new import thing, there may be a way to hack/access the iframe style it, but this become fancy. Also I wonder if it's not possible that

doesn't always show the max res for YouTube

was due to the fact that the max res image was made from a lower video resolution (and would appear consequently crappy) or maybe youtube did not create a max res image because of this reason and was serving the max possible res...

@krismeister
Copy link

@denisflorkin the youtube bug you mention is
https://code.google.com/p/gdata-issues/issues/detail?can=2&start=0&num=100&q=&colspec=API%20ID%20Type%20Status%20Priority%20Stars%20Summary&groupby=&sort=&id=4590

its an issue with using the youtube api, which this project needs for all the event proxying.

@cookpete , thanks for the post example, and thank you for making such a great player.

@johnandblue
Copy link

johnandblue commented Oct 16, 2017

Hi, @cookpete I was also interested in putting a poster in a webm file, and I follow your comment:

As of 0.6.0 you can now do:

<ReactPlayer
  url={url}
  fileConfig={{ attributes: { poster: 'poster.jpg' } }}
/>

and it works, but it says: ReactPlayer: fileConfig is deprecated, please use the config prop instead – https://github.com/CookPete/react-player#config-prop
but if I change fileConfig for config as prop, then doesn't recognize the poster...
any recommendation?


edit: Answering to myself:

config={ { file: { attributes: { poster: props.backgroundImage.url } } } }

@cookpete
Copy link
Owner

@johnandblue Yeah the changes to config props are outlined in the readme. 👍

david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue Dec 23, 2018
david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue May 23, 2020
albanqoku added a commit to albanqoku/react-player that referenced this issue Feb 24, 2021
Webmaster1116 added a commit to Webmaster1116/video-player that referenced this issue May 20, 2021
webmiraclepro added a commit to webmiraclepro/video-player that referenced this issue Sep 9, 2022
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