Bouton plein écran
This commit is contained in:
parent
989c159aa9
commit
9977ec89b7
21
index.html
21
index.html
@ -70,7 +70,7 @@
|
|||||||
<i class="fa fa-angle-down fa-2x" aria-hidden="true"></i>
|
<i class="fa fa-angle-down fa-2x" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a id="video-sound" class="btn btn-default">
|
<a id="video-sound" class="btn btn-default" href="#">
|
||||||
<svg class="icone icone-son" aria-hidden="true">
|
<svg class="icone icone-son" aria-hidden="true">
|
||||||
<use xlink:href="/vector/sprite.svg#sound-off"></use>
|
<use xlink:href="/vector/sprite.svg#sound-off"></use>
|
||||||
</svg>
|
</svg>
|
||||||
@ -80,6 +80,10 @@
|
|||||||
<i class="fa fa-youtube fa-2x" aria-hidden="true"></i>
|
<i class="fa fa-youtube fa-2x" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<a id="fullscreen-video" class="btn btn-default" href="#">
|
||||||
|
<i class="fa fa-arrows-alt fa-2x" aria-hidden="true"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section class="bg-primary" id="about">
|
<section class="bg-primary" id="about">
|
||||||
@ -212,6 +216,7 @@
|
|||||||
<script>
|
<script>
|
||||||
var masthead_video = document.getElementById("masthead-video");
|
var masthead_video = document.getElementById("masthead-video");
|
||||||
var video_button = document.getElementById("video-sound");
|
var video_button = document.getElementById("video-sound");
|
||||||
|
var fullscreen_button = document.getElementById("fullscreen-video");
|
||||||
|
|
||||||
function masthead_video_mute(mute) {
|
function masthead_video_mute(mute) {
|
||||||
player.setMute(mute);
|
player.setMute(mute);
|
||||||
@ -238,6 +243,20 @@
|
|||||||
player.play();
|
player.play();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fullscreen(video) {
|
||||||
|
if (video.requestFullscreen) {
|
||||||
|
video.requestFullscreen();
|
||||||
|
} else if (video.mozRequestFullScreen) {
|
||||||
|
video.mozRequestFullScreen();
|
||||||
|
} else if (video.webkitRequestFullscreen) {
|
||||||
|
video.webkitRequestFullscreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fullscreen_button.onclick = function () {
|
||||||
|
fullscreen(masthead_video);
|
||||||
|
};
|
||||||
|
|
||||||
var url = "video/1_Compilation_Graphique/1_Compilation_Graphique.mpd";
|
var url = "video/1_Compilation_Graphique/1_Compilation_Graphique.mpd";
|
||||||
var player = dashjs.MediaPlayer().create();
|
var player = dashjs.MediaPlayer().create();
|
||||||
player.getDebug().setLogToBrowserConsole(false);
|
player.getDebug().setLogToBrowserConsole(false);
|
||||||
|
@ -49,6 +49,9 @@ header.masthead {
|
|||||||
#youtube-link {
|
#youtube-link {
|
||||||
right: 9rem;
|
right: 9rem;
|
||||||
}
|
}
|
||||||
|
#fullscreen-video {
|
||||||
|
left: 4rem;
|
||||||
|
}
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
.header-content {
|
.header-content {
|
||||||
|
Loading…
Reference in New Issue
Block a user