There’s no initializing to do. As long as there is at least one video attached to the post you’re testing with, then it will work. When the shortcode doesn’t output anything it’s almost always because the shortcode doesn’t have any videos to work with. First verify that the post you’re working with has a video attached to it. It’s also a good idea to verify that your template runs both wp_head() and wp_footer() which output necessary scripts and CSS to make the video players run. Try putting the shortcode in the post content as a test. If it’s not outputting anything from there either, then you know it’s not because of a problem with the template editing.
Yes you´re right, it´s a theme issue. The code is working at the same article in twentyfifteen for example. The theme itself runs this code I think, but it´s not set at this single file. I will try to set both at this file. It´s curious: there a few files at the theme, where the shortcode runs, but not at the file headers-single-video.php. Is there a limitation, that a shortcode from a plugin can only run at typical called theme files?
Could you provide the code for your plugin, which could be set at the functions.php?
There is no code you could put in your functions.php file that will solve your problem. It is not surprising at all that you can’t get the code to run in the header section of a template file. The code must be run within the Loop, otherwise the plugin has no idea what post you’re dealing with and won’t be able to find any videos attached to that post in order to display them.