Guest User

Video Div Code

a guest
Jan 20th, 2015
574
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.49 KB | None | 0 0
  1.     <div id="content" style="-moz-border-radius: 10px; border-radius: 10px; background-color:rgba(0,0,0,0.3); width: 70% !important; height: 70% !important; top: 15%; left: 15%; position: absolute; max-width: 1150px;">
  2.    
  3.         <div id="current_vid" style="width: 50%; height: 100%; float: left; min-width: 328px; position: absolute; left: 15px; bottom: 15px;">
  4.            
  5.             <?php
  6.             $ytDataEx = json_decode(file_get_contents('https://www.googleapis.com/youtube/v3/videos?id=' . $current_vid. '&key=AIzaSyC09WYFrt98J9E0ZiQu99URiWy7kgtIAbY&part=snippet,statistics&fields=items(snippet(title,description,publishedAt),statistics(viewCount,likeCount))'));
  7.             $snippet = $ytDataEx->items[0]->snippet;
  8.             $stats = $ytDataEx->items[0]->statistics;
  9.             $vid_title = $snippet->title;
  10.             $vid_desc = $snippet->description;
  11.             $vid_date = $snippet->publishedAt;
  12.             $vid_view = $stats->viewCount;
  13.             $vid_like = $stats->likeCount;
  14.            
  15.             ?>
  16.            
  17.  
  18.             <div id="title" style="width:100%; height: 50px; text-align:center; position: absolute; overflow: hidden;">
  19.                 <h1 style="font-family: 'Righteous'; font-size: 23px; -webkit-text-stroke: 1px black; color: white; text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;"><?php echo $vid_title ?></h1>
  20.             </div>
  21.             <div id="cont" style="width: 100%; position: absolute; top: 65px; bottom: 15px; display: block !important;">
  22.                 <div style="height: 50%; position: relative;">
  23.                     <div class="videoWrapper">                            
  24.                         <iframe width="560" height="349" src="http://www.youtube.com/embed/<?php echo $current_vid ?> ?rel=0&hd=1" frameborder="0" allowfullscreen></iframe>
  25.                     </div>
  26.                 </div>
  27.                 <div id="vid_meta" style="height: 50%; overflow-y:auto; margin-top: 20px; position: relative; display: block !important;">
  28.                     <div id="desc">
  29.                         <?php echo $vid_desc ?>
  30.                     </div>
  31.                 </div>
  32.             </div>
  33.        
  34.  
  35.        
  36.         </div>
  37.         <div id="other_vids" style="width: 50%; height: 100%; float: left;padding-top: 50px; left: 50%; padding-left: 15px; position: absolute;">
  38.                 <div id="choices" style="width: 95%; height: 95%; overflow-y:auto;">
  39.                         <?php
  40.                                 for($i = 0; $i < count($vid_ids); ++$i) {
  41.                                         echo "<div class=\"choice\" style=\"width: 150px; height: 120px; margin-left: 15px !important; margin-bottom: 15px; float: left;background-image: url('http://img.youtube.com/vi/" . $vid_ids[$i] . "/0.jpg'); background-size: contain;background-repeat:no-repeat;\"></div>";
  42.                                 }
  43.                         ?>
  44.                 </div> 
  45.         </div>
  46.  
  47.  
  48.     </div>
Advertisement
Add Comment
Please, Sign In to add comment