My guyfriend put me in a headlock. Was he just playing with me or did he try to be dominant?

I (5.7 and really slim girl) am friends with a guy (6.1) I know for about 5 years. We met up with some friends yesterday when a girlfriend of mine took my phone and looked at some pictures I took. I wanted to get my phone back and walked over to her when HE just put his arm around my neck to put me in a headlock. I tried to get out by pushing his arm but he didn't let go. He then tried to push me down and told me to sit down multiple times. He didn't hurt me but I wonder if he was being dominant or if he just joked around. Would you put a girl in a headlock? And would you immediately let go if you noticed that she is trying to get out?
My guyfriend put me in a headlock. Was he just playing with me or did he try to be dominant?
Post Opinion