Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-13495

Android: HTML5 audio tag does not play in WebView

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Not Our Bug
    • Affects Version/s: None
    • Component/s: Android
    • Labels:
      None
    • Environment:

      Android 4.2
      SDK 3.0.2

      Description

      Problem description

      When using the <audio> tag in a WebView, the audio file does not play. This is not working both for local files (inside Resources, or in the SDCARD), nor for remote ones.

      Steps to reproduce

      1) Create an app with a WebView:

      var win = Ti.UI.createWindow({
          backgroundColor : 'green'
      })
       
      var wv = Ti.UI.createWebView({
          url : 'test.html'
      });
       
      win.add(wv);
      win.open();
      

      2) Create an HTML file with an <audio> tag:

      <!DOCTYPE html>
      <html>
      <body>
       
      <audio controls>
          <source src="cricket.wav" type="audio/wav"></source>
          Your browser does not support the audio element.
      </audio>
       
      </body>
      </html>
      

      3) Put the cricket.wav file in the same directory (or use a remote URL).

      4) Run the app and try to play the file: no audio is played, and no log is written.

      Notes

      Tested with 2.1.4 and 3.1.0.v20130404173046 as well.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pwang Ping Wang
                Reporter:
                dcassenti Davide Cassenti
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-16193
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code