diff --git a/src/register-service-worker.js b/src/register-service-worker.js index 65aa951..9660b94 100644 --- a/src/register-service-worker.js +++ b/src/register-service-worker.js @@ -22,7 +22,7 @@ export default function register () { } window.addEventListener('load', () => { - const swUrl = `/service-worker.js` + const swUrl = '/service-worker.js' if (isLocalhost) { // This is running on localhost. Lets check if a service worker still exists or not. diff --git a/src/services/camera.js b/src/services/camera.js index 8b2f2d8..6eebbc5 100644 --- a/src/services/camera.js +++ b/src/services/camera.js @@ -10,7 +10,7 @@ export async function getCamera (shouldFaceUser) { preferredFacingMode ].map(facingModeConstraint => ({ video: { facingMode: facingModeConstraint } })) - for (let constraints of constraintsList) { + for (const constraints of constraintsList) { try { console.log(constraints) return { diff --git a/src/services/capture.js b/src/services/capture.js index 139d8e2..f38a685 100644 --- a/src/services/capture.js +++ b/src/services/capture.js @@ -7,7 +7,7 @@ import { GIF_FRAME_RATE } from '/constants.js' -export function capture({ mediaStream, facingMode }, duration, progressCallback) { +export function capture ({ mediaStream, facingMode }, duration, progressCallback) { const delayTime = 1000 / GIF_FRAME_RATE const totalFrames = duration / 1000 * GIF_FRAME_RATE @@ -35,7 +35,7 @@ export function capture({ mediaStream, facingMode }, duration, progressCallback) video.removeEventListener('canplaythrough', afterVideoAvailable) }) - function afterVideoAvailable() { + function afterVideoAvailable () { const canvas = document.createElement('canvas') canvas.width = GIF_WIDTH canvas.height = GIF_HEIGHT @@ -51,7 +51,6 @@ export function capture({ mediaStream, facingMode }, duration, progressCallback) const destinationRectangle = makeRectangle(0, 0, canvas.width, canvas.height) const soureRectangle = crop(makeRectangle(0, 0, video.videoWidth, video.videoHeight)) - captureFrame() const intervalId = setInterval(captureFrame, delayTime) @@ -95,4 +94,4 @@ export function capture({ mediaStream, facingMode }, duration, progressCallback) } } }) -} \ No newline at end of file +} diff --git a/src/services/countdown.js b/src/services/countdown.js index 620dd1e..caddf5a 100644 --- a/src/services/countdown.js +++ b/src/services/countdown.js @@ -4,7 +4,7 @@ export function countdown (n, delay, onStep) { return task(resolver => { let count = 0 - let intervalId = setInterval(() => { + const intervalId = setInterval(() => { count++ onStep(n - count) diff --git a/src/views/components/encoding-loader.vue b/src/views/components/encoding-loader.vue index 8845285..8675979 100644 --- a/src/views/components/encoding-loader.vue +++ b/src/views/components/encoding-loader.vue @@ -26,7 +26,7 @@ export default { computed: { pathDashOffset () { if (this.percent) { - let to = this.progressPerimeter * ((100 - this.percent) / 100) + const to = this.progressPerimeter * ((100 - this.percent) / 100) return Math.max(0, to) // Prevent negative number } return this.progressPerimeter