• Home
  • Jobs
  • Courses
  • Questions
  • Teachers
  • For business
  • ES/EN

0

35
Views
How to calculate video length from available properties?

I have some information from the server returning after recording a video from another source, and I am having trouble finding the duration of that video. I tried calculating from StartTime, EndTime & ProcessingTime but the result is still not correct like I open 1 video from Player. Please see Data and formula below.

  <published>true</published>
  <start_time>1648193086010</start_time>
  <end_time>1648193354234</end_time>
  <participants>2</participants>
  <meeting id="eb1fb5d06accfce0a69dee1908cef4b392d2e24d-1648193086010" externalId="OFFICIAL_1ON1_55_20035" name="OFFICIAL_1ON1_55_20035" breakout="false"/>
  <meta>
    <isBreakout>false</isBreakout>
    <meetingId>OFFICIAL_1ON1_55_20035</meetingId>
    <meetingName>OFFICIAL_1ON1_55_20035</meetingName>
  </meta>
  <playback>
    <format>video</format>
    <link>recordings/eb1fb5d06accfce0a69dee1908cef4b392d2e24d-1648193086010/meeting.mp4</link>
    <processing_time>30928</processing_time>
    <extensions>
      <preview>
        <images>
          <image width="176" height="136" alt="Welcome To BigBlueButton">https://big1.honrada.com/presentation/eb1fb5d06accfce0a69dee1908cef4b392d2e24d-1648193086010/presentation/d2d9a672040fbde2a47a10bf6c37b6a4b5ae$
          <image width="176" height="136" alt="This slide left blank for whiteboard">https://big1.honrada.com/presentation/eb1fb5d06accfce0a69dee1908cef4b392d2e24d-1648193086010/presentation/d2d9a672040fbde2a47a10bf$
          <image width="176" height="136" alt="This slide left blank for whiteboard">https://big1.honrada.com/presentation/eb1fb5d06accfce0a69dee1908cef4b392d2e24d-1648193086010/presentation/d2d9a672040fbde2a47a10bf$
        </images>
      </preview>
    </extensions>
    <size>4212315</size>
  </playback>
  <raw_size>2308052</raw_size>
</recording>

And here is my Code:

function DURATION(duration) {

const length = moment.duration(duration);h


const hour = length.hours(); 
const minute = length.minutes(); 
const second = length.seconds(); 

return hour + ':' + minute + ':' + second;

}

Result is 03:42

about 1 month ago ·

Juan Pablo Isaza

Answer question
Find remote jobs
Loading

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2022 PeakU Inc. All Rights Reserved.