KHerron / SonyAPILib

Sony Smart Device C# API Library for remote control
GNU Lesser General Public License v3.0
55 stars 19 forks source link

Not a code issue per se, but shouldn't there be an easier way? #14

Open glenking opened 7 years ago

glenking commented 7 years ago

As I've not written any code since the Commodore 64, I'm a bit stumped with all this. Somehow, I am imagining it should be easier. That for a Bravia Android TV running YouTube, it should be possible to have a very small body of code that, when you add in the 'dfW4edfr03' or whatever is the name of the vid you want, and then POST it with the correct headers, it loads and runs the video you named. As an example, if I run the following code it starts the YouTube app:

{"method":"setActiveApp","params":[{"uri":"com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.activity.TvGuideActivity"}],"id":10, "version":"1.0"}

IF I change the to uri to {"method":"setActiveApp","params":[{"uri":"com.sony.dtv.com.amazon.aiv.eu.com.amazon.ignition.IgnitionActivity"}],"id":10, "version":"1.0"}, it opens Amazon Videos.

Short and sweet. Sooo... there isn't a simple short program that will simply open the existing YouTube app and start a particular video?

KHerron commented 7 years ago

I have not worked with the Bravia Android TV’s.

My API was originally written for TV generation prior to 2015, even though it has worked with newer models.

It appears you are sending a direct JSON command to the TV.

This is something I have not tried or worked with.

My Bravia is only a Generation 1, and does not use the newer JSON commands.

I would think that the actual movie should be included in the URI.

Possibly something like this:

{"method":"setActiveApp","params":[{"uri":"com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.activity.TvGuideActivity. https://youtu.be/oJ2kZUGa5-0"}],"id":10, "version":"1.0"}

Kirk

From: glenking [mailto:notifications@github.com] Sent: Tuesday, February 28, 2017 5:33 PM To: KHerron/SonyAPILib Cc: Subscribed Subject: [KHerron/SonyAPILib] Not a code issue per se, but shouldn't there be an easier way? (#14)

As I've not written any code since the Commodore 64, I'm a bit stumped with all this. Somehow, I am imagining it should be easier. That for a Bravia Android TV running YouTube, it should be possible to have a very small body of code that, when you add in the 'dfW4edfr03' or whatever is the name of the vid you want, and then POST it with the correct headers, it loads and runs the video you named. As an example, if I run the following code it starts the YouTube app:

{"method":"setActiveApp","params":[{"uri":"com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.activity.TvGuideActivity"}],"id":10, "version":"1.0"}

IF I change the to uri to {"method":"setActiveApp","params":[{"uri":"com.sony.dtv.com.amazon.aiv.eu.com.amazon.ignition.IgnitionActivity"}],"id":10, "version":"1.0"}, it opens Amazon Videos.

Short and sweet. Sooo... there isn't a simple short program that will simply open the existing YouTube app and start a particular video?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/KHerron/SonyAPILib/issues/14 , or mute the thread https://github.com/notifications/unsubscribe-auth/AEwTb6H_gCgubD6TrCSefrQ7KkiWFIc8ks5rhKCkgaJpZM4MO-Us . https://github.com/notifications/beacon/AEwTb3iWdrfGuyeM873BtFCW1CNhxlJGks5rhKCkgaJpZM4MO-Us.gif


This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

glenking commented 7 years ago

Thanks, I had tried many permutations of that without success. I kept on getting "illegal Json" errors.

KHerron commented 6 years ago

@glenking,

Going back through these, to clear them out and was wondering if you ever resolved your issue. Sony has discontinued YouTube on my TV, during one of the updates.

Was this possibly your issue?

glenking commented 6 years ago

Thanks for the followup.

First, sorry to hear Sony deleted YouTube from your tv.

What I eventually settled on was the joaoapp called AutoCast. It casts the vid from an android tablet to the TV. Works very well.