2

Html file : code for selecting mp3 file

<div class="col-xs-12 col-sm-12">
  <label> Audio</label>
  <input class="center" id="musicFile" type="file" ngf-select
         ng-model="musicFile" name="file" accept=".mp3,audio/*" required>
</div>

Angularjs code

$scope.files = [];
$scope.audioFileURL = [];
$scope.audioFile = $scope.files.concat(document.getElementById('musicFile').files[0]);
1
  • 2
    Have you tried document.getElementById("musicFile").files[0].duration ? Commented Jan 16, 2020 at 11:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.