Search code examples
modxmodx-revolutionmodx-evolution

MODx video file as template variable is not showing/playing


In MODx Evolution I created a template variable... [tv_video] and set the input to "file". Inside assets/files I uploaded my video files (.mpeg, .avi, .ovg). Then in my resources I selected the TV I want and reference it in my chunk. The same principle as with TV images. The only issue is that my videos will not show, only the pathname is presented, i.e. "assets/files/video1", that's it, no video to play.

Why doesn't it work like with images? What to do?

How would I go about supplying, setting up and customising the HTML5 video player?


Solution

  • Template variables does not output the movie for you. It stores the path in a text field in the database. You need to supply the player for this video by yourself.

    Think of it this way: If every file in Modx was rendered by default, how could you customize the player? How would it know to differentiate between a download link and a player window?

    There are many good HTML5 players out there, simply googeling it should help you. Your template variable [[+tv_video]] is then the src for this player.