GithubHelp home page GithubHelp logo

paulfioravanti / 80sfy Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 1.0 9.85 MB

Re-creation of http://www.80sfy.com in Elm

Home Page: https://www.paulfioravanti.com/80sfy/

License: MIT License

HTML 1.19% Elm 89.90% JavaScript 8.91%
elm elm-lang 80s vaporwave synthwave soundcloud giphy

80sfy's Introduction

80sfy

80sfy.com by Art Sangurai (original codebase repo) is a pretty cool site if you love synthwave music, so I decided to re-create it using Elm.

You can read all about things I learned during the development of this application on my blog post:

The site itself is deployed at:

Note that it's currently only optimised for the Google Chrome and Firefox desktop browsers, so it's probably best to view it with either of those.

Development

Dependencies

Setup

Global

This app was created using Create Elm App, and uses some commands that it provides, so install it globally with npm:

npm install -g create-elm-app

Application

git clone https://github.com/paulfioravanti/80sfy.git
cd 80sfy
npm install
elm-package install
cp .env.example .env

Giphy Integration

Create an account at Giphy Developers, create an app to get your API key, and copy/paste it into the .env file:

ELM_APP_GIPHY_API_KEY="Your API key here"

Run Server

elm-app start

Now, you should be able to use the app at the following address:

Note

If you get a 'error:03000086:digital envelope routines::initialization error' error, then change the command to the following:

NODE_OPTIONS=--openssl-legacy-provider elm-app start

Deployment

Deployment is managed in the push script. It uses gh-pages to deploy out to Github Pages.

./push

Note

If you get a 'error:03000086:digital envelope routines::initialization error' error, then change the command to the following:

NODE_OPTIONS=--openssl-legacy-provider ./push

Gotchas

Video Speed Controller Chrome Extension

  • If, like me, you use Chrome and have the Video Speed Controller extension installed, then make sure to add the following URLs to its blacklist, or you may find that that newly fetched GIFs will not display as expected:

    http://localhost:3000/
    http://www.80sfy.com/
    https://www.paulfioravanti.com/80sfy

Chrome Autoplay Policy

You may find that this issue may still be present, but I have found that it does not seem to exist any more...

Chrome's autoplay policies changed in April of 2018, which seems to affect this app when it is first loaded, and you attempt to press the play button on the controller (not the play button on the embedded Soundcloud player): nothing happens, and if you open up the Chrome inspector, in the console you will see a message like: "The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.".

This can be mitigated in two ways:

  1. When you play audio for the first time, click the Soundcloud play button, rather than the controller play button. This would seem to let the autoplay policy know that you, the user, have given permission for application widgets to play sound. Once you have done this the first time, all subsequent play/pause actions should work as expected.

  2. Change your Chrome autoplay policy flag by:

  • Inputting chrome://flags/#autoplay-policy in your browser address field
  • Setting the value in the dropdown menu to be "No user gesture is required".

This will enable the controller play button to work as expected when you attempt to play audio the first time the app is loaded.

Other Links

80sfy's People

Contributors

paulfioravanti avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

yonasad

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.