Skip to content

Feature: Added music streaming activity with CO2 factor - #66

Open
ZarrarPeshimam wants to merge 1 commit into
Eshaan-byte:mainfrom
ZarrarPeshimam:feature/music-streaming
Open

Feature: Added music streaming activity with CO2 factor#66
ZarrarPeshimam wants to merge 1 commit into
Eshaan-byte:mainfrom
ZarrarPeshimam:feature/music-streaming

Conversation

@ZarrarPeshimam

Copy link
Copy Markdown

Description:

This PR introduces music streaming as a distinct activity type in the Carbon Tracker app. Users can now track their music consumption (Spotify, Apple Music, etc.) separately from video streaming, allowing for more accurate carbon footprint calculations and personalized reduction strategies.


Close issue: #1

Changes Included:

  • Added music_streaming to ActivityType in src/types/index.ts.
  • Added CO₂ factor for music streaming: 8g per hour in src/constants/co2Factors.ts.
  • Updated ActivityForm.tsx to include a form field for music streaming.
  • Ensured the form UI is consistent with existing activity fields.
  • Properly typed changes for TypeScript compatibility.

Feature Details / Acceptance Criteria:

  • Music streaming appears as a new activity option in the form.
  • CO₂ calculations for music streaming work correctly.
  • UI is consistent and fully functional.

Demo:

bandicam.2025-10-21.11-35-58-204.mp4

Reason / Problem Statement:

Previously, the app only tracked general streaming. Music streaming has a different carbon footprint compared to video streaming. Tracking it separately provides more granular insights into users’ digital carbon footprint.


Notes / Next Steps:

  • Adding music_streaming in weekly activity chart [beyond scope of allotted issue]
  • Update any analytics or leaderboards if they include streaming activity breakdowns.

@Eshaan-byte, Please review my PR as part of hacktoberfest

@ZarrarPeshimam
ZarrarPeshimam force-pushed the feature/music-streaming branch from bb83471 to d39dbfd Compare October 23, 2025 10:10
@ZarrarPeshimam

Copy link
Copy Markdown
Author

@Eshaan-byte, Can u plz review my PR for hacktober?

@ZarrarPeshimam

Copy link
Copy Markdown
Author

@Eshaan-byte, Can u plz review my PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant