[ https://issues.apache.org/jira/browse/CB-988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesse MacFadyen resolved CB-988. -------------------------------- Resolution: Fixed https://github.com/purplecabbage/incubator-cordova-wp7/commit/86611cd1e07f72f19e01396f0ea067ae363b2467 > AudioPlayer Bug when settings another media > ------------------------------------------- > > Key: CB-988 > URL: https://issues.apache.org/jira/browse/CB-988 > Project: Apache Cordova > Issue Type: Bug > Components: WP7 > Affects Versions: 1.9.0 > Environment: Emulator > Reporter: Dan Ardelean > Assignee: Jesse MacFadyen > Fix For: Master, 2.1.0 > > Original Estimate: 4h > Remaining Estimate: 4h > > Inside the AudioPlayer.cs public void startPlaying(string filePath) > before adding a MediaElement again to the LayoutRoot you should take the ole > one out. Tried to reuse also but if it's the same audio file stream it will > not work > I have added > for(int i=0;i<grid.Children.Count;i++) > if ((grid.Children[i].GetType() == > typeof(MediaElement)) && > (((MediaElement)grid.Children[i]).Name.CompareTo("playerMediaElement") == 0)) > { > grid.Children.RemoveAt(i); > i = grid.Children.Count; > } > After: > Grid grid = page.FindName("LayoutRoot") as Grid; > -- 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