theNewDynamic / mfocus-tracking

1 stars 1 forks source link

[eick.com] Implement Audio Player #7

Closed budparr closed 3 years ago

budparr commented 4 years ago

Other tasks for Andy:

Set up an S3 bucket with CDN for audio clips (Andy) Test with 'plain' audio tag (Andy)

budparr commented 4 years ago

@andreweick Can you be more explicit about what you expect for "harden" - do you mean security issues?

andreweick commented 4 years ago

@budparr Harden is a poorly chosen word from me. I don't mean security relevant, changes, and I think I was thinking about the "repo migration" issue.

regisphilibert commented 3 years ago

@andreweick @budparr I recommend using AmplitudeJS which we're currently using on several projects.

We can keep full control of the HTML and CSS. So no extra dep are necessary except for the amplitude.js library.

What functionalities are we talking about? A simple, play/pause button ore more?

andreweick commented 3 years ago

@regisphilibert looks sweet -- my use case is the simplest of the simple, one 4-5 minute clip like. ^1. I usually iPhone record my kid practicing piano and post it for my dad to listen to. Very rarely (never?) will it more than one song.

[^1] The file mp3 doesn't play, in that I broke my Cloud Front CDN, but you get the idea

regisphilibert commented 3 years ago

Ok! @andreweick I created a PR for the Audioplayer shortcode: https://github.com/andreweick/eick.com/pull/53/

Know that you can only have one audioplayer per page.

andreweick commented 3 years ago

@regisphilibert netlify build error?

9:26:12 AM: Build ready to start
9:26:14 AM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
9:26:14 AM: build-image tag: v3.4.1
9:26:14 AM: buildbot version: bca3bbf1ce7c7ca2e2192b1683becc1d98c88c5b
9:26:14 AM: Fetching cached dependencies
9:26:14 AM: Failed to fetch cache, continuing with build
9:26:14 AM: Starting to prepare the repo for build
9:26:15 AM: No cached dependencies found. Cloning fresh repo
9:26:15 AM: git clone https://github.com/andreweick/eick.com
9:26:24 AM: Preparing Git Reference pull/53/head
9:26:26 AM: Different build command detected, going to use the one specified in the Netlify configuration file: 'hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL' versus 'hugo' in the Netlify UI
9:26:26 AM: Starting build script
9:26:26 AM: Installing dependencies
9:26:26 AM: Python version set to 2.7
9:26:27 AM: v12.18.0 is already installed.
9:26:28 AM: Now using node v12.18.0 (npm v6.14.4)
9:26:28 AM: Started restoring cached build plugins
9:26:28 AM: Finished restoring cached build plugins
9:26:28 AM: Attempting ruby version 2.7.1, read from environment
9:26:30 AM: Using ruby version 2.7.1
9:26:30 AM: Using PHP version 5.6
9:26:31 AM: 5.2 is already installed.
9:26:31 AM: Using Swift version 5.2
9:26:31 AM: Started restoring cached node modules
9:26:31 AM: Finished restoring cached node modules
9:26:31 AM: Installing NPM modules using NPM version 6.14.4
9:26:53 AM: > deasync@0.1.20 install /opt/build/repo/node_modules/deasync
9:26:53 AM: > node ./build.js
9:26:53 AM: `linux-x64-node-12` exists; testing
9:26:53 AM: Binary is fine; exiting
9:26:54 AM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
9:26:54 AM: > node -e "try{require('./postinstall')}catch(e){}"
9:26:54 AM: > core-js@2.6.11 postinstall /opt/build/repo/node_modules/parcel-bundler/node_modules/core-js
9:26:54 AM: > node -e "try{require('./postinstall')}catch(e){}"
9:26:54 AM: > parcel-bundler@1.12.4 postinstall /opt/build/repo/node_modules/parcel-bundler
9:26:54 AM: > node -e "console.log('\u001b[35m\u001b[1mLove Parcel? You can now donate to our open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/parcel/donate\u001b[0m')"
9:26:54 AM: Love Parcel? You can now donate to our open collective:
9:26:54 AM:  > https://opencollective.com/parcel/donate
9:26:55 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/@parcel/watcher/node_modules/fsevents):
9:26:55 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
9:26:55 AM: added 932 packages from 502 contributors and audited 935 packages in 23.563s
9:26:56 AM: 29 packages are looking for funding
9:26:56 AM:   run `npm fund` for details
9:26:56 AM: found 1 high severity vulnerability
9:26:56 AM:   run `npm audit fix` to fix them, or `npm audit` for details
9:26:56 AM: NPM modules installed
9:26:56 AM: Installing Hugo 0.73.0
9:26:58 AM: Hugo Static Site Generator v0.73.0-428907CC/extended linux/amd64 BuildDate: 2020-06-23T16:40:09Z
9:26:58 AM: Started restoring cached go cache
9:26:58 AM: Finished restoring cached go cache
9:26:58 AM: Installing Go version 1.14
9:27:09 AM: unset GOOS;
9:27:09 AM: unset GOARCH;
9:27:09 AM: export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.14.linux.amd64';
9:27:09 AM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.14.linux.amd64/bin:${PATH}";
9:27:09 AM: go version >&2;
9:27:09 AM: export GIMME_ENV="/opt/buildhome/.gimme_cache/env/go1.14.linux.amd64.env"
9:27:09 AM: go version go1.14 linux/amd64
9:27:09 AM: Installing missing commands
9:27:09 AM: Verify run directory
9:27:11 AM: ​
9:27:11 AM: ┌─────────────────────────────┐
9:27:11 AM: │        Netlify Build        │
9:27:11 AM: └─────────────────────────────┘
9:27:11 AM: ​
9:27:11 AM: ❯ Version
9:27:11 AM:   @netlify/build 3.1.10
9:27:11 AM: ​
9:27:11 AM: ❯ Flags
9:27:11 AM:   deployId: 5f2ea7f47f237387d4a083f8
9:27:11 AM:   mode: buildbot
9:27:11 AM:   timersFile: /tmp/substage_times.txt
9:27:11 AM: ​
9:27:11 AM: ❯ Current directory
9:27:11 AM:   /opt/build/repo
9:27:11 AM: ​
9:27:11 AM: ❯ Config file
9:27:11 AM:   /opt/build/repo/netlify.toml
9:27:11 AM: ​
9:27:11 AM: ❯ Context
9:27:11 AM:   deploy-preview
9:27:11 AM: ​
9:27:11 AM: ┌────────────────────────────────────┐
9:27:11 AM: │ 1. build.command from netlify.toml │
9:27:11 AM: └────────────────────────────────────┘
9:27:11 AM: ​
9:27:11 AM: $ hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL
9:27:12 AM: hugo: collected modules in 1344 ms
9:27:12 AM: Building sites … WARN 2020/08/08 13:27:12 Page.Hugo is deprecated and will be removed in a future release. Use the global hugo function.
9:27:12 AM: WARN 2020/08/08 13:27:12 Page.RSSLink is deprecated and will be removed in a future release. Use the Output Format's link, e.g. something like:     {{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}
9:27:13 AM: ERROR 2020/08/08 13:27:13 render of "page" failed: execute of template failed: template: _default/single.html:9:8: executing "scripts" at <partialCached "_head/scripts.html" .>: error calling partialCached: "/opt/build/repo/components/layouts-base/layouts/partials/_head/scripts.html:6:19": execute of template failed: template: partials/_head/scripts.html:6:19: executing "partials/_head/scripts.html" at <js>: can't evaluate field Build in type stringERROR 2020/08/08 13:27:13 render of "page" failed: execute of template failed: template: _default/single.html:9:8: executing "scripts" at <partialCached "_head/scripts.html" .>: error calling partialCached: "/opt/build/repo/components/layouts-base/layouts/partials/_head/scripts.html:6:19": execute of template failed: template: partials/_head/scripts.html:6:19: executing "partials/_head/scripts.html" at <js>: can't evaluate field Build in type stringERROR 2020/08/08 13:27:13 render of "page" failed: execute of template failed: template: _default/single.html:9:8: executing "scripts" at <partialCached "_head/scripts.html" .>: error calling partialCached: "/opt/build/repo/components/layouts-base/layouts/partials/_head/scripts.html:6:19": execute of template failed: template: partials/_head/scripts.html:6:19: executing "partials/_head/scripts.html" at <js>: can't evaluate field Build in type stringERROR 2020/08/08 13:27:13 render of "page" failed: execute of template failed: template: _default/single.html:9:8: executing "scripts" at <partialCached "_head/scripts.html" .>: error calling partialCached: "/opt/build/repo/components/layouts-base/layouts/partials/_head/scripts.html:6:19": execute of template failed: template: partials/_head/scripts.html:6:19: executing "partials/_head/scripts.html" at <js>: can't evaluate field Build in type stringTotal in 1649 ms
9:27:13 AM: Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:9:8: executing "scripts" at <partialCached "_head/scripts.html" .>: error calling partialCached: "/opt/build/repo/components/layouts-base/layouts/partials/_head/scripts.html:6:19": execute of template failed: template: partials/_head/scripts.html:6:19: executing "partials/_head/scripts.html" at <js>: can't evaluate field Build in type string​
9:27:13 AM: ┌─────────────────────────────┐
9:27:13 AM: │   "build.command" failed    │
9:27:13 AM: └─────────────────────────────┘
9:27:13 AM: ​
9:27:13 AM:   Error message
9:27:13 AM:   Command failed with exit code 255: hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL
9:27:13 AM: ​
9:27:13 AM:   Error location
9:27:13 AM:   In build.command from netlify.toml:
9:27:13 AM:   hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL
9:27:13 AM: ​
9:27:13 AM:   Resolved config
9:27:13 AM:   build:
9:27:13 AM:     command: hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL
9:27:13 AM:     commandOrigin: config
9:27:13 AM:     environment:
9:27:13 AM:       - REVIEW_ID
9:27:13 AM:       - HUGO_VERSION
9:27:13 AM:     publish: /opt/build/repo/public
9:27:13 AM: Caching artifacts
9:27:13 AM: Started saving node modules
9:27:13 AM: Finished saving node modules
9:27:13 AM: Started saving build plugins
9:27:13 AM: Finished saving build plugins
9:27:13 AM: Started saving pip cache
9:27:13 AM: Finished saving pip cache
9:27:13 AM: Started saving emacs cask dependencies
9:27:13 AM: Finished saving emacs cask dependencies
9:27:13 AM: Started saving maven dependencies
9:27:13 AM: Finished saving maven dependencies
9:27:13 AM: Started saving boot dependencies
9:27:13 AM: Finished saving boot dependencies
9:27:13 AM: Started saving go dependencies
9:27:16 AM: Finished saving go dependencies
9:27:19 AM: Error running command: Build script returned non-zero exit code: 1
9:27:19 AM: Failing build: Failed to build site
9:27:19 AM: Failed during stage 'building site': Build script returned non-zero exit code: 1
9:27:19 AM: Finished processing build request in 1m4.855573351s
regisphilibert commented 3 years ago

My bad, easier for you to do it yourself I think: Go to netlify toml and replace every HUGO_VERSION value by 0.74.3.

Thanks!

budparr commented 3 years ago

@andreweick Closing to clean this up. Just drop an email if you continue to have issues.