diff --git a/Audio Player/images.jpg b/Audio Player/images.jpg new file mode 100644 index 00000000..b54a26ea Binary files /dev/null and b/Audio Player/images.jpg differ diff --git a/Audio Player/index.html b/Audio Player/index.html new file mode 100644 index 00000000..737237b6 --- /dev/null +++ b/Audio Player/index.html @@ -0,0 +1,14 @@ + + + + Music Player + + + +

Audio Player

+ + + + + + \ No newline at end of file diff --git a/Audio Player/manifest.json b/Audio Player/manifest.json new file mode 100644 index 00000000..3f3064be --- /dev/null +++ b/Audio Player/manifest.json @@ -0,0 +1,26 @@ +{ + "manifest_version": 3, + "name": "Audio Player", + "version": "1.0", + "description": "A simple music player for playing uploaded audio files.", + "action": { + "default_popup": "index.html" + }, + "icons": { + "48": "images.jpg", + "128": "images.jpg" + }, + "permissions": [ + "storage" + ], + "web_accessible_resources": [ + { + "resources": [ + "index.html" + ], + "matches": [ + "" + ] + } + ] +} \ No newline at end of file diff --git a/Audio Player/scripts/script.js b/Audio Player/scripts/script.js new file mode 100644 index 00000000..968d7ae6 --- /dev/null +++ b/Audio Player/scripts/script.js @@ -0,0 +1,9 @@ +document.getElementById('fileInput').addEventListener('change', function(event) { + const file = event.target.files[0]; + if (file) { + const audioPlayer = document.getElementById('audioPlayer'); + const objectUrl = URL.createObjectURL(file); + audioPlayer.src = objectUrl; + audioPlayer.play(); + } + }); \ No newline at end of file diff --git a/Audio Player/src/style.css b/Audio Player/src/style.css new file mode 100644 index 00000000..41bdfbc1 --- /dev/null +++ b/Audio Player/src/style.css @@ -0,0 +1,12 @@ +body { + font-family: Arial, sans-serif; + padding: 20px; + text-align: center; + } + input[type="file"] { + margin: 10px 0; + } + audio { + margin-top: 20px; + width: 100%; + } \ No newline at end of file