Forum Discussion

hugetv's avatar
hugetv
Visitor
10 years ago

how to create a loading for movie

I want to make a loading for the movie information to indicate how long already seeing with a bar using roImageCanvas and roVideoPlayer

this example

3 Replies

  • this code

    countdowntotal = m.player.getplaybackduration() - m.position
    minutes = int(countdowntotal / 60)
    seconds = int(countdowntotal - (minutes * 60))
    if seconds < 10
    seconds = "0"+seconds.tostr()
    end if
    countdownstr = minutes.tostr()+":"+seconds.tostr()

    obtaining hour
  • ok solution

    countdowntotal = m.player.getplaybackduration() - m.position
    hour = int(countdowntotal / 3600)
    minutes = int((countdowntotal - (hour * 3600)) / 60)
    'minutes = int(countdowntotal / 60)
    seconds = int(countdowntotal - (minutes * 60))
    if seconds < 10
    seconds = "0"+seconds.tostr()
    end if
    countdownstr = hour.tostr()+"h "+minutes.tostr()+"m "+seconds.tostr()+"s "