UNPKG

goproh4

Version:

API for controlling GoPro Hero 4 cameras

45 lines (43 loc) 1.28 kB
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=320, initial-scale=1"/> <title>GoProH4 live feed</title> <style type="text/css"> html, body { background: #333; text-align: center; margin: 0; height: 100%; padding: 0; overflow: hidden; } #videoCanvas { margin: 0; height: 100%; } </style> </head> <body> <!-- The Canvas size specified here is the "initial" internal resolution. jsmpeg will change this internal resolution to whatever the source provides. The size the canvas is displayed on the website is dictated by the CSS style. --> <canvas id="videoCanvas"> <p> Please use a browser that supports the Canvas Element, like <a href="http://www.google.com/chrome">Chrome</a>, <a href="http://www.mozilla.com/firefox/">Firefox</a>, <a href="http://www.apple.com/safari/">Safari</a> or Internet Explorer 10 </p> </canvas> <script type="text/javascript" src="jsmpg.js"></script> <script type="text/javascript"> // Setup the WebSocket connection and start the player var client = new WebSocket( 'ws://127.0.0.1:8084/' ); var canvas = document.getElementById('videoCanvas'); var player = new jsmpeg(client, {canvas:canvas}); </script> </body> </html>