DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ Play() [2/2]

int Widget::Play ( VideoCommand cmd)
inlineprivate

Legacy, preferably not used, left for backwards compat.

См. определение в файле EnWidgets.c строка 587

588 {
589 // Yes, some things here do not do what the name implies
590 // And it returns 0 whether successful or not
591 // But this is what the old functionality looked like
592 // So for true backwards compat, it will be left like this
593 switch (cmd)
594 {
595 case VideoCommand.PLAY:
596 Play();
597 break;
598 case VideoCommand.STOP:
599 Pause();
600 break;
601 case VideoCommand.REWIND:
602 SetTime(0, true);
603 break;
604 case VideoCommand.POSITION:
605 return GetTime();
606 case VideoCommand.REPEAT:
607 SetLooping(true);
608 break;
609 case VideoCommand.ISPLAYING:
610 return IsPlaying();
611 case VideoCommand.KILL:
612 Unload();
613 break;
614 default:
615 return 0;
616 }
617
618 return 0;
619 }
VideoCommand
Legacy, do not use.
Определения EnWidgets.c:506
proto native bool IsPlaying()
QoL direct method to check for playing state (buffering while playing will still return true)
proto native int GetTime()
Get the current time of the video.
proto native bool Play()
Starts video playback.
proto native bool Pause()
Pauses video playback.
proto native void SetLooping(bool looping)
Set whether the video should loop.
proto native bool SetTime(int time, bool preload)
Set the desired time for the video (preload decides whether it will already load the next frames too)
proto native void Unload()
Unload the video, freeing up all resources.

Перекрестные ссылки GetTime(), IsPlaying(), Pause(), Play(), SetLooping(), SetTime() и Unload().