trigger certain event based on which marker reached
i have video wth markers embedded. each marker has unique name. i'm trying trigger events based on marker reached.
so far have:
void theplayer_markerreached(object sender, timelinemarkerroutedeventargs e)
{
htmlpage.window.alert("pow!!");
}
what i'm looking like:
if (sender == marker1)
{
htmlpage.window.alert("pow!!");
}
or
if (marker == marker2)
{
htmlpage.window.alert("bam!!");
}
how done?
movie.markerreached += new void m_markerreached(object sender, timelinemarkerroutedeventargs e) { string mtype = e.marker.type.tostring(); // determine whether // marker 1 or 2 if (mtype == “name”)//suppose let marker1 name "name" { htmlpage.window.alert("pow"); } if (mtype == “name2”)//suppose let marker2 name "name2" { htmlpage.window.alert("poww"); } }
e.marker.type string name timeline markers
---------------
you perform silimar tasks using e.marker.text (it refers value have specified timeline marker in encoder)
string mtype = e.maker.text.tostring(); if(mtype == "<value>" { do this } else {do }
Silverlight > Silverlight Video and Media
Comments
Post a Comment