logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ngaanyatjarramedia  
#1 Posted : Thursday, April 4, 2013 4:03:39 AM(UTC)
ngaanyatjarramedia

Rank: Member

Groups: Registered
Joined: 4/3/2013(UTC)
Posts: 14
Location: wingellina

Thanks: 5 times
Hi there, as most of our camera operators have ipods or web enabled phones could it be possible to have a webpage that each camera operator could go to via local wifi?

http://192.168.16.117:8088/camera1.htm camera2.htm etc

The tally page would just have to have a square that changed from red to green [or whatever colour you liked...] it could also be possible to have a symbol to let the camera operator know they were cue'd up and about to go live. Maybe even a countdown in some distant update.

This functionality could be extended inn the future to allow communication with the director via a headset or even a preview video.

R.
jwolthuis  
#2 Posted : Thursday, April 4, 2013 11:52:36 AM(UTC)
jwolthuis

Rank: Member

Groups: Registered
Joined: 3/11/2013(UTC)
Posts: 26

Thanks: 1 times
Was thanked: 9 time(s) in 6 post(s)
If your vMix computer can also act as a web server, your camera1.htm file would look like this:
Code:
<!DOCTYPE html>
<html>
<head>
  <title>Camera 1</title>
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
</head>
<body style="background-color: black;">

  <div id="light" style="width: 100px; height: 100px;" ></div>

  <script>
    $CAMERA_NUMBER = '1';

    $(document).ready(function () {
      update();
    });

    function update() {
      $.ajax({
        url: 'http://localhost:8088/api',
        success: function (data) {
          $("#light").each(function () {
            if ($(data).find('preview').text() == $CAMERA_NUMBER) { $(this).css("background-color", "green"); }
            else if ($(data).find('active').text() == $CAMERA_NUMBER) { $(this).css("background-color", "red"); }
            else { $(this).css("background-color", "black"); }
          });

          window.setTimeout(update, 1000);
        }
      });
    }
  </script>
</body>
</html>


This code assumes that the capture input for Camera 1 is 1st. You can change the $CAMERA_NUMBER variable to create camera2.htm and camera3.htm.

Just point your phone/tablets to the proper cameraX.htm file.

Jon
thanks 1 user thanked jwolthuis for this useful post.
ngaanyatjarramedia on 4/4/2013(UTC)
ngaanyatjarramedia  
#3 Posted : Thursday, April 4, 2013 7:27:44 PM(UTC)
ngaanyatjarramedia

Rank: Member

Groups: Registered
Joined: 4/3/2013(UTC)
Posts: 14
Location: wingellina

Thanks: 5 times
Thanks Jon,

Have a web server running. I've tried your code in an html file in the web folder, it loads but the colours do not update.

I'm not very good at jQuery, but will have a play with it and see if I can get it working here.

Thanks for the reply, I didn't realise it would be possible right away! :)
jwolthuis  
#4 Posted : Thursday, April 4, 2013 7:37:02 PM(UTC)
jwolthuis

Rank: Member

Groups: Registered
Joined: 3/11/2013(UTC)
Posts: 26

Thanks: 1 times
Was thanked: 9 time(s) in 6 post(s)
It looks like the ajax request might be getting blocked by your browser. Let me play with the code some more, ti see if I can work around the block.

Jon
ngaanyatjarramedia  
#5 Posted : Friday, April 5, 2013 12:20:48 PM(UTC)
ngaanyatjarramedia

Rank: Member

Groups: Registered
Joined: 4/3/2013(UTC)
Posts: 14
Location: wingellina

Thanks: 5 times
In Chrome it came up with an error:

"xmlhttprequest error 101"

So I think it *might* have something to do with the browsers thinking it is a cross domain ajax request... even though it is on the same machine...

There may be a way around it with PHP, but it's almost 2AM and I have work at 8!

See here if you have time:
http://www.paulund.co.uk/make-cross-domain-ajax-calls-with-jquery-and-php

R.
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.