will1971 / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

CastRemoteDisplay-android sample app | Audio didn't play when app in background, but video works perfect #756

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. git clone https://github.com/googlecast/CastRemoteDisplay-android.git
2. change app_id string in res/values/strings/xml to valid one
3. Run app on device
4. Press play button
5. Wait some time and make sure that video and audio play on remote display
6. Press 'Home' button

What is the expected output? What do you see instead?

Result: video works well, audio missing
Expected: audio should continue play

What version of the product are you using? On what operating system?
Device: Xaomi Mi4i & Chromecast (first model)
Android OS: 5.0.2

Please provide any additional information below.
-

Original issue reported on code.google.com by abobriko...@gmail.com on 8 Feb 2016 at 9:21

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Form official documentation (https://developers.google.com/cast/docs/remote):

... For Android, audio does not stream while the app is in the background. 

Can anybody explain why? Maybe some workaround exist for this?

Original comment by abobriko...@gmail.com on 8 Feb 2016 at 9:30

GoogleCodeExporter commented 8 years ago
This is working as intended (see 
https://github.com/googlecast/CastRemoteDisplay-android/issues/11). Audio is 
captured at the system level on Android, so if another app  is brought to the 
foreground, the audio isn't sent to the Cast device.

Original comment by jonathan...@google.com on 8 Feb 2016 at 5:14