Skip to content

Commit

Permalink
Add video streaming on start button
Browse files Browse the repository at this point in the history
  • Loading branch information
Finchiedev committed Nov 17, 2018
1 parent 7c29bbe commit c027c7e
Show file tree
Hide file tree
Showing 69 changed files with 25 additions and 14 deletions.
Empty file modified App/CSS/main.css
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified App/JS/Resources/CurrentEmuBotCode2/basic_classes.py
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/CurrentEmuBotCode2/client.py
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/CurrentEmuBotCode2/connect.py
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/CurrentEmuBotCode2/constants.py
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/CurrentEmuBotCode2/controller.py
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/CurrentEmuBotCode2/switch.py
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/CurrentEmuBotCode2/wheel_arm_class.py
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/.gitignore
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/README.md
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/lib/_server.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/lib/ffmpeg.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/lib/raspivid.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/lib/remotetcpfeed.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/lib/static.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/package.json
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/public/index.html
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/samples/admiral.264
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/samples/out.h264
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/server-ffmpeg.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/server-rpi.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/server-static.js
100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion App/JS/Resources/Player/server-tcp.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ const server = http.createServer(app);

const feed = new RemoteTCPFeedRelay(server, {
feed_ip : "192.168.100.1",
feed_port : 5000,
feed_port : 5002,
});


server.listen(8080);
console.log("Video server listening on port 8080")
Empty file modified App/JS/Resources/Player/vendor/.gitignore
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/.npmignore
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/AUTHORS
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/LICENSE
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/README.md
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/broadway/Decoder.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/canvas/FilterWebGLCanvas.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/canvas/Program.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/canvas/README.md
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/canvas/Script.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/canvas/Shader.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/canvas/Texture.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/canvas/WebGLCanvas.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/canvas/YUVCanvas.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/canvas/YUVWebGLCanvas.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/dist/http-live-player.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/package.json
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/utils/Size.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/utils/assert.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/utils/error.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/utils/glUtils.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/utils/inherit.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/Player/vendor/wsavc/index.js
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/camera.sh
100644 → 100755
Empty file.
Empty file modified App/JS/Resources/settings.json
100644 → 100755
Empty file.
Empty file modified App/JS/camera.js
100644 → 100755
Empty file.
Empty file modified App/JS/client.js
100644 → 100755
Empty file.
Empty file modified App/JS/controller.js
100644 → 100755
Empty file.
Empty file modified App/JS/executeShellCommand.js
100644 → 100755
Empty file.
Empty file modified App/JS/main.js
100644 → 100755
Empty file.
Empty file modified App/Mobile/server.js
100644 → 100755
Empty file.
Empty file modified App/Mobile/ws.html
100644 → 100755
Empty file.
Empty file modified App/Mobile/ws.js
100644 → 100755
Empty file.
Empty file modified App/camera.html
100644 → 100755
Empty file.
Empty file modified App/charts.html
100644 → 100755
Empty file.
Empty file modified App/control.html
100644 → 100755
Empty file.
Empty file modified App/controlTest.html
100644 → 100755
Empty file.
36 changes: 23 additions & 13 deletions App/index.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<title>Dashboard</title>
<link rel="stylesheet" href="CSS/main.css">
<script type="text/javascript" src="JS/main.js"></script>
<!-- <script type="text/javascript" scr="JS/Resources/Player/server-tcp.js"></script>
<script type="text/javascript" src="JS/client.js"></script> -->
<!-- <script type="text/javascript" scr="JS/Resources/Player/server-tcp.js"></script> -->
<!-- <script type="text/javascript" src="JS/client.js"></script> -->
<script type="text/javascript">
var net = require('net');
var client = new net.Socket();
Expand Down Expand Up @@ -44,9 +44,9 @@
while (true) {
clientSocket.write('02' + axisValue(1, 3));
await sleep(interval);
clientSocket.write('01' + axisValue(2, 1));
clientSocket.write('04' + axisValue(3, 3));
await sleep(interval);
clientSocket.write('04' + axisValue(3, 3));
clientSocket.write('01' + axisValue(2, 1));
await sleep(interval);
clientSocket.write('03' + axisValue(4, 1));
}
Expand Down Expand Up @@ -82,17 +82,33 @@

function start() {
// console.log("test")
writeToServer('VIDEO')
var video = runScript('App/JS/Resources/Player/server-tcp.js');
setTimeout(function() {
var iframe = document.createElement('iframe');
iframe.setAttribute('id', 'camera-view');
iframe.setAttribute('src', 'http://localhost:8080');
iframe.setAttribute('width', '1000');
iframe.setAttribute('height', '625');
var markerPoint = document.getElementById('marker');

markerPoint.parentNode.insertBefore(iframe, markerPoint);
}, 1000)
writeToServer('START');
// console.log("test 2")
document.getElementById('toggle').style.visibility = 'hidden';
setTimeout(function() {
clientSocket.connect(9999, '192.168.100.1', function() {
window.addEventListener("gamepadconnected", function(event) {
pollGamepad(130);
});
});
// runScript('./App/JS/client.js', function (err) {

// video.kill('SIGINT')
// runScript('./App/JS/Resources/Player/server-tcp.js', function (err) {
// if (err) throw err;
// });

}, 3000)
// // setTimeout(function() {
// console.log('Starting client...');
Expand All @@ -110,13 +126,7 @@
// if (err) throw err;
// });
// //Opens camera feed
// var iframe = document.createElement('iframe');
// iframe.setAttribute('id', 'camera-view');
// iframe.setAttribute('src', 'http://localhost:8080');
// iframe.setAttribute('width', '1000');
// iframe.setAttribute('height', '625');
// var markerPoint = document.getElementById('marker');
// markerPoint.parentNode.insertBefore(iframe, markerPoint);

// }, 3000)
}
</script>
Expand All @@ -135,7 +145,7 @@
</div>
<div class="main">
<h1 class="text" id="main-header">Dashboard - Robotics GUI</h1>
<button type="button" name="button" onclick="start()" id="start">Start</button>
<button type="button" name="button" onclick="start()" id="toggle">Start</button>
<p id="marker"></p>
</div>
</body>
Expand Down
Empty file modified App/settings.html
100644 → 100755
Empty file.
Empty file modified App/testing.html
100644 → 100755
Empty file.
Empty file modified App/version.html
100644 → 100755
Empty file.

0 comments on commit c027c7e

Please sign in to comment.