Please add to StopEventArgs one property use distinguish media stop by who
Aug 23, 2015
Archive Agent wrote
I asking you before about the problem, because I need to know when media stop:
Player.OnStop += Player_OnStop;
I need to know: is media playing is finish and event is triggered or because user stop by manually. like: Player.Stop();
and I found this property: Player.Source_Stream_Size
and I think I can use this way know media player stop by who.
Player.OnStop += Player_OnStop;
private void Player_OnStop(object sender, StopEventArgs e)
{
//Media is playing finish
if (e.Position == Player.Source_Stream_Size)
{
PlayNextSong();
}
}
But I was wrong, because the property:Source_Stream_Size always be 0.
so can you add to StopEventArgs some enum proberty.like
ReasonEnum: StopByMediaFinish, StopByUserManually
like this, let me handle my problem? thanks.
qakmak on May 22, 2013 11:54
Declined
0
Vote
Reply
Log in please
Login
I forgot it
Login
Do not have an account?
Register
2 Answers
Aug 23, 2015
Archive Agentagentwrote
Roman Minyaylov
Source_Stream_Size - for memory playback.
You are calling Stop in your code, so, set flag if required to know who initiated this event.
on May 22, 2013 12:22
Aug 23, 2015
Archive Agentagentwrote
qakmak
..............
ok, I will add a bool to every stop position .let onStop event can Judge.