Package Exports
- @cameratag/camera
- @cameratag/camera/camera.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cameratag/camera) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
CameraTag's Video Recorder
This library allows you to embed a CameraTag <camera> video recorder in your product.
Initialize A Recorder
'Magically' initialize your recorder using HTML
<camera
id='myFirstCamera'
data-app-id='a-6793d070-dbac-013b-f57a-529b7d4fe95c'>
</camera>
<script>
CameraTagCamera.setup(); // Scan DOM for new <camera> tags
// if you need to access the newly initialized <camera>
// you can get a handle with.
myCamera = CameraTagCamera.instances["myFistCamera"];
</script>
Manually initialize your recorder using JS
<div id="load_recorder_here"></div>
<script>
CameraTagCamera = require("@cameratag/camera");
var el = document.getElementById("load_recorder_here");
var myCamera = new CameraTagCamera();
myCamera.init(el, {
id: 'myFirstCamera'
appUuid: 'a-6793d070-dbac-013b-f57a-529b7d4fe95c',
})
<script>
Control The Recorder
You can control your <camera> with methods from our JS API
After you get a handle on a <camera> you can call methods on it like so:
myCamera.record();
Observe The Recorder
You can also observe events fired by the <camera> and trigger your own code. View our our docs to see the full list of events fired from the <camera>
myCamera.ovbserve("recordingStarted", function(){
console.log("You are recording!")
});