edirom-audio-player

Audio player web component

https://github.com/edirom/edirom-audio-player

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.7%) to scientific vocabulary

Keywords

edirom-online
Last synced: 6 months ago · JSON representation ·

Repository

Audio player web component

Basic Info
  • Host: GitHub
  • Owner: Edirom
  • License: gpl-3.0
  • Language: JavaScript
  • Default Branch: dev
  • Homepage:
  • Size: 5.34 MB
Statistics
  • Stars: 2
  • Watchers: 6
  • Forks: 0
  • Open Issues: 6
  • Releases: 2
Topics
edirom-online
Created almost 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Code of conduct Citation

README.md

GitHub License GitHub release fair-software.eu

Edirom Audio Player Web Component

This web component implements an audio player based on the HTML5 audio facility. It is intended to be used in tbe Edirom Online, but can also be (re-)used in other web applications. No compilation or building is necessary to use the web component. There are no dependencies as it is based on plain JavaScript.

As this repository only contains the bare JavaScript-based component, there is a separate demo suite for web components developed in the Edirom Online Reloaded project, where the component can be seen and tested.

How to use this web component

  1. Clone the repository into a directory of your choice
  2. Include the path to the web component's JavaScript file into the <head> an HTML page html <script src="path/to/edirom-audio-player.js"></script>
  3. Include a custom element (this is specified and can be processed by the component) into the <body> of the HTML page. The attributes of the custom element are used as parameters at initialization of the component and changing them (manually or programmatically) can control the components state and behaviour during runtime. The state changes of the web component are communicated outwards via custom events (called 'communicate-{change-type}-update'). The component/document that instantiates the web component (its parent) can listen (via event listeners which have to be implemented individually) and react to the communicated state changes if necessary. The separation of inward communication (via custom element's attributes) and outward communication (via custom events) is esp. necessary to handle frequently populated information like currentTime of the audio player and avoid interference between reading and writing info about the component's state. html <edirom-audio-player track="0" tracks='[{"title": "Title 1", "composer": "Composer 1", "work": "Work 1", "src": "https://example.com/sound.mp3", "type": "audio/mpeg"}, ... more tracks ... ]' height="500px" width="500px" state="pause" start="0.0" end="10.0" playbackrate="1.0" playbackmode="all" display-mode="controls-md"> </edirom-audio-player> N.B.: end and playbackmode are not yet implemented

Parameters

Note: All attribute values are strings internally, the data type information below indicates the necessary format of the attribute value.

| Parameter | Data type | Description | default | |---------------|---|---|---| | tracks | json | array of tracks: [{"title": "Track 1", "composer": "Composer 1", "work": "Work 1", "src": "path_to_audio_file_1.mp3", "type": "audio/mpeg"}, ... ] | | |---------------|---|---|---| | track | integer | pointer to current track (also used on startup to play track with supplied index number in json array) | 0 | | state | string | state of audio player (play, pause) | pause | | time | double | pointer to current timepoint in player (also used for initial startup position) | 0.0 | | end | integer | pointer to time when the playback should be stopped automatically | | | playbackrate | double | speed of playback | 1.0 | | playbackmode | string | mode of playback (repeat-one, repeat-all, shuffle) | repeat-all | | --- | --- | --- | --- | | height | string | height of player in pixels (px) or percent (%) | 500px | | width | string | width of player in pixels (px) or percent (%) | 500px | | display-mode | string | preference for displaying "controls-(sm|md|lg)" and/or "tracks-(sm|md|lg)" | controls-md |

Owner

  • Name: Virtueller Forschungsverbund Edirom
  • Login: Edirom
  • Kind: organization
  • Location: Germany

Citation (CITATION.cff)

cff-version: 1.2.0
title: Edirom Audio Player Web Component
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Daniel
    family-names: Jettka
    email: daniel.jettka@uni-paderborn.de
    affiliation: Universität Paderborn
    orcid: 'https://orcid.org/0000-0002-2375-2227'
repository-code: 'https://github.com/Edirom/edirom-audio-player'
abstract: >-
  This web component implements an audio player based on the
  HTML5 audio facility. It is intended to be used in tbe
  Edirom Online, but can also be (re-)used in other web
  applications. No compilation or building is necessary to
  use the web component.
license: MIT

GitHub Events

Total
  • Issues event: 1
  • Watch event: 1
  • Push event: 4
Last Year
  • Issues event: 1
  • Watch event: 1
  • Push event: 4

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • daniel-jettka (7)
Pull Request Authors
  • daniel-jettka (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/fair-software.yml actions
  • fair-software/howfairis-github-action 0.2.1 composite