Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-9555

Media plugin should hide details of filesystem access

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-android, cordova-js
    • Labels:
      None

      Description

      When using the Media plugin to play music from the local filesystem, one can simply load the path to media files relative to the www/ directory on iOS, e.g.:

      new Media('audio/file.wav');

      However, when using Android, one needs to prefix the path with a string (a string which is not mentioned in the documentation):

      new Media('/android_asset/www/audio/file.wav');

      This is of course a very leaky abstraction. Regardless of the platform Cordova runs on, one should be able to use the same path for playing audio.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tlhunter Thomas Hunter II
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: