Results 1 to 2 of 2

Thread: Example showing use of Ext.device.Media in 2.3.1???

  1. #1
    Sencha Premium User
    Join Date
    Jan 2014

    Default Example showing use of Ext.device.Media in 2.3.1???

    Are there any examples demonstrating the use of Ext.device.Media? I am trying to play .mp3 files on an android device using cordova and ST 2.3.1. I was able to get the files to play in Chrome using Ext.Audio, but this failed to work on Android. Now I am attempting on Chrome with Ext.device.Media, and I can't call
    because that method doesn't exist on the object when I stop in the debugger. And calling methods on the singleton like
    appear to do nothing.

    If I had even one working example of the use of this class, I'm sure I could get this functioning...
    I found a thread here that seems to indicate there are some shortcomings in the cordova packaging, but I'm not to that phase yet -- just trying to get it working in the browser.

    Thanks in advance.
    Last edited by Paddymon; 28 Jan 2014 at 9:38 AM. Reason: removed html markup tags

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011


    Ext.device.Media uses Cordova's Media class and will not work in the browser. It will only work if your app is packaged with Cordova.
    Unfortunately there are no Sencha examples available using this api. But the examples in the cordova docs should give you a good idea of how to use it.

    You can go through the Ext.device namespace or alternatively, you can access the Cordova functions directly in your app by preceding the API with navigator, for example for the Media API,
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

Tags for this Thread

Posting Permissions

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