<!doctype html>
<html lang="en">
<head>
    <title>Xibo Open Source Digital Signage</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=1920" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!-- Copyright 2006-2018 Spring Signage Ltd. Part of the Xibo Open Source Digital Signage Solution. Released under the AGPLv3 or later. -->
    <style type="text/css">
        body {
            margin: 0;
            overflow: hidden;
            font-family: sans-serif, Arial, Verdana, "Trebuchet MS";
        }
        h1, h2, h3, h4, p {
            margin-top: 0;
        }
        #iframe {
            border: 0;
        }
        .cycle-slide p, p.cycle-slide {
            margin-bottom:0;
        }
    </style>
    <style type="text/css">
                video {
                    width: 100%; 
                    height: 100%;
                }
            </style>

    
</head>
<!--[if lt IE 7 ]><body class="ie6"><![endif]-->
<!--[if IE 7 ]><body class="ie7"><![endif]-->
<!--[if IE 8 ]><body class="ie8"><![endif]-->
<!--[if IE 9 ]><body class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><body><!--<![endif]-->
<div id="content"><video id="video" poster="/xib/web/library/download/111?preview=1" ></video>
</div>
</body>
<script type="text/javascript">var options = {}; var items = {};</script>
<script type="text/javascript" src="/xib/web/library/download/1?preview=1"></script>
<script type="text/javascript" src="/xib/web/library/download/110?preview=1"></script>
<script type="text/javascript">
                $(document).ready(function() {
            
                    if(Hls.isSupported()) {
                        var video = document.getElementById("video");
                        var hls = new Hls({
                            autoStartLoad: true,
                            startPosition : -1,
                            capLevelToPlayerSize: false,
                            debug: false,
                            defaultAudioCodec: undefined,
                            enableWorker: true
                        });
                        hls.loadSource("https://www.youtube.com/watch?v=SCsuKzPqHc8&list=PLNgp-9b30eAs_6h9Tz8f9GuGcSukH0pI0");
                        hls.attachMedia(video);
                        hls.on(Hls.Events.MANIFEST_PARSED, function() {
                          video.play();
                        });
                        hls.on(Hls.Events.ERROR, function (event, data) {
                            if (data.fatal) {
                                switch(data.type) {
                                    case Hls.ErrorTypes.NETWORK_ERROR:
                                        // try to recover network error
                                        //console.log("fatal network error encountered, try to recover");
                                        hls.startLoad();
                                        break;
                                    
                                    case Hls.ErrorTypes.MEDIA_ERROR:
                                        //console.log("fatal media error encountered, try to recover");
                                        hls.recoverMediaError();
                                        break;
                                        
                                    default:
                                        // cannot recover
                                        hls.destroy();
                                        break;
                                }
                            }
                        });
                     }
                });
            </script>

</html>

