73 lines
1.6 KiB
PHP
73 lines
1.6 KiB
PHP
<?php
|
|
use frontend\assets\CustomerAsset;
|
|
use backend\models\CustomerCreate;
|
|
CustomerAsset::register($this);
|
|
$options = [];
|
|
|
|
|
|
if ( $model instanceof frontend\models\CustomerCreate){
|
|
$options['image_data' ] = 'customercreate-photo_data';
|
|
}
|
|
$this->registerJs ( 'new Customer( '. json_encode($options).');' );
|
|
?>
|
|
|
|
<style>
|
|
.photo{
|
|
border: 1px solid gray;
|
|
}
|
|
|
|
#video {
|
|
border: 1px solid black;
|
|
box-shadow: 2px 2px 3px black;
|
|
width: 160px;
|
|
height: 120px;
|
|
}
|
|
|
|
#photo {
|
|
border: 1px solid black;
|
|
box-shadow: 2px 2px 3px black;
|
|
width: 160px;
|
|
height: 120px;
|
|
}
|
|
|
|
#canvas {
|
|
display: none;
|
|
}
|
|
|
|
.camera {
|
|
width: 160px;
|
|
display: inline-block;
|
|
}
|
|
|
|
.output {
|
|
width: 340px;
|
|
display: inline-block;
|
|
vertical-align: top;
|
|
}
|
|
|
|
.contentarea {
|
|
font-size: 16px;
|
|
font-family: "Lucida Grande", "Arial", sans-serif;
|
|
width: 760px;
|
|
}
|
|
|
|
</style>
|
|
|
|
<!--<div class="row" style='margin-top: 12px;' >-->
|
|
<!-- <div class="col-md-4">-->
|
|
<!-- <div id="my_camera" class='photo pull-left' style="width: 160px; height: 120px; margin-right: 12px;"></div>-->
|
|
<!-- <div id="my_result" class='photo pull-left' style="width: 160px; height: 120px;"></div>-->
|
|
<!-- </div>-->
|
|
<!-- <div class="col-md-4">-->
|
|
<!-- </div>-->
|
|
<!--</div>-->
|
|
|
|
<div class="camera">
|
|
<video id="video">Video stream not available.</video>
|
|
<!-- <button id="startbutton">Take photo</button>-->
|
|
</div>
|
|
<canvas id="canvas"> </canvas>
|
|
<div class="output">
|
|
<img id="photo" alt="The screen capture will appear in this box." />
|
|
</div>
|
|
<a id="snap" class="btn btn-primary" style="margin-top: 6px;" >Fénykép</a>
|