www.webdeveloper.com
Results 1 to 7 of 7

Thread: PLAY ACC codec via HTML5

  1. #1
    Join Date
    Jan 2018
    Posts
    19

    PLAY ACC codec via HTML5

    Hi,

    following webradio url: http://trkvz-radyo.ercdn.net/ahaberradyo/chunklist.m3u8
    is playable with VLC player. From what I see, the codec is ACC.

    I can not play this url via <audio> tag.

    Code:
    <audio id="myaudio" controls autoplay style="width:100%" >
                <source src="http://trkvz-radyo.ercdn.net/ahaberradyo/chunklist.m3u8" type="audio/mpeg" />
                <source src="http://trkvz-radyo.ercdn.net/ahaberradyo/chunklist.m3u8" type="audio/acc" />
                This text displays if the audio tag isn't supported.
    </audio>
    How can I play this URL via <audio> tag or via html5 at all?

    Thx,
    Aykut

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    5,762
    You can only play audio that is supported in HTML5, you can use FLASH media but thats being dropped (this year I think or by 2020)

    Also you can't pass a playlist as far as I am aware, you have to point to the actual file with the recognised file extension like .ogg .wav .mp4 and so on, .m3u files are playlist files not audio.

    So the only option is to stream to an external player, use a player plugin that can play AAC or change the codec in use for that stream.

    Also as a not of nettiquette, forcing auto play is not good thing to do as you

    You have no idea if audio is already playing and someone visited your site and won't appreciate your site just firing up at full volume, those sites get a click on the close box and bye bye forever.

    Don't take control away from the user, it is their browser not yours and doing that is the quickest way to lose people and get a high bounce rate.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  3. #3
    Join Date
    Jan 2018
    Posts
    19
    >> forcing auto play is not good thing to do as you
    Thx, I change it. User has to click to play.

    Sorry, I had a typo. The code is not ACC, it is AAC.
    Why html5 does not play AAC audio streams?

  4. #4
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    5,762
    Money.... is the simple answer. No money to be made by the owner of the codec or they want to restrict the access to that data type by using only their hardware.

    Either way, the prime motivator is money.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  5. #5
    Join Date
    Jan 2018
    Posts
    19
    I read here: https://www.w3schools.com/tags/tag_video.asp
    that AAC format is avaialbe in HTML5. But this is part of a video.
    So I was wondering why AAC audoformat is "OK" within video,
    but not not OK as just a audio.

  6. #6
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    5,762
    Because AAC is a video sound track format.

    Simplest answer is to just transcode the files in to what is accepted as the standard for audio on the internet...
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  7. #7
    Join Date
    Jan 2018
    Posts
    1
    If you need any help regarding this HTML, you can get help from ITHeight.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center

"

"