Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot play youtube streams #33

Open
aran-arunakiri opened this issue Aug 16, 2014 · 2 comments
Open

Cannot play youtube streams #33

aran-arunakiri opened this issue Aug 16, 2014 · 2 comments

Comments

@aran-arunakiri
Copy link

When I try to play YouTube stream with the Android MediaPlayer everything is fine, but player hater throws the exception below. When I change the uri with a regular mp3 uri, everything goes fine, so I don't think it actually has to do with the state in which I call play()

The URI is (it is probably already expired so you won't be able to stream it anymore):

http%3A%2F%2Fr5---sn-5hn7sne6.googlevideo.com%2Fvideoplayback%3Fipbits%3D0%26mm%3D31%26id%3Do-APFn5V1BwG3SjGM7J6zYyl02HobYct2AXlnCHyWNJi2f%26sver%3D3%26signature%3D40B247BD6E0AA30DE36D0F6AA528C276969D7FEC.8DC6A96169F91897F127DE78AFDDD39CB755A47F%26ratebypass%3Dyes%26expire%3D1408242177%26itag%3D18%26ip%3D37.251.76.11%26mt%3D1408220458%26ms%3Dau%26initcwndbps%3D3327000%26mws%3Dyes%26source%3Dyoutube%26upn%3DnPflPGl9S3g%26mv%3Dm%26sparams%3Did%252Cinitcwndbps%252Cip%252Cipbits%252Citag%252Cratebypass%252Csource%252Cupn%252Cexpire%26fexp%3D902408%252C927622%252C927897%252C931982%252C934024%252C934030%252C941433%252C946013%252C948518%26key%3Dyt5&signature=null

08-16 21:59:50.529  15678-15699/com.trapfeedr W/System.err﹕ java.lang.IllegalStateException: Cannot call start in the idle state. (android.media.MediaPlayer@2109e948)
08-16 21:59:50.529  15678-15699/com.trapfeedr W/System.err﹕ at org.prx.playerhater.mediaplayer.StatelyPlayer.illegalState(StatelyPlayer.java:573)
08-16 21:59:50.529  15678-15699/com.trapfeedr W/System.err﹕ at org.prx.playerhater.mediaplayer.StatelyPlayer.start(StatelyPlayer.java:305)
08-16 21:59:50.529  15678-15699/com.trapfeedr W/System.err﹕ at org.prx.playerhater.mediaplayer.SynchronousPlayer.start(SynchronousPlayer.java:115)
08-16 21:59:50.529  15678-15699/com.trapfeedr W/System.err﹕ at org.prx.playerhater.mediaplayer.PlaylistSupportingPlayer.start(PlaylistSupportingPlayer.java:237)
08-16 21:59:50.529  15678-15699/com.trapfeedr W/System.err﹕ at org.prx.playerhater.mediaplayer.SynchronousPlayer.conditionalPlay(SynchronousPlayer.java:153)
08-16 21:59:50.529  15678-15699/com.trapfeedr W/System.err﹕ at org.prx.playerhater.mediaplayer.PlaylistSupportingPlayer.conditionalPlay(PlaylistSupportingPlayer.java:363)
08-16 21:59:50.529  15678-15699/com.trapfeedr W/System.err﹕ at org.prx.playerhater.service.PlayerHaterService.play(PlayerHaterService.java:257)
08-16 21:59:50.529  15678-15699/com.trapfeedr W/System.err﹕ at org.prx.playerhater.PlaybackService.play(PlaybackService.java:52)
08-16 21:59:50.529  15678-15699/com.trapfeedr W/System.err﹕ at org.prx.playerhater.wrappers.ServicePlayerHater.play(ServicePlayerHater.java:45)
08-16 21:59:50.529  15678-15699/com.trapfeedr W/System.err﹕ at org.prx.playerhater.wrappers.ThreadsafePlayerHater$22.run(ThreadsafePlayerHater.java:323)
08-16 21:59:50.529  15678-15699/com.trapfeedr W/System.err﹕ at org.prx.playerhater.wrappers.ThreadsafePlayerHater$22.run(ThreadsafePlayerHater.java:319)
08-16 21:59:50.539  15678-15699/com.trapfeedr W/System.err﹕ at org.prx.playerhater.wrappers.ThreadsafePlayerHater$PlayerHaterTask$WorkRunnable.run(ThreadsafePlayerHater.java:400)
08-16 21:59:50.539  15678-15699/com.trapfeedr W/System.err﹕ at android.os.Handler.handleCallback(Handler.java:725)
08-16 21:59:50.539  15678-15699/com.trapfeedr W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:92)
08-16 21:59:50.539  15678-15699/com.trapfeedr W/System.err﹕ at android.os.Looper.loop(Looper.java:176)
08-16 21:59:50.539  15678-15699/com.trapfeedr W/System.err﹕ at android.os.HandlerThread.run(HandlerThread.java:60)
@intsab
Copy link

intsab commented Jun 1, 2015

i have same problem can anyone tell me the solution?

@cqr
Copy link
Owner

cqr commented Sep 30, 2015

Are you unescaping the uri before you pass it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants