Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7510949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:23:22+00:00 2026-05-29T23:23:22+00:00

I am trying to add jw player to a custom cms where a user

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:23:24+00:00Added an answer on May 29, 2026 at 11:23 pm

    Assuming the rendered result is some kind of list containing anchor tags like:

    <a href="file1.mp4">File1</a>
    <a href="file2.mp4">File2</a>
    ...
    

    You can parse every single anchor tag and regex it’s href attribute content, i.e.:

    $("a").each(function() {
      var href = $(this).attr('href');
    
      if(href.search(/*\.mp4/) != -1) {
        // this is an anchor tag where the href attribute points to an mp4 file
        // so you can replace it with some other html code
    
        // for instance, hide the anchor tag
        $(this).hide();
    
        // add some other html code after the hidden anchor tag, eg. jw player
        $(this).after('<div class="player"> <-- player code goes here --> </div>');
      }
    });
    

    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:

    <a hreF="file1.mp4" class="mp4-file">File1</a>
    ...
    

    You could just do

    $(".mp4-file").each(function() {
      // no need to regex here
    
      $(this).hide();
      $(this).after('<div class="player"> <-- player code goes here --> </div>');
    });
    

    I think you get the idea…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a player who can add and remove items from their
I'm trying add a tab to my web page that looks like this: Using
I'm trying to append VLC player in an html page via jquery. I can
Trying to add an onclick handler to my tabs, and can't seem to get
Im trying to add some short file names to a Wise installer to fix
Im trying to add a directory foo to my repo, but there are some
I am trying to add youtube player in my flash site. I downloaded the
Im trying to create a mp3 player that will add songs per day. So
I'm trying to implement the Media Player custom field control described in this MSDN
I am trying to do an ASP.net custom control for the Flow Player flv

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.