<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Try experimenting with the  in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Media-Plugin-not-working-iOS/m-p/1080425#M61374</link>
    <description>&lt;P&gt;Try experimenting with the "Audio Play App" first. In the "Samples and Demos" section of the XDK ("Open a New Project").&lt;/P&gt;</description>
    <pubDate>Tue, 31 May 2016 17:04:38 GMT</pubDate>
    <dc:creator>PaulF_IntelCorp</dc:creator>
    <dc:date>2016-05-31T17:04:38Z</dc:date>
    <item>
      <title>Media Plugin not working iOS</title>
      <link>https://community.intel.com/t5/Software-Archive/Media-Plugin-not-working-iOS/m-p/1080424#M61373</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;

&lt;P&gt;I am trying to get a simple mp3 file to play on iOS (2 sec bell sound) and I can not get it to work at all, for 3 days I have tested, read forms, changed code and I can not get to work, the main error I get is "Cannot use audio file from resource", I tried .ogg .mp3 .wav and nothing.&lt;/P&gt;

&lt;P&gt;I am using&lt;/P&gt;

&lt;P&gt;Media Version 2.2.0&lt;/P&gt;

&lt;P&gt;Cordova CLI 5.4.1&lt;/P&gt;

&lt;P&gt;I have tried using full location, full href, persistant file system, localhost, etc&lt;/P&gt;

&lt;P&gt;When in the emulator and reference locally it works fine&lt;/P&gt;

&lt;P&gt;Has anyone manage to get it working on iOS 9.2&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 15:44:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Media-Plugin-not-working-iOS/m-p/1080424#M61373</guid>
      <dc:creator>staurt_s_</dc:creator>
      <dc:date>2016-05-31T15:44:00Z</dc:date>
    </item>
    <item>
      <title>Try experimenting with the</title>
      <link>https://community.intel.com/t5/Software-Archive/Media-Plugin-not-working-iOS/m-p/1080425#M61374</link>
      <description>&lt;P&gt;Try experimenting with the "Audio Play App" first. In the "Samples and Demos" section of the XDK ("Open a New Project").&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 17:04:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Media-Plugin-not-working-iOS/m-p/1080425#M61374</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-05-31T17:04:38Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Software-Archive/Media-Plugin-not-working-iOS/m-p/1080426#M61375</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I took the code from the demo and still the same, works fine on Android but not on iOS.&lt;/P&gt;

&lt;P&gt;I see many people around having the same issue with Cordova.&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;var PlayCordovaAudio = function(src) {
    "use strict";
    var x = navigator.userAgent;
    var z = getWebRoot();

    if (window.cordova &amp;amp;&amp;amp; cordova.file) {// if Cordova file plugin present
        if (!(/^https?:/i.test(src))) {// if local file to be played...
            if (x.match(/(ios)|(iphone)|(ipod)|(ipad)/ig)) {// if on iOS device...
                if (window.tinyHippos)// ...AND in the Emulate tab
                    src = z + "/" + src;
                // correct file location for Emulate tab
            } else// for everything else...
                src = z + "/" + src;
            // add absolute path prefix on non-iOS
        }
        mymedia = new Media(src,
            function () { console.log("playAudio():Audio Success"); },
            function (err) { console.log("playAudio():Audio Error: " + err.message); }                   
        );
        mymedia.play();
    }
};
var getWebRoot = function() {
    "use strict" ;
    var path = window.location.href ;
    path = path.substring( 0, path.lastIndexOf('/') ) ;
    return path ;
};&lt;/PRE&gt;

&lt;P&gt;Here is the code, Any ideas&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 12:03:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Media-Plugin-not-working-iOS/m-p/1080426#M61375</guid>
      <dc:creator>staurt_s_</dc:creator>
      <dc:date>2016-06-01T12:03:21Z</dc:date>
    </item>
    <item>
      <title>Double-check the CSP</title>
      <link>https://community.intel.com/t5/Software-Archive/Media-Plugin-not-working-iOS/m-p/1080427#M61376</link>
      <description>&lt;P&gt;Double-check the CSP directives in your index.html file, this is especially important on iOS 9 devices. See the CSP directive in that audio app for an example.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 17:37:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Media-Plugin-not-working-iOS/m-p/1080427#M61376</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-06-01T17:37:30Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Software-Archive/Media-Plugin-not-working-iOS/m-p/1080428#M61377</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I added CSP&lt;/P&gt;

&lt;P&gt;&amp;lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' data: blob: filesystem: ws: gap: cdvfile: &lt;A href="http://travelon.world" target="_blank"&gt;http://travelon.world&lt;/A&gt; &lt;A href="https://*.getfirebug.com" target="_blank"&gt;https://*.getfirebug.com&lt;/A&gt; &lt;A href="http://*.openstreetmap.org" target="_blank"&gt;http://*.openstreetmap.org&lt;/A&gt; &lt;A href="http://debug-software.intel.com" target="_blank"&gt;http://debug-software.intel.com&lt;/A&gt; ; style-src 'self' 'unsafe-inline' ; "&amp;gt;&lt;/P&gt;

&lt;P&gt;and still the same result, what am I missing?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 19:14:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Media-Plugin-not-working-iOS/m-p/1080428#M61377</guid>
      <dc:creator>staurt_s_</dc:creator>
      <dc:date>2016-06-01T19:14:57Z</dc:date>
    </item>
    <item>
      <title>Are you able to make it work</title>
      <link>https://community.intel.com/t5/Software-Archive/Media-Plugin-not-working-iOS/m-p/1080429#M61378</link>
      <description>&lt;P&gt;Are you able to make it work by modifying the Audio App to use your media files rather than the ones built into the Audio App? That would be a simpler test. If that works, then compare the differences between the two.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 22:15:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Media-Plugin-not-working-iOS/m-p/1080429#M61378</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-06-01T22:15:06Z</dc:date>
    </item>
  </channel>
</rss>

