File size: 1,787 Bytes
d3a385c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Camera Capture App</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
    <div class="container">
        <h1>Camera Capture App</h1>
        {% with messages = get_flashed_messages() %}
            {% if messages %}
                <div class="flash-messages">
                    {% for message in messages %}
                        <p>{{ message }}</p>
                    {% endfor %}
                </div>
            {% endif %}
        {% endwith %}
        
        <div id="camera-section">
            <div id="camera-icon" class="camera-icon">📷</div>
            <div id="camera-container" style="display: none;">
                <select id="camera-select">
                    <option value="user">Front Camera</option>
                    <option value="environment">Back Camera</option>
                </select>
                <video id="video" autoplay playsinline></video>
                <button id="capture-btn">Capture</button>
            </div>
        </div>
        
        <div id="preview-section" style="display: none;">
            <canvas id="canvas" style="display: none;"></canvas>
            <img id="preview-img" src="" alt="Captured Image">
            <div class="button-group">
                <button id="retake-btn">Retake</button>
                <button id="upload-btn">Upload to Instagram</button>
            </div>
        </div>
    </div>
    <script src="{{ url_for('static', filename='js/script.js') }}"></script>
</body>
</html>