You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Jesse MacFadyen (JIRA)" <ji...@apache.org> on 2013/02/09 00:09:12 UTC

[jira] [Commented] (CB-2382) Cannot play resource audio

    [ https://issues.apache.org/jira/browse/CB-2382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13574931#comment-13574931 ] 

Jesse MacFadyen commented on CB-2382:
-------------------------------------

this was squeezed into 2.4.0
                
> Cannot play resource audio
> --------------------------
>
>                 Key: CB-2382
>                 URL: https://issues.apache.org/jira/browse/CB-2382
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: WP8
>    Affects Versions: 2.4.0
>            Reporter: Jesse MacFadyen
>            Assignee: Jesse MacFadyen
>             Fix For: 2.4.0
>
>
> The current implementation of Media playback is expecting the audio file to have been unpacked to Isolated Storage, which was the case on WP7 when this code was written.
> Currently it is not possible to play a file that is packaged as a resource.
> We need to implement reading the file from stream in order to address this.
> StreamResourceInfo fileResourceStreamInfo = Application.GetResourceStream(new Uri("www/sound1.wav", UriKind.Relative));
> SoundEffect soundEffect = SoundEffect.FromStream(fileResourceStreamInfo.Stream);
> soundEffect.Play();

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira