call videojs only if a video is present

This commit is contained in:
jkhsjdhjs 2017-12-02 21:26:21 +01:00
parent bc991ca798
commit 6525eee162

View File

@ -63,7 +63,10 @@
<script src="./s/videojs.persistvolume.js"></script> <script src="./s/videojs.persistvolume.js"></script>
<script> <script>
(function() { (function() {
var vid1 = videojs( document.querySelector(".video-js") ); let video = document.querySelector(".video-js");
if(!video)
return;
var vid1 = videojs(video);
vid1.persistvolume({ vid1.persistvolume({
namespace: "f0ck" namespace: "f0ck"
}); });