{"action":"created","issue":{"url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper/issues/25","labels_url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper/issues/25/comments","events_url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper/issues/25/events","html_url":"https://github.com/willprice/python-omxplayer-wrapper/issues/25","id":96646445,"number":25,"title":"Stop video1 and play video2 then continue video1","user":{"login":"jonhdeppp","id":10911377,"avatar_url":"https://avatars.githubusercontent.com/u/10911377?v=3","gravatar_id":"","url":"https://api.github.com/users/jonhdeppp","html_url":"https://github.com/jonhdeppp","followers_url":"https://api.github.com/users/jonhdeppp/followers","following_url":"https://api.github.com/users/jonhdeppp/following{/other_user}","gists_url":"https://api.github.com/users/jonhdeppp/gists{/gist_id}","starred_url":"https://api.github.com/users/jonhdeppp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonhdeppp/subscriptions","organizations_url":"https://api.github.com/users/jonhdeppp/orgs","repos_url":"https://api.github.com/users/jonhdeppp/repos","events_url":"https://api.github.com/users/jonhdeppp/events{/privacy}","received_events_url":"https://api.github.com/users/jonhdeppp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-22T19:32:26Z","updated_at":"2015-07-22T21:20:12Z","closed_at":null,"body":"Hi Will,\r\n\r\nHope you can help me with my problem.\r\n\r\nvideo1 = duration 30 secs\r\nvideo2 = duration 10 secs\r\n\r\nI have a looping video1 but in the middle of the play, I stop the video1 and play video2. Once video2 is done, I want to continue video1 on the position it was stopped.\r\n\r\nMy script::\r\nloop.py\r\n############\r\nplayer1 = OMXPlayer('video1.mp4')\r\ndur1 = player1.duration()\r\nwhile 1:\r\n    player.play()\r\n    sleep(dur1)\r\n    player.quit()\r\n\r\nstop.py\r\n###########\r\nplayer2 = OMXPlayer('video2.mp4')\r\nsubprocess.call(['dbuscontrol.sh','stop'])\r\nplayer2.play()\r\n\r\nIm having problem on the timer. Is there any other option to replace the time.sleep() in playing looping videos? What happens is when I stopped video1 at 5secs position, I will have a black screen for 15 secs before it plays again and if I stopped video1 at 25secs position, I will experience video1 and video2 playing simultaneously after 5 secs.\r\n\r\nHope you  read this in time.\r\n\r\nThanks,\r\n\r\nJoel"},"comment":{"url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper/issues/comments/123868486","html_url":"https://github.com/willprice/python-omxplayer-wrapper/issues/25#issuecomment-123868486","issue_url":"https://api.github.com/repos/willprice/python-omxplayer-wrapper/issues/25","id":123868486,"user":{"login":"jonhdeppp","id":10911377,"avatar_url":"https://avatars.githubusercontent.com/u/10911377?v=3","gravatar_id":"","url":"https://api.github.com/users/jonhdeppp","html_url":"https://github.com/jonhdeppp","followers_url":"https://api.github.com/users/jonhdeppp/followers","following_url":"https://api.github.com/users/jonhdeppp/following{/other_user}","gists_url":"https://api.github.com/users/jonhdeppp/gists{/gist_id}","starred_url":"https://api.github.com/users/jonhdeppp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonhdeppp/subscriptions","organizations_url":"https://api.github.com/users/jonhdeppp/orgs","repos_url":"https://api.github.com/users/jonhdeppp/repos","events_url":"https://api.github.com/users/jonhdeppp/events{/privacy}","received_events_url":"https://api.github.com/users/jonhdeppp/received_events","type":"User","site_admin":false},"created_at":"2015-07-22T21:20:12Z","updated_at":"2015-07-22T21:20:12Z","body":"One last thing, what is the best way to kill the session of your wrapper? Thanks a lot"}}