<!doctype html>
<html lang="fa">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" type="text/css" href="/dist/css/filmaa.css"/>
    <link href="/dist/css/video-js.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/dist/css/quality-selector.css"/>
    <link rel="stylesheet" type="text/css" href="/dist/css/videojs-filmaa.css"/>

    <script src="/dist/js/video6.2.0.min.js"></script>
    <script src="/dist/js/videojs-http-streaming.min.js"></script>
    <script src="/dist/js/silvermine-videojs-quality-selector.min.js"></script>


    <title>فیلما - <?php echo e($product['name']); ?></title>

</head>
<body>
<div>

    <div class="full-width-div">
        <video
                id="my-player"
                class="video-js"
                controls
                preload="auto"
                poster="<?php echo e($product['image']); ?>">
				<?php
				$product['files'] = array_reverse($product['files']);
				?>
            <?php $__currentLoopData = $product['files']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $file): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <source src="<?php echo e($file['file']); ?>" type="<?php echo e($file['file_type']); ?>" label="<?php echo e($file['quality_label']); ?>">
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            <p class="vjs-no-js">
                مرورگر شما از پخش ویدئو پشتیبانی نمی‌کند
            </p>
        </video>
    </div>
</div>

<script src="/dist/vendor/jquery/jquery.min.js"></script>

<script>

    var options = {
        ControlBar: {
            children: [
                'playToggle',
                'volumePanel',
                'currentTimeDisplay',
                'timeDivider',
                'durationDisplay',
                'progressControl',
                'liveDisplay',
                'seekToLive',
                'remainingTimeDisplay',
                'customControlSpacer',
                'playbackRateMenuButton',
                'chaptersButton',
                'descriptionsButton',
                'subsCapsButton',
                'audioTrackButton',
                'fullscreenToggle',
                'QualitySelector'
            ]
        },
        width: window.innerWidth,
        height: window.innerHeight,
    };

    var player = videojs('my-player', options, function onPlayerReady() {
        //videojs.log('Your player is ready!');
        $('.vjs-fullscreen-control').click();
        // In this context, `this` is the player that was created by Video.js.
        //this.play();

        // How about an event listener?
        /* this.on('ended', function () {
             videojs.log('A www ...over so soon?!');
         });*/
    });


    (function () {

        function keyEventHandler(e) {
            switch (e.keyCode) {
                case 40:
                    //down
                    break;
                case 37:
                    //left
                    player.currentTime(player.currentTime() - 10);
                    break;
                case 39:
                    //right
                    player.currentTime(player.currentTime() + 10);
                    break;
                case 38:
                    //up
                    break;
                case 13:
                    //enter
                    player.paused() ? player.play() : player.pause();
                    break;
                case 82:
                    //back or R
                    window.history.back();
                    break;

            }

        }

        document.addEventListener('keydown', keyEventHandler);


    }());

</script>

</body>
</html>
<?php /**PATH D:\filmaa.ir\resources\views/frontend/player.blade.php ENDPATH**/ ?>