|
2 registered members (dr_panther, 7th_zorro),
1,203
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Is it possible to determine that the video is complete?
#483895
08/11/21 15:07
08/11/21 15:07
|
Joined: Jan 2012
Posts: 108
gamers
OP
Member
|
OP
Member
Joined: Jan 2012
Posts: 108
|
Hello there, I'm trying to understand whether the video is complete with the code I shared below, but it doesn't work as I want. I could not determine where I made a mistake. Please could you help me? The code: if(media_playing(EoL_video)==1)
{
reset(EoL_video_panel,SHOW);
wait (1);
}
else
{
set(EoL_video_panel,SHOW);
}
|
|
|
Re: Is it possible to determine that the video is complete?
[Re: gamers]
#483935
08/15/21 17:31
08/15/21 17:31
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
Hey! Use handles and 'media_playing' for that. Something like this: void play_media()
{
var handle = media_play(...)
while(media_playing(handle))
{
wait(1);
}
}
|
|
|
Re: Is it possible to determine that the video is complete?
[Re: 3run]
#483938
08/16/21 11:39
08/16/21 11:39
|
Joined: Jan 2012
Posts: 108
gamers
OP
Member
|
OP
Member
Joined: Jan 2012
Posts: 108
|
Hi 3run, Thank you very much! Best regards, Hey! Use handles and 'media_playing' for that. Something like this: void play_media()
{
var handle = media_play(...)
while(media_playing(handle))
{
wait(1);
}
}
|
|
|
Re: Is it possible to determine that the video is complete?
[Re: gamers]
#484001
08/25/21 21:21
08/25/21 21:21
|
Joined: Jul 2008
Posts: 2,107 Germany
rayp
X
|
X
Joined: Jul 2008
Posts: 2,107
Germany
|
good media-command-example (except of media_playing^^): https://opserver.de/ubb7/ubbthreads.php?ubb=showflat&Main=52675&Number=439158#Post439158edit: Btw...running video-handles might crash engine on level_load. Not 100% sure about this, but i always stop all running media handles before switching levels. While thinking about, iam pretty sure this was caused by a video i rendered to texture of a entity, then switched the level, crash. greets
Last edited by rayp; 08/25/21 21:30.
Acknex umgibt uns...zwischen Dir, mir, dem Stein dort... "Hey Griswold ... where u gonna put a tree that big ?" 1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected rayp.flags |= UNTOUCHABLE;
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|
|
|