Closed rin closed 4 years ago
@rin we should spec out requirements list
playing like on the website, dimming the background?
See this PR and discussion on something I tried with the light
mode of react-player
. I think it might not be the way to go, though … https://github.com/aimementoring/aime-portal/pull/168
Hey @rin just fleshing out your list from above a bit more. This is some of what I'm thinking. @charliemckenzie can you also include an example design of what you are looking at for videos on the website please ...
So, I've done another comparison between videojs
and react-player
.
I think react-player
is best for videos from a lot of different platforms and when you don't care too much about how your player looks, while videojs
is best if you want to style your player and play your own videos.
My main problem with react-player
is that it is very difficult to style. Because I'm not exactly known to be a CSS magician, I would appreciate somebody else having a look, though. Maybe @kbardi ? (Kevin, if there were specific reasons why you wanted to use react-player
, please add your comments.)
About the iFrame – youtube videos will technically use an iFrame, but that doesn't mean you can't customise the play button etc (you can still hide the youtube player controls, and probably even the youtube logo by passing some options).
My questions would be:
Did we actually have any real problems with videojs
apart from it not working that well together with React (which we were able to work around, so it's not a concern anymore) and causing a lot of obscure issues in Bugsnag (which might be the same for any other player – especially with mobile browsers)?
Are we mostly using our own videos from the media-api or S3 or hosted on vimeo? I think for all of the content apart from potential Sunday Kindness videos, we are …?
Trying to think of where we will use videos, I guess it's mostly to educate people about AIME ("About AIME" section on the website, training for new mentors), so that will be our own videos, and only very few "external" videos (especially because these could be deleted or replaced with other videos, so we don't control that content?).
(Sorry, accidental click!)
I don't think the player has to be styled tooo crazily. Even if it's just pretty standard to start with that's fine with me :) as long as it is possible to style it in the future hahaha. In terms of what videos will look like on the website, that's a good question. I've attached a pic from the homepage, where ultimately, Id also like the video thumbnail to be the background of the section (again, if that's too crazy we can come up with something else hahaha)
To be honest, I was thinking of keeping it pretty simple with the videos. Kinda like a variation on this (i love the scrubber preview though <3
As for where the videos will be... they'll be everywhere hahaha. Jack loves his videos, and I think they really do convey AIME's personality well. Challenge is we'll need to make this accessible to everyone, which is a struggle when even Australia has shite internet hahaha.
@rin yay sketches :)
Thanks for adding so much detail here crew!
So I've had a dive into the docs for react-player and I don't think styling should actually be too difficult.
i.e. here is an example of using a HLS streaming url and I've added some basic custom content/styles around the video player https://jsfiddle.net/uk18v6Ls/14/ // We'd need to build this sort of structure into ours and then should also be able to support inline and popup players I'd think.
What I wasn't able to get working while looking at this was a custom play button with thumbnail/cover initially hiding the controls. But we totally should be able to get this sort of thing working with the light
prop but I couldn't spend the time to figure it out. @rin @kbardi this might be enough info for you to pick that up?
I found this really helpful to look at all the options https://cookpete.com/react-player/
@rin I also wasn't able to get the vimeo m3u links working with the demo player. Saw your PR on the repo but also this https://github.com/CookPete/react-player/issues/423
@mischacolley haha awesome, how come I didn't find that second link? I was wondering whether I could force the player to treat is just as a file, but didn't investigate it further. So I'd say we can make it work and the open issue is not a show stopper.
I think we should try to get the custom play button to work without the light
mode, because as I said here https://github.com/aimementoring/aime-portal/pull/168#issue-262951397 (see the gif!), in the light mode the player is only loaded when you click the play button, and then you have to click play again to actually play it, and that feels not very usable and … cumbersome? 🥒
So, as for next steps I wonder if we should
light
player but let's see.I don't know how strong @kbardi s CSS game is, but I know I don't know how to do the custom play button because I've already tried :) . I can get started and then leave the styling to the pros.
We already have a video player component in Blueprint now, but in the styleguide it's used with vimeo and youtube, so it just looks like a vimeo/youtube player right now.
@rin 👍🏼
Re light
mode. Sounds like I may be totally wrong but I'd assume in light mode that the custom play button could be setup to trigger the play in autoplay mode and avoid the double click?
1 & 2). 👍🏼If the button functionality is there I can totally help with basic styles for it :)
So, the player looks like this if we're just playing a file:
We can make it even cleaner by removing the current and total time (this works in Chrome:
video::-webkit-media-controls-current-time-display, video::-webkit-media-controls-time-remaining-display { display: none; }
).
@bronz3beard is now working on updating this video component with assistance from @kbardi & @rin & @lulen11 ) -
Had to read up on this whole issue because it's been a while! To sum it up, I think we decided for react-player
(see comments above on how to style it).
The biggest open question for me was, can we avoid the two clicks you need to do to play the video when using the light mode. Other than that, happy for you @bronz3beard to just experiment a little with styling, (I think we're going for a minimalistic look anyway) and usability (the mentioned two clicks …).
Ah, and this might be helpful/interesting or maybe not: https://github.com/aimementoring/aime-portal/pull/168 @bronz3beard
hey @rin and @bronz3beard were you able to connect on this one? :)
@lulen11 I think Rin is on leave for the day, but looking to make a time for the meeting this Friday late afternoon.
Note to self and Rory, remember to use the latest version of react player (1.14.2 I think) because an issue we had and submitted a PR for was merged and is in master now.
hey @rin @bronz3beard could we please get a status checkin for this component? cc. @mischacolley
We'll need to swing back into it asap.
Things we want to check are:
@lulen11 @rin All of the above works I have also added two new links to test live streaming. The only thing I was not able to do is to get it to work locally, I'm hoping rin will have some luck with that. 👍
Thanks @bronz3beard. I had a look for where this is component work is and I thiiiink it's on https://github.com/aimementoring/blueprint/pull/163 right? Because this is connected with https://github.com/aimementoring/blueprint/pull/31 but that's closed now. I can relink those ones but want to confirm that's right with you two...
@lulen11 I would say this is the issue for the pr #163 but we can add anything to this or the pr from old issues/pr that could be useful to keep logged
@bronz3beard you tagged the wrong person man
@lulen11 @rin can this be closed / if there are remaining issues maybe we close and break out into their own issues ...
I think we can close this and there's actually nothing open anymore …? @bronz3beard
https://www.dropbox.com/s/67dq409niwyae79/Screenshot%202019-03-13%2023.06.13.png?dl=0