I am trying to add jw player to a custom cms where a user can add an mp4 file and it appears in the page as a link. But what I would like to do is detect each mp4 file on the page and have jw player wrap each mp4 file on the page and allow it to be played. Is this possible? If so is there an example of this somewhere.
Share
Assuming the rendered result is some kind of list containing anchor tags like:
You can parse every single anchor tag and regex it’s href attribute content, i.e.:
It’s even easier if you can modify the template that’s being renderd the way the server side determines which links should be replaced. For instance if you can produce something like:
You could just do
I think you get the idea…