
<div class="container">
    <div class="section">

      <div class="row" style="width:70%">
				
				<div class="row">
                <div style="text-align:center"> 
                    <button  class='waves-effect waves-light btn' onclick="playPause()">Play/Pause</button> 
                    <button class='waves-effect waves-light btn' onclick="makeBig()">Big</button>
                    <button class='waves-effect waves-light btn' onclick="makeSmall()">Small</button>
                    <button class='waves-effect waves-light btn' onclick="makeNormal()">Normal</button>
                    <br><br>
                    <video id="video1" name="video1"  width="420" loop autoplay>
                        <source src="http://rosetaxis.dedicated.co.za/videos/JlOyb_RTejo.mp4" type="video/mp4">
                        Your browser does not support HTML5 video.
                    </video>
                </div>      
						
				</div>
                <br/>
                <button class='waves-effect waves-light btn' onclick="window.history.back();">Back</button>

      </div>
      
    </div>
</div>

<script type="text/javascript" language="javascript">
    $(document).ready(function() {
        
        var video_id = getUrlParameterPlain("video_id");
        console.log(video_id);

        if(video_id == null || video_id == undefined)
        {
            window.location= "?page=topics";
        }
        else{
            try{
                var videoFile = 'http://rosetaxis.dedicated.co.za/videos/'+video_id+'.mp4';
                $('#video1 source').attr('src', videoFile);
                $("#video1").load(); 
            }
            catch(exception)
            {
                alert("An error occured while loading your video.\n Please try again later");
                window.history.back();
            }

    }

    });

    var myVideo = document.getElementById("video1"); 

    function playPause() { 
        if (myVideo.paused) 
            myVideo.play(); 
        else 
            myVideo.pause(); 
    } 

    function makeBig() { 
        myVideo.width = 560; 
    } 

    function makeSmall() { 
        myVideo.width = 320; 
    } 

    function makeNormal() { 
        myVideo.width = 420; 
    } 
</script>