call videojs only if a video is present
This commit is contained in:
parent
bc991ca798
commit
6525eee162
|
@ -63,7 +63,10 @@
|
|||
<script src="./s/videojs.persistvolume.js"></script>
|
||||
<script>
|
||||
(function() {
|
||||
var vid1 = videojs( document.querySelector(".video-js") );
|
||||
let video = document.querySelector(".video-js");
|
||||
if(!video)
|
||||
return;
|
||||
var vid1 = videojs(video);
|
||||
vid1.persistvolume({
|
||||
namespace: "f0ck"
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user