keijiro / KlakHap

HAP video player plugin for Unity
Other
341 stars 27 forks source link

request function #6

Closed fingerx closed 5 years ago

fingerx commented 5 years ago

thanks for that.Using klakhap play hap is good but cant find method get current frame index in playing state. and can you add example to show how using external time mode,thanks very much.I want the host to play the video and then the other machines play it through the received sequence frame number. Thanks again, if possible.

keijiro commented 5 years ago

To get the current frame index:

var player = GetComponent<HapPlayer>();
var index = player.time * player.frameCount / player.streamDuration;

For more details, please see "How to control playback" in README and the scripting example.

keijiro commented 5 years ago

I'm closing this issue now. Please feel free to reopen for further questions.

fingerx commented 5 years ago

thanks very much!