{"id":1767,"date":"2022-08-30T15:19:16","date_gmt":"2022-08-30T15:19:16","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/12\/02\/android-videoview-iterate-through-a-list-of-clips-closed-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:19:16","modified_gmt":"2022-08-30T15:19:16","slug":"android-videoview-iterate-through-a-list-of-clips-closed-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/android-videoview-iterate-through-a-list-of-clips-closed-collection-of-common-programming-errors\/","title":{"rendered":"Android &#8211; VideoView &#8211; iterate through a list of clips [closed]-Collection of common programming errors"},"content":{"rendered":"<p>I am building a Video Player client using the Android&#8217;s <code>VideoView<\/code> control. What I need is to have the ability to iterate through a list of songs forward and backward, by pressing the Next, Prev buttons.<\/p>\n<p>The idea should be the following: when clicking &#8220;Next&#8221;, 1) stop the currently playing video, 2) take the new Uri and assign to VideoView<\/p>\n<p>3) call VideoView.start();<\/p>\n<p>It should work properly, but it does not. Plus, I see the <code>\"media player went away with unhandled events\"<\/code> in the LogCat.<\/p>\n<p>Here&#8217;s how I stop, and start playing a new video:<\/p>\n<pre><code>\/\/ Stop currently playing video\nvideoView.stopPlayback();\n\n\/\/ Start a new video.  \nvideoView.setVideoURI(Uri.parse(videoUris.get(uriPosition)));  \nvideoView.start();  \n<\/code><\/pre>\n<p>I am assuming that the issue is because I do not stop the <code>VideoView<\/code> properly, but not sure.<\/p>\n<p id=\"rop\"><small>Originally posted 2013-12-02 01:20:37. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I am building a Video Player client using the Android&#8217;s VideoView control. What I need is to have the ability to iterate through a list of songs forward and backward, by pressing the Next, Prev buttons. The idea should be the following: when clicking &#8220;Next&#8221;, 1) stop the currently playing video, 2) take the new [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1767","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1767"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1767\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1767"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}