{"id":534,"date":"2013-12-24T23:26:47","date_gmt":"2013-12-25T04:26:47","guid":{"rendered":"http:\/\/binaryworld.net\/blogs\/?p=534"},"modified":"2013-12-24T23:26:47","modified_gmt":"2013-12-25T04:26:47","slug":"windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123","status":"publish","type":"post","link":"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/","title":{"rendered":"Windows Phone: MediaElement not playing file and failing with Error code 3123"},"content":{"rendered":"<p>Recently I had very frustrating error and I thought I must blog it to save someone else time. I used MediaElement in Windows Phone to play audio files (*.mp3 in my case). Suddenly one of my change broke it and it stop playing sound. After hooking up MediaFailed event &#8230; I found it was giving\u00a0me\u00a0message<\/p>\n<blockquote><p>3123 An error has occurred.<\/p><\/blockquote>\n<pre class=\"brush: csharp; gutter: true; first-line: 1\">        private void Play_Click(object sender, RoutedEventArgs e)\r\n        {\r\n            \/\/Auto play will start playing file when you assign new source\r\n            player.AutoPlay = true;\r\n            player.Volume = 1.0;\r\n            player.Source = new Uri(&quot;\/Assets\/Audio\/Alpha1\/1.mp3&quot;, UriKind.RelativeOrAbsolute); \r\n        }\r\n\r\n        private void player_MediaOpened(object sender, RoutedEventArgs e)\r\n        {\r\n            player.Play();\r\n        }\r\n\r\n        private void player_MediaFailed(object sender, ExceptionRoutedEventArgs e)\r\n        {\r\n            System.Diagnostics.Debug.WriteLine(e.ErrorException.Message);\r\n        }<\/pre>\n<p>If you ever face this such error where MediaElement does not produce sound on play then first thing to check is your WMAppManifest.xml file and see you have following capability in the file. In my case it was not there and as soon as I added it everything started working<br \/>\n&nbsp;<\/p>\n<pre class=\"brush: xml; gutter: true; first-line: 1\">      &lt;Capability Name=&quot;ID_CAP_MEDIALIB&quot; \/&gt;<\/pre>\n<p>Hope this saves you some frustration.<br \/>\nCheers!!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I had very frustrating error and I thought I must blog it to save someone else time. I used MediaElement in Windows Phone to play audio files (*.mp3 in my case). Suddenly one of my change broke it and &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/\"> <span class=\"screen-reader-text\">Windows Phone: MediaElement not playing file and failing with Error code 3123<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61,26,74],"tags":[31,82],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>Windows Phone: MediaElement not playing file and failing with Error code 3123 - BinaryWorld Blog<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Windows Phone: MediaElement not playing file and failing with Error code 3123 - BinaryWorld Blog\" \/>\r\n<meta property=\"og:description\" content=\"Recently I had very frustrating error and I thought I must blog it to save someone else time. I used MediaElement in Windows Phone to play audio files (*.mp3 in my case). Suddenly one of my change broke it and &hellip; Windows Phone: MediaElement not playing file and failing with Error code 3123 Read More &raquo;\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/\" \/>\r\n<meta property=\"og:site_name\" content=\"BinaryWorld Blog\" \/>\r\n<meta property=\"article:published_time\" content=\"2013-12-25T04:26:47+00:00\" \/>\r\n<meta name=\"author\" content=\"Binary World\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Binary World\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/\",\"url\":\"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/\",\"name\":\"Windows Phone: MediaElement not playing file and failing with Error code 3123 - BinaryWorld Blog\",\"isPartOf\":{\"@id\":\"https:\/\/binaryworld.net\/blogs\/#website\"},\"datePublished\":\"2013-12-25T04:26:47+00:00\",\"dateModified\":\"2013-12-25T04:26:47+00:00\",\"author\":{\"@id\":\"https:\/\/binaryworld.net\/blogs\/#\/schema\/person\/77cf0a9a512dd22bff93c6a1b6374fe0\"},\"breadcrumb\":{\"@id\":\"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/binaryworld.net\/blogs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Windows Phone: MediaElement not playing file and failing with Error code 3123\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/binaryworld.net\/blogs\/#website\",\"url\":\"https:\/\/binaryworld.net\/blogs\/\",\"name\":\"BinaryWorld Blog\",\"description\":\"Tips and Tutorials for Microsoft SQL Server, SSIS, SSAS, Business Intelligence, C#, .net\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/binaryworld.net\/blogs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/binaryworld.net\/blogs\/#\/schema\/person\/77cf0a9a512dd22bff93c6a1b6374fe0\",\"name\":\"Binary World\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/binaryworld.net\/blogs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eaea47799daa577835eb53e64dfd3e13?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eaea47799daa577835eb53e64dfd3e13?s=96&d=mm&r=g\",\"caption\":\"Binary World\"},\"description\":\"Binary World is a Software Development company located in Atlanta, USA (since 2007). Binary World specialized in Business Intelligence, mobile, cloud computing and .Net Application Development.\",\"url\":\"https:\/\/binaryworld.net\/blogs\/author\/admin\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Windows Phone: MediaElement not playing file and failing with Error code 3123 - BinaryWorld Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/","og_locale":"en_US","og_type":"article","og_title":"Windows Phone: MediaElement not playing file and failing with Error code 3123 - BinaryWorld Blog","og_description":"Recently I had very frustrating error and I thought I must blog it to save someone else time. I used MediaElement in Windows Phone to play audio files (*.mp3 in my case). Suddenly one of my change broke it and &hellip; Windows Phone: MediaElement not playing file and failing with Error code 3123 Read More &raquo;","og_url":"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/","og_site_name":"BinaryWorld Blog","article_published_time":"2013-12-25T04:26:47+00:00","author":"Binary World","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Binary World","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/","url":"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/","name":"Windows Phone: MediaElement not playing file and failing with Error code 3123 - BinaryWorld Blog","isPartOf":{"@id":"https:\/\/binaryworld.net\/blogs\/#website"},"datePublished":"2013-12-25T04:26:47+00:00","dateModified":"2013-12-25T04:26:47+00:00","author":{"@id":"https:\/\/binaryworld.net\/blogs\/#\/schema\/person\/77cf0a9a512dd22bff93c6a1b6374fe0"},"breadcrumb":{"@id":"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/binaryworld.net\/blogs\/windows-phone-mediaelement-not-playing-file-and-failing-with-error-code-3123\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/binaryworld.net\/blogs\/"},{"@type":"ListItem","position":2,"name":"Windows Phone: MediaElement not playing file and failing with Error code 3123"}]},{"@type":"WebSite","@id":"https:\/\/binaryworld.net\/blogs\/#website","url":"https:\/\/binaryworld.net\/blogs\/","name":"BinaryWorld Blog","description":"Tips and Tutorials for Microsoft SQL Server, SSIS, SSAS, Business Intelligence, C#, .net","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/binaryworld.net\/blogs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/binaryworld.net\/blogs\/#\/schema\/person\/77cf0a9a512dd22bff93c6a1b6374fe0","name":"Binary World","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/binaryworld.net\/blogs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/eaea47799daa577835eb53e64dfd3e13?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eaea47799daa577835eb53e64dfd3e13?s=96&d=mm&r=g","caption":"Binary World"},"description":"Binary World is a Software Development company located in Atlanta, USA (since 2007). Binary World specialized in Business Intelligence, mobile, cloud computing and .Net Application Development.","url":"https:\/\/binaryworld.net\/blogs\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/binaryworld.net\/blogs\/wp-json\/wp\/v2\/posts\/534"}],"collection":[{"href":"https:\/\/binaryworld.net\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/binaryworld.net\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/binaryworld.net\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/binaryworld.net\/blogs\/wp-json\/wp\/v2\/comments?post=534"}],"version-history":[{"count":0,"href":"https:\/\/binaryworld.net\/blogs\/wp-json\/wp\/v2\/posts\/534\/revisions"}],"wp:attachment":[{"href":"https:\/\/binaryworld.net\/blogs\/wp-json\/wp\/v2\/media?parent=534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/binaryworld.net\/blogs\/wp-json\/wp\/v2\/categories?post=534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/binaryworld.net\/blogs\/wp-json\/wp\/v2\/tags?post=534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}