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

  • Home
  • SEARCH
  • 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 8598941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:16:40+00:00 2026-06-12T01:16:40+00:00

I’ve been searching for a while on the topic but found nothing at all.

  • 0

I’ve been searching for a while on the topic but found nothing at all. I should load on a webpage a certain number of .m4a files, each one inside a separate player. I found and implemented jplayer, which claims to handle the format. I decided to use the flash fallback by default to avoid backward incompatibilities. The sample m4a file supplied in jplayer’s examples (http://www.jplayer.org/audio/m4a/TSP-01-Cro_magnon_man.m4a) works fine, while I haven’t managed to play any of the files I have.

I ran the file unix command on all the files. The jplayer’s example file returns:

  • ISO Media, MPEG v4 system, version 2
  • The non-working files return one of the following:

  • ISO Media, MPEG v4 system, 3GPP
  • ISO Media, MPEG v4 system, version 1
  • ISO Media, MPEG v4 system, iTunes AAC-LC
  • I load the audio files with the following PHP controller code. I need to do so in order to “rewrite” URLs and hide the actual URI of the file.

    header('Content-Type: audio/mp4');
    header('Content-Disposition: inline; filename=xxxxxxxxxxTrack'.$id.'.m4a');
    echo file_get_contents(MVC::siteRoot().'/'.$filename);
    

    (MVC::siteRoot() returns the physical directory where the script is stored.)
    I also tried Content-Type: audio/mp4a-latm again to no avail. I load jplayer with the following code:

    $('.jp-jplayer').each(function() {
        $(this).jPlayer({
            ready: function () {
                console.log($(this).attr('data-src'));
                $(this).jPlayer("setMedia", {
                    m4a: $(this).attr('data-src')
                });
                $("#insp").jPlayerInspector({jPlayer:$(this)});
            },
            swfPath: "<?=MVC::httpRoot();?>/gui/swf/Jplayer.swf",
            supplied: 'm4a',
            wmode: 'window',
            solution:"flash",
            errorAlerts:true,
            warningAlerts:true,
            cssSelectorAncestor: '#' + 
                $(this).attr('id').replace('jquery_jplayer','jp_container')
        });
    });
    

    On the DOM side, for each audio file identified by the progressive number $i, this happens:

    <div id="jquery_jplayer_<?=$i?>" class="jp-jplayer" data-src="<?=MVC::httpRoot()?>/get/audio/<?=$traccia['audioid']?>"></div>
    <div id="jp_container_<?=$i?>" class="jp-audio">[...]
    

    Players seem to load correctly, the DOM is rearranged according to jplayer, but on the pression of the play button nothing happens. No error is found on the network’s behalf, the file are correctly delivered but the content is not played and no warnings or errors are issued. The only way I get to listen to the files, actually, is by downloading them and opening them in QuickTime since not even Chrome will play them. Safari, on the other side, will gladly load and play the files but not inside the website. Sadly I can’t directly control the content of the uploaded files since they come from an iOS/Android app and the client requested the .m4a format for some reason. Has anyone ever faced a similar problem?

    • 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-06-12T01:16:41+00:00Added an answer on June 12, 2026 at 1:16 am
      1. problems with DRMs

      2. MIME Type

      Your domain’s server must give the correct MIME type (content type) for all media URLs.

      Failure to give the correct MIME type will stop the media from working on some HTML5 browsers. This is a common cause of problems that only affect Firefox and Opera. Other browsers are less strict, but the MIME type should always be checked that it is correct if you having problems getting media to play on any browser.

      Media MIME Types

          MP3: audio/mpeg
          MP4: audio/mp4 video/mp4
          OGG: audio/ogg video/ogg
          WebM: audio/webm video/webm
          WAV: audio/wav
      

      If you use a common extension for both audio and video media, for example audio.mp4 and video.mp4, then simply use the video version of the MIME type for both of them. ie., video/mp4

      On Apache servers, you can use the .htaccess file to set the MIME type based on the file extension:

      # AddType TYPE/SUBTYPE EXTENSION
      
      AddType audio/mpeg mp3
      AddType audio/mp4 m4a
      AddType audio/ogg ogg
      AddType audio/ogg oga
      AddType audio/webm webma
      AddType audio/wav wav
      
      AddType video/mp4 mp4
      AddType video/mp4 m4v
      AddType video/ogg ogv
      AddType video/webm webm
      AddType video/webm webmv
      

      3. Byte-Range Requests

      Your server must enable Range requests. This is easy to check for by seeing if your server’s response includes the Accept-Ranges in its header. Most HTML5 browsers enable seeking to new file positions during a download, so the server must allow the new Range to be requested.

      Failure to accept byte Range requests will cause problems on some HTML5 browsers. Often the duration cannot be read from the file as some formats require that the start and end of the file is read to know its duration. Chrome tends to be the browser that has most problems if the Range request is not enabled on the server, but all browsers will have some issue even if it is only that you have to wait for all the media to load before jumping close to the end.

      This problem is known to affect Jetty 6 servers with their default configuration.

      https://groups.google.com/d/msg/jplayer/nSM2UmnSKKA/bC-l3k0pCPMJ

      1. Protecting Your Media

      Be careful when trying to restrict access to your media files. The media URL must be accessible over the internet by the user and its response must be in the format expected.

      Using the server response to disable the local cache of media can cause problems with some HTML5 browsers. This can cause the duration of the media to be unknown, which will show as a NaN in the duration of jPlayer.

      If you do some magic on the backend to make it more secure, them make sure you are accepting the byte Range requests described above.

      Yeah I’ve just copy/pasted the faq, dunno anything about this stuff

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

    Sidebar

    Related Questions

    I want to count how many characters a certain string has in PHP, but
    I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
    I have a jquery bug and I've been looking for hours now, I can't
    link Im having trouble converting the html entites into html characters, (&# 8217;) i
    I would like to run a str_replace or preg_replace which looks for certain words
    I have a French site that I want to parse, but am running into
    This could be a duplicate question, but I have no idea what search terms
    I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
    I have a text area in my form which accepts all possible characters from
    Seemingly simple, but I cannot find anything relevant on the web. What is the

    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.