Skip to content

Commit c9f5882

Browse files
committed
Fullscreen youtube and properly size vimeo
1 parent 631a139 commit c9f5882

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

application/modules/default/views/scripts/video/watchvimeo.phtml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,18 @@
2525
?>
2626
<h1><?php echo $this->entryVideo['name'];?></h1>
2727
<div id="videoarea">
28-
<?php echo $this->entryVideo['embed']['html']; ?>
28+
<iframe id="video"
29+
src="https://player.vimeo.com/video/<?php
30+
echo substr($this->entryVideo['uri'], 8);
31+
?>?byline=0&portrait=0"
32+
width="720"
33+
height="405"
34+
frameborder="0"
35+
webkitallowfullscreen
36+
mozallowfullscreen
37+
allowfullscreen
38+
>
39+
</iframe>
2940
</div>
3041
<div id="infoarea">
3142
<h3>Uploaded on <?php echo date('d/m/Y H:i', strtotime($this->entryVideo['created_time']));

application/modules/default/views/scripts/video/watchyoutube.phtml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@
2626
<h1><?php echo $this->entryVideo->getSnippet()->title;?></h1>
2727
<div id="videoarea">
2828
<iframe
29+
id="video"
2930
class="youtube-player"
3031
type="text/html"
31-
width="640"
32-
height="385"
33-
src="<?php echo $this->strScheme; ?>://www.youtube.com/embed/<?php echo $this->entryVideo->id; ?>"
32+
width="720"
33+
height="405"
34+
src="https://www.youtube.com/embed/<?php echo $this->entryVideo->id; ?>"
3435
frameborder="0"
36+
allowfullscreen
3537
>
3638
</iframe>
3739
</div>

0 commit comments

Comments
 (0)