When filming on an active trail always be alert and constantly keep an eye on the trail for riders. I always make sure to be far out of the way when someone is approaching.
I wouldn't get too upset about almost getting hit either. The Key word is "almost", he didn't hit you and if he did he would most likely be the one to get injured. So suck it up and roll with it. I've had my Go-Pro and camcorder ran over numerous times and I always feel the need to apologize to the riders since I'm the one that shouldn't have had them in the way to start with.
So just have fun filming and give those who are there to ride the right of way. See ya on the trail
By the way, If any of you ever see me too close to the trail filming feel free to plow into me
Would be good for the Fails video