Convert html5 video time in hours, minutes and seconds - JavaScript

1

I need a little help, I'm new here and I'm trying to create a custom video player, but I'm having difficulties in the time, and I wanted someone to help me do just that, if possible, demarcating and explaining a I just wanted to know how to convert the time of the video to give a span in hours, minutes and seconds, at the moment the only base I have is this (well, not enough kk):

    
asked by anonymous 11.11.2017 / 23:01

1 answer

1

A simple example with AngularJS

<html ng-app="helloWorld">
<head>
    <title>Hello World</title>
    <!-- Biblioteca AngularJS -->
    <script src="angular.js"></script>
    <script>
        angular.module("helloWorld", []);
        angular.module("helloWorld").controller("helloWorldCtrl", function ($scope) {
            <!-- Para teste usei o new Date() para pegar a data atual -->
            $scope.message = new Date();
        });
    </script>
</head>
<body>
    <div ng-controller="helloWorldCtrl">
        <!-- variável | máscara -->
        {{message | date: 'hh:mm:ss'}}
    </div>
</body>
</html>
    
12.11.2017 / 01:33