Closed laktek closed 10 years ago
Aww... Shucks...
Cool! Awesome to see this collection. Should we link to it in the footer?
:+1: I thought about a link too - what do you all think about embedding the entire youtube playlist below the check open event clashes
?
Getting inspiration from one-stop one-page info websites like frontend rescue
Yeah, it's a YouTube playlist anyways. :)
On Friday, September 26, 2014, Sayanee Basu notifications@github.com wrote:
[image: :+1:] I thought about a link too - what do you all think about embedding the entire youtube playlist below the check open event clashes?
— Reply to this email directly or view it on GitHub https://github.com/webuildsg/webuild/issues/82#issuecomment-56934151.
Regards,
Michael Cheng CM Mobile: +65 9185 5166 LinkedIn: http://sg.linkedin.com/in/miccheng
Getting inspiration from one-stop one-page info websites like frontend rescue
For this issue, I'd vote for a link and move on.
If you're considering a major design revamp, I'd prefer something like this:
WDYT? (this should be discussed in a separate issue though)
Definitely not a major revamp at the moment until in future when we have too many sections.
Agree with doing something quickly and integrating engineers.sg first. A simple embedding of the youtube playlist then ...
<iframe width="560" height="315" src="//www.youtube.com/embed/_8dAbjQqnT0?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1" frameborder="0" allowfullscreen></iframe>
feedback from @laktek to randomise the display of the video using this stackoverflow answer :+1:
:+1: thanks
trying to generate a random number between 1 and the total number of videos in the playlist
Looks good :)
Yeah, randomized would be good.
On Saturday, September 27, 2014, Alyssa Quek notifications@github.com wrote:
Looks good :)
— Reply to this email directly or view it on GitHub https://github.com/webuildsg/webuild/issues/82#issuecomment-57050243.
Regards,
Michael Cheng CM Mobile: +65 9185 5166 LinkedIn: http://sg.linkedin.com/in/miccheng
Had to use the max number of videos in the playlist as a static value 32 :cry: Seems like there's no easy way to just get the number without integrating the latest YouTube V3 API.
Let's watch the trend on how often new videos are added and then maybe we can scrap the playlist page for just the total number on the backend with jsdom :stuck_out_tongue_closed_eyes:
For now, static is cool i guess YAGNI
I think you should be using this embed link instead:
<iframe width="560" height="315" src="//www.youtube.com/embed/videoseries?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1" frameborder="0" allowfullscreen></iframe>
Cos it seems to be stuck at the 2nd video right now.
Remove fluidvids, replace it with this technique http://www.mademyday.de/css-height-equals-width-with-pure-css.html
One possible reason that the randomization not working in because iframe might be ignoring the src set after it's rendered (have to reconfirm this)
One solution is to not render the iframe in HTML, do it in runtime
var ifr = document.createElement('iframe')
ifr.src = src
ifr.width = width
ifr.height = height
ifr.id = 'playlist'
Ignore the previous comment :P
change this line to
From
| <iframe id="playlist" width="560" height="315" src="//www.youtube.com/embed/_8dAbjQqnT0?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1" frameborder="0" allowfullscreen></iframe>
To
| <iframe id="playlist" width="560" height="315" src="//www.youtube.com/embed/PhYriLMnLHI?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1" frameborder="0" allowfullscreen></iframe>
And this line to
From
newPlaylistAttribute = '//www.youtube.com/embed/_8dAbjQqnT0?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1&index=' + rand1toTotalVideo;
To
newPlaylistAttribute = '//www.youtube.com/embed/PhYriLMnLHI?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1&index=' + rand1toTotalVideo;
so every time a new video is added to this playlist, the url changes :unamused: and hence the randome indexing does not work and the video gets stuck to the first video of the old playlist.
now the url is:
//www.youtube.com/embed/MbZZy8GbCUE?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1
instead of
//www.youtube.com/embed/PhYriLMnLHI?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1
Have you tried using this one?
//www.youtube.com/embed/videoseries?list=PLECEw2eFfW7hYMucZmsrryV_9nIc485P1
@miccheng is doing an awesome job with this and it deserves more attention :)