So, I've found something to recuperate the different parameters which are in the video tag. My problem wasn't my function but the position of the script in the html.
Here is an example of my code :
vjs.getAvatarAttribute = function(){
var videoTag = document.getElementsByTagName('video');
var avatar = videoTag[0].getAttribute("avatar");
if(avatar !== undefined){
return avatar;
}
}
if (vjs.getAvatarAttribute() !== undefined) { vjs.options.avatar = vjs.getAvatarAttribute(); }
So, this <script src="js/video.dev.js"></script>
must be AFTER the video tag.