Not knowing what you have in mind, but still I was thinking a bit along your question.
One (not too complex) way to to control a
It will not work for videos of on third-party portals such as Vimeo or Youtube, but you could use this way to control videos on a site that you created by yourself:
So the connection/data flow would be:
You could implement this in different ways: either control all connected Browsers at the same time or chose only one/some of the connected browsers to control.
For the latter you'll first need to generate some kind of unique ID within each web-client (connected browser) and send it back to the Max patch, so that you can identify them.
feel free to e-mail me if you have questions around that project and the pubnub thing. jan[at]janmech[dot]de. Btw, are you still in Berlin? You might not remember we once met there a few years ago. I'll be there most likely beginning/mid june.
sorry for this long post, I didn't had the time to make it short ;)
It's not a trivial task... (But I hope someone proves me wrong ;) ). You are right, pubnub requires internet access. If you want to go for the html5/
problem number 2:
You should be aware that even though most mobile browsers support the
In any case it will never be precisely in sync. you will have different delay times on each client.
for the first problem:
As I said, I don't see a "2-liner" solutuin, so let me give you some background information first...
http is by it's nature a "stateless" protocol. In other words the client (browser) has to send a request to the server and only after that request the "connection" between client and server is opened. The server now can send data to the client. Once the data are transmitted, the connection is closed and the server cannot send anything to the client.
It is called stateless, because the server has no information about the state of the client.
(nowadays also web-sockets exist, which are a bidirectional connection, but i'll come to that later..)
So by it's pure design http wouldn't allow to build something like a chat, where messages are "pushed" from the server to the client. There are two solutions/workarounds:
- a so-called comet implementation (this is what pubnub is using).
It is really a 1-liner: http://www.w3schools.com/js/js_timing.asp
BUT it causes very high load on the server. so if you try this option, you need to make performance tests with the server.
So finally the last option: web sockets.
web sockets work much like regular network connection, just via internet protocols, hence a browser can use them. (I have no information about the support of web sockets on different mobile browsers, that would be something to research... )
With a web socket a bidirectional connection between the client and the server is opened, and it stays open until it is closed. when the server sends data to the client a callback function triggered to do something with that data. the client part for a web socket seems to be quite straight forward. This is a jQuery plugin - though I haven't used it yet:
On the server side it is more tricky, you will have to create a small web-app (i.e. php program) to set up the socket. Some static pages providing the player and the videos won't do the trick.
To make a long story short:
I think the easies solution would be to give the WiFi network you are using an internet connection and go with pubnub (even though it is a technical overkill in the backend most of the work is already done by te push service).
As a second option you can try the pulling approach.
Hope that helps at least a bit and dosen't confuse even more ... ;)
Lastly there might be some streaming solutions, but I don't have much knowledge about that...
We’ve developed a new HTML5 player that plays with transparency and looks exactly like the old Flash player (not with a white background - real transparency over Chrome and FireFox browsers). Here’s an example: