Search code examples
androidjwplayerhttp-live-streamingm3u8jwplayer6

JWPlayer 6 multilanguage on android


Does anyone know if is multilanguage supported for Android?

I cannot find anything clear in this example regarding to the multilanguage on mobile devices https://support.jwplayer.com/customer/portal/articles/1761348-multiple-audio-renditions

But this code:

<html>
  <body>
    <div id="wrapper">
      <div id='playerTest'></div>
        <script type='text/javascript'>
          jwplayer('playerTest').setup({
            file: "some m3u8 file",
            androidhls:"true",
          })
        </script>
      <div>
   </body>
</html>

Which renders the multilanguage buttons in desktop doesnt render them in android.

Does the m3u8 must have some special syntaxis for Android? Currently I have something like this:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Chinese",FORCED=NO,AUTOSELECT=YES,URI="eng.ttml",LANGUAGE="eng"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",LANGUAGE="eus",NAME="Basque",DEFAULT=NO,AUTOSELECT=YES,URI="/ts/out.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",LANGUAGE="spa",NAME="Spanish",DEFAULT=NO,AUTOSELECT=YES,URI="/ts/spa.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",LANGUAGE="cat",NAME="Catala",DEFAULT=YES,AUTOSELECT=YES,URI="/ts/cat.m3u8"
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=688000,NAME="Main",CODECS="avc1.66.30",RESOLUTION=448x252,AUDIO="aac",SUBTITLES="subs"

Solution

  • Unfortunately, Android does not support multiple audio and Embedded VTT captions in the manifest for mobile web. This is an HLS v4 feature, and Android only supports up to v3.

    You can achieve this behavior in a native Android app: https://developer.jwplayer.com/sdk/android/docs/developer-guide/interaction/audio/