INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Flash Development With Webservices  (Read 2759 times)

BigUFGator

  • Recent member
  • *
  • Posts: 9
Flash Development With Webservices
« on: November 01, 2012, 12:24:12 am »

I've just downloaded the trial to start playing with JRiver to see if it fits my bill.  I have a Flex/Flash front end I've written for my home automation system and the next phase is to implement zoned audio control for my music. I was looking to see if I could use JRiver as the server and incorporate the controls into my existing app.

I have a few questions.

I don't see anything from a Flash perspective that allows a direct socket connection. It appears my two methods of connecting to the server are using the command line via NativeProcess or Webservices (which would be preferred so I could duplicate a good chunk of code in my Android client apps down the road).

Is Webservices what people making Flash front ends are using? If that's the case is there any way to get push notification when the server status changes (stop/start playing/pause, and more importantly a track change in a playlist)?

Is my only option to do polling? That seems it will introduce a lot of network overhead and while I could live it with for my desktop app, probably not so much for my Android clients.

It looks like there wasn't an answer to that question in this thread so I'm guessing there is none:
http://yabb.jriver.com/interact/index.php?topic=66343.0

Any feedback on how to proceed or pitfalls to look out for?

Thanks!
Logged

KoolADE

  • Recent member
  • *
  • Posts: 26
Re: Flash Development With Webservices
« Reply #1 on: November 02, 2012, 08:39:46 am »

Quote
I don't see anything from a Flash perspective that allows a direct socket connection.

Flash does natively support socket connections. See the documentation here:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/Socket.html

If push notifications are what you want, then Sockets are the way to go. Quite a bit more work than a web service, though.
Logged

BigUFGator

  • Recent member
  • *
  • Posts: 9
Re: Flash Development With Webservices
« Reply #2 on: November 02, 2012, 09:03:48 am »

Flash does natively support socket connections. See the documentation here:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/Socket.html

If push notifications are what you want, then Sockets are the way to go. Quite a bit more work than a web service, though.

I guess I didn't word it properly. I work with sockets in Flash, what I didn't see was that there was something native on the MC side to connect directly to. I'd definitely prefer a direct socket connection.

Would I have to write my own C++ plugin that creates a socket for my Flash app to connect to or is there something standard I can connect to directly to get events and notifications?
Logged

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Flash Development With Webservices
« Reply #3 on: November 02, 2012, 09:57:34 am »

A plugin is probably the way to go. The documentation in the WIKI is pretty good. There is also a lot of good help on the forum if you get stuck..
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

BigUFGator

  • Recent member
  • *
  • Posts: 9
Re: Flash Development With Webservices
« Reply #4 on: November 02, 2012, 02:09:35 pm »

A plugin is probably the way to go. The documentation in the WIKI is pretty good. There is also a lot of good help on the forum if you get stuck..

So that means I am going to need to write a plugin to act as a socket server and allow the Flash app to connect to it?  There is no means to do that directly?  Any examples of something like that?

I can handle the Flash end with no problem. The C++ end would be a bit more challenging.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42380
  • Shoes gone again!
Re: Flash Development With Webservices
« Reply #5 on: December 10, 2012, 12:03:00 pm »

I would recommend starting by building against MCWS and just do polling.

Adding the ability to register for notifications with MCWS is something we'd like to add, but I don't know when it will happen.
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up