-
Notifications
You must be signed in to change notification settings - Fork 405
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
Cast demo not working for HLS #452
Comments
This is because the cast device or the receiver does not support this HLS stream. The user here (google/ExoPlayer#11018) says creating your own receiver app solves the problem. I haven't tried that though. I recall trying this out with about 4 different cast devices and it worked on a Next Hub but not on a Chromecast Ultra (first gen). I also think that I was able to play it on an audio only cast device. That's why I think it is device specific. I don't expect you will use the ExoPlayer receiver app for your app, so doing this would be part of your app anyways. Sorry for not being able to give you a better answer. |
Ahh, thanks for the quick reply. |
Hi, |
Sorry, I'm not sure I understand. Are you saying the media (Angel one - HLS) plays fine on a Cast device when you are using your app (or another app) that is directly talking to the Cast SDK? And in comparison the same media does not play when you are using the ExoPlayer cast demo app? Which phone you are using should not make a difference, as it's the cast device that receives just the media URI and then plays on it's own. What you are saying is that there is a problem in the Cast extension/Cast demo app? If this is the case we certainly need to investigate this. If the above is correct: My understanding is that the Cast demo app sends the URI to the device. Sending the URI works from what I remember, but then the media does not play on the cast device. If you want to debug what is happening on the cast device you can connect a remote Chrome debugger to it. This should give some errors that tell why playing the URI does not work: https://developers.google.com/cast/docs/debugging/remote_debugger If you do this I would certainly be interested and thankful to hear something back like a stack trace or some log out put from the cast device. |
I tried the demo app provided by https://github.com/googlecast/CastVideos-android
Can we look into what different are they doing, which we can do to get our extension work |
I have looked into this a bit more closely as it looks we need to clean up/document some things in the cast demo app. For a HLS stream being successfully played on a cast device by the demo app the following components are involved.
For reference the page with the formats supported by the default receiver app that we are using in the demo app. I have tested 3 HLS streams
with these devices:
I tried this with the Media3 cast demo app and with the reference Android sender app that you mentioned. Test results The 2 HLS/TS streams play well with any app and on every device. The Angel One (HLS/MP4) stream didn't play with neither of these devices and with neither of these sender or receiver apps. On both Chromecast devices with the Media3 demo app, when I tried to play the I was able to play the From all this I'd say that the reason for the Choosing a receiver app
From what I've seen with the tested HLS streams there is no difference between these two demo sender apps that are using the default receiver app. I'd focus looking into the receiver app first. A choice that you need to do anyway. You can change the receiver app used by the Media3 cast demo by providing your own
Reference your class in the
Then test your media with it. I'm not an expert in that matters, so I can't really give you guidance for this I'm afraid. From the testing above I'd continue looking for a receiver that uses Shaka player if you need HLS/MP4 support. Changes for Media3 If you, or someone else reading this, know how we can use different metadata or use the SDK API differently to make the And lastly, I really don't understand why we are not having a working HLS stream in our demo app, but instead one that is not supported. Sorry for the confusion. Besides, I'm afraid but failing is the expected behavior of playing the We keep this as an enhancement: |
Thank you for testing out the sample at your end too. I went ahead and further did the testing of changing the I tried these on the media3 cast demo Media3 cast demo But when I tried the same with the example provided by Google Cast-Android the mp4, dash & hls seems to be working fine. So after all these testing I have come to believe that the issue seems to be in the exoplayer cast extension, where it is crashing the app after the session is established and the playback is just about to start. I am afraid that even after bulding a receiver app, the problem will be the same as I would still be using the exoplayer cast extension. Can you please share a sample where the exoplayer cast extension is used to cast to any working receiver, which would be playing the stream successfully on the chromecast/tv without crashing the app on phone as well. |
Thanks. I have different results based on the testing I did. If the media works on the cast device, the demo app works well. If you want me to look into this some further, please provide some more details in what exact media URIs you've used, clear repro steps and provide a bug report with the stack traces. |
Issue: #452 #minor-release PiperOrigin-RevId: 539613535
Issue: androidx/media#452 #minor-release PiperOrigin-RevId: 539613535
Hi Marc, Following are the steps which I have been following to test the casting extension Results observed:- casting started on TV, but the app kept crashing when using the exoplayer-cast-extension So I have come to the conclusion that there is an issue with the observer within the exoplayer-cast-extension. Here is the link to the demo app which I am using which is having the issue:- https://drive.google.com/file/d/1iB17ShL7VG3lu9BMDZC7arL5Lv6ouv8n/view?usp=sharing Here is the link in which the casting seems to be working just fine:- |
Please provide complete information as requested in the issue template. The issue template can be found here. If you're unable to share bug reports or test content publicly, please send them to dev.exoplayer@gmail.com using a subject in the format "Issue #1234", where "#1234" should be replaced with your issue number. Please also update this issue to indicate you’ve done this. |
#minor-release Issue: #452 PiperOrigin-RevId: 539915277
#minor-release Issue: androidx/media#452 PiperOrigin-RevId: 539915277
Hi Marc, I went ahead and tried to find the root cause of the crash I was getting after the casting session was active. I took the example of Google Cast-Android and was able to successfully create the issue that is happening on the exoplayer's cast extension. And the conclusion that I came to, was the missing images that are to be added to the MediaMetadata object which is wrapped by the MediaInfo and sent to the connected remoteMediaClient. Here is the piece of code which worked for me, maybe using these changes it could resolve the crashes in the exoplayers cast-exension as well.
|
Thank you! I'm not sure what your code does differently to what the demo app does:
I would be interested to see a stack trace of this crash. I was asking for this already. I'm able to play the media that is in included in the demo app. Can you provide me with a stack trace of the crash you are mentioning. Another way to make this actionable for us, would be to have repro steps with the demo app that explains how this can be reproduced. |
#minor-release Issue: androidx/media#452 PiperOrigin-RevId: 539915277 (cherry picked from commit 73fda2f)
Hey @mohsinDPRO. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @mohsinDPRO if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
Issue: androidx/media#452 #minor-release PiperOrigin-RevId: 539613535 (cherry picked from commit 44910cc)
Issue: androidx/media#452 #minor-release PiperOrigin-RevId: 539613535 (cherry picked from commit 44910cc)
Media3 Version
ExoPlayer 2.18.7
Devices that reproduce the issue
OnePlus 5T, 6, 6T
Android OS - 9, 10, 11, 12, 13
Devices that do not reproduce the issue
None that I know of
Reproducible in the demo app?
Yes
Reproduction steps
There are no logs in the console, which I could share
Expected result
Expected result is that the media should start playing on the chromecast device as well.
But apart from HLS rest of the streams are casting to the device, but not the HLS
Actual result
The selected title is shown on the tv screen, even the casting controls show up on the phone from which the casting session was initiated, but the stream does not starts playback on the TV ever
Media
Clear HLS: Angel One - this is the stream from the demo itself, which is not playing
Bug Report
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.The text was updated successfully, but these errors were encountered: