-
Notifications
You must be signed in to change notification settings - Fork 54
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
media not playing when casting + casting youtube videos #75
Comments
Okay, easier question first: If you are just opening the actual youtube page in an ionic/cordova webview, there is a tiny (extremely tiny) chance that if you call |
Actually, the first question might have been easier. :p You should be fine using the default receiver. I believe the reason that you aren't seeing any video is because you aren't calling loadMedia anywhere. |
I would also recommend using version 1.1.0 of the plugin (I just made some bug fixes but the changes haven't been incorporated here yet) |
@Lindsay-Needs-Sleep Thank you! You are absolutely right, the problem was not calling I will be using As far as Youtube, I think the better solution would be to build a custom receiver that uses the Youtube API to play the video from the |
That does sound like it would be a better solution!
Hmm I haven’t done any work with a custom receiver really... But I think the way you would get custom info to your receiver easiest would probably be via sendMessage (I can’t remember if it is media.sendMessage or session.sendMessage [I guess it is only appropriate in this case if it is session.sendMessage though :p])
You would want to create a custom namespace string for your custom communications. One of the open issues I created [something to do with setPlaybackRate I think] has a small sample of how to use sendMessage from the sender side. You would have to find other docs for how to set up the listener on the receiver. I have briefly seen them somewhere I believe...
sendMessage partially exists in Android (I played with it a bit the other day, seems the only problem is that the callback always returns with an error even on a successful communication).
As for iOS, I can’t remember at all if we translated the sendMessage function to objc. (a ctrl+f of the src/ios files should provide an answer about it’s existence though! You can also try the sample code from my other issue to just see if it works at all.)
On Nov 4, 2020, at 06:45, Esteban Sánchez <[email protected]<mailto:[email protected]>> wrote:
@Lindsay-Needs-Sleep<https://github.com/Lindsay-Needs-Sleep> Thank you! You are absolutely right, the problem was not calling loadMedia within a successful sessionRequest (didn't realize I wasn't calling it lol).
I will be using v1.1.0, thank you for the tip.
As far as Youtube, I think the better solution would be to build a custom receiver that uses the Youtube API to play the video from the videoId, but this would only work if I'm able to pass the videoId that I get from my backend to the custom receiver through this cast plugin. Is there a way to pass custom data (like the videoId) via cast from my ionic app to my custom receiver using this plugin?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#75 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AMLADYZ3POCOUSJLKIMK3BLSOFLITANCNFSM4TJIIZVA>.
|
Thank you! I will go ahead and try to do this following the roadmap you mention! |
Hi there! First of all, thank you for creating this plugin. I was trying to implement this plugin using @ionc/angular with cordova following th example code in the repo but whenever I select the device to cast the video it doesn't show anything on the smartTV screen but the casting icon and not the media. I'm using the default receiver appId as you do in the example, but would I have to make and register a custom receiver to be able to play the video on a smartTV or chromecast?
This is my implementation:
And on the html
YOUTUBE - This really isn't an issue, but was looking through the repo and issues but didn't find any mention to casting Youtube videos and I was wondering if this was possible with this plugin.
The text was updated successfully, but these errors were encountered: