{"id":13715039,"url":"https://github.com/benjamindenboer/FramerAudio","last_synced_at":"2025-05-07T03:31:07.833Z","repository":{"id":148913428,"uuid":"107855039","full_name":"benjamindenboer/FramerAudio","owner":"benjamindenboer","description":"Design with Audio in Framer (https://framer.com).","archived":false,"fork":false,"pushed_at":"2022-08-22T15:25:40.000Z","size":45,"stargazers_count":47,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T21:11:22.527Z","etag":null,"topics":["audio","audio-player","design","module"],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benjamindenboer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-10-22T10:06:36.000Z","updated_at":"2021-01-15T19:07:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"99bc4982-d238-42e7-a87e-cf6d5cd34652","html_url":"https://github.com/benjamindenboer/FramerAudio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjamindenboer%2FFramerAudio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjamindenboer%2FFramerAudio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjamindenboer%2FFramerAudio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjamindenboer%2FFramerAudio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benjamindenboer","download_url":"https://codeload.github.com/benjamindenboer/FramerAudio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252806419,"owners_count":21807199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","audio-player","design","module"],"created_at":"2024-08-03T00:00:53.268Z","updated_at":"2025-05-07T03:31:07.802Z","avatar_url":"https://github.com/benjamindenboer.png","language":"CoffeeScript","funding_links":[],"categories":["Modules"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://d.pr/i/bRqvKY+\" width=\"160\" alt=\"icon\"\u003e\u003cbr\u003e\n  Framer Audio\u003cbr\u003e\n  \u003cbr\u003e\n\u003c/h1\u003e\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e  \n  \u003cimg src=\"https://d.pr/i/tPYZvA+\" width=\"840\" alt=\"banner\"\u003e\n  \u003cbr\u003e\n  \u003ch6 align=\"center\"\u003eINTRODUCTION\u003c/h6\u003e\n  \u003cp align=\"center\"\u003eFrom music player mocks in \u003ca href=\"https://framer.com/features/design?utm_source=github\u0026utm_medium=link\u0026utm_campaign=framer_audio_benjamin\"\u003eDesign\u003c/a\u003e, to fully functional audio players in \u003ca href=\"https://framer.com/features/code?utm_source=github\u0026utm_medium=link\u0026utm_campaign=framer_audio_benjamin\"\u003eCode\u003c/a\u003e. A \u003cstrong\u003eFramer\u003c/strong\u003e module that allows you to design audio interfaces for iOS, Android, Desktop and more—and then bring them to life. From play buttons to volume sliders.\u003c/p\u003e\n \u003cp align=\"center\"\u003e\u003ca href=\"https://youtu.be/KCeOa9F3L9A\"\u003eWatch the video.\u003c/a\u003e\u003c/p\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n## Overview\nAll included properties and methods.\n\n\n| Properties    | Type          | Parameters | Description |\n| ------------- | ------------- | ----------- |----------- |\n| Audio.wrap    | Method  |  `play, pause`  | Wrap audio object around 2 layers. |\n| audio   | String  |   | Source of the audio file. |\n| showProgress   | Method  | `slider` | Use slider to manipulate audio progress. |\n| showVolume  | Method  | `slider` | Use slider to manipulate audio volume. |\n| showTime | Method  | `time` | Display current time with a TextLayer. |\n| showTimeLeft | Method  | `timeLeft` | Display time left with a TextLayer. |\n\nAlso included: the `Slider.wrap` method.\n\n| Properties    | Type          | Parameters | Description |\n| ------------- | ------------- | ----------- |----------- |\n| Slider.wrap    | Method  |  `background, fill, knob`  | Wrap slider logic around 3 layers. |\n\n\n\u003cbr\u003e\n\n## Get Started\n[Download the example file](https://framer.cloud/BsbYC) or read on for step-by-step instructions.\n\nFirst, grab the `audio.coffee` file and place it within the `/modules` folder (located within your `.framer` folder).\nThen, to include the module, `require` both the `Audio` and `Slider` classes:\n\n```\n# Include the module\n{Audio, Slider} = require \"audio\"\n```\n\nNext, you’ll likely want to define two basic states in Design: a *play* and *pause* state. I’ve named these layers `play` and `pause` respectively, and made them targetable in Code. Next, I’ll wrap the `Audio` object around these layers, and store the entire object in a variable named `audio`.\n\n```\n# Wrap AudioLayer\naudio = Audio.wrap(play, pause)\naudio.audio = \"audio.mp3\"\n```\n\nThe layers are automatically made part of the same object—and the play and pause interactions are functional by default. \n\n---\n\n## Volume \u0026 Progress Sliders\nIf you’d like to add volume or progress sliders, you’ll either need to define a [SliderComponent in Code](https://framer.com/docs/?utm_source=github\u0026utm_medium=link\u0026utm_campaign=framer_audio_benjamin#slider.slidercomponent), or use the included `Slider.wrap` method. \n\n```\n# Slider via Code\nslider = new SliderComponent\n\n# Slider via Design\nslider = Slider.wrap(bg, fill, knob)\n```\n\nThe `Slider.wrap` method takes three parameters:\n- `background` — The background layer of the slider.\n- `fill` — The fill layer of the slider.\n- `knob` – The knob layer of the slider.\n\nAll of these can be styled completely in the design. The method wraps a component around these 3 layers to handle all of the sliding functionality for you.\n\nOnce you have set-up a slider, you can make it reflect the **progress** or the **volume**.\n\n- `showProgress(layer)` — adjust audio track progress.\n- `showVolume(layer)` — adjust audio track volume.\n\n```\n# Show and edit audio progress \naudio.showProgress(slider)\n\n# Show and edit audio volume \naudio.showVolume(slider)\n```\n\n---\n\n## Time \u0026 Time Left\nThe module includes two methods that will automatically update the `text` contents of a `TextLayer` to reflect either the current track time, and the time left. These will automatically update—also when a progress slider is being edited.\n\n- `showTime(layer)` — show current time with a text layer.\n- `showTimeLeft(layer)` — show current time left with a text layer.\n\n```\n# Show the current time and time left\naudio.showTime(time)\naudio.showTimeLeft(timeLeft)\n```\n\nPlease note that these methods only work with **TextLayers** from either Design or Code.\n\n---\n\n## Examples\n- **[Play, Pause](https://framer.cloud/BsbYC)**. Two artboards, one Audio object.\n- **[Slider Wrapping](https://framer.cloud/BlHxd).** From 3 layers in Design to an interactive slider in Code.\n- **[Audio Player](https://framer.cloud/pHMBF)**. With current time, duration and progress sliding.\n\n## More Resources\n- [W3S Audio DOM Reference](https://www.w3schools.com/tags/ref_av_dom.asp).\n- [MDN Audio Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio).\n- [MDN Media Events](https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events).\n\n---\n\n## Contact\n- Follow me \u003ca href=\"https://twitter.com/benjaminnathan\"\u003e@benjaminnathan\u003c/a\u003e.\n- Follow \u003ca href=\"https://twitter.com/framer\"\u003e@framer\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjamindenboer%2FFramerAudio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenjamindenboer%2FFramerAudio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjamindenboer%2FFramerAudio/lists"}