videojs / videojs-vimeo

Support Vimeo source for Video.js
MIT License
196 stars 204 forks source link

Uncaught ReferenceError: volume is not defined. videojs-vimeo #154

Open NavinAT opened 3 years ago

NavinAT commented 3 years ago

I am using latest version of videojs for Vimeo videos- Video.js 7.11.1

YouTube is working fine but for Vimeo getting the below Error.

image Please suggest a solution. Here's my code:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Page Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="css/video-js.min.css" rel="stylesheet">
</head>
<body>
  <h2>Vimeo</h2>
        <video
        id="vid1"
        class="video-js vjs-default-skin"
        controls
        autoplay
        width="640" height="264"
        data-setup='{ "techOrder": ["vimeo"], "sources": [{ "type": "video/vimeo", 
        "src": "https://player.vimeo.com/video/359471496"}], "vimeo": { "iv_load_policy": 1 } }'
      >
      </video>

      <h2>YouTube</h2>
      <video
        id="vid1"
        class="video-js vjs-default-skin"
        controls
        autoplay
        width="640" height="264"
        data-setup='{ "techOrder": ["youtube"], "sources": [{ "type": "video/youtube", 
        "src": "https://www.youtube.com/watch?v=wzA54cCX68Q"}], "youtube": { "iv_load_policy": 1 } }'
      >
      </video>
    <script src="script/video.min.js"></script>
    <script src="Vimeo/videojs-vimeo.js"></script>
    <script src="YouTube/Youtube.min.js"></script>
</body>
</html>

Error: Uncaught ReferenceError: volume is not defined at Vimeo.setVolume (videojs-vimeo.js:194) at video.min.js:19 at l. (video.min.js:19) at l.e.ready (video.min.js:12) at l.e.techCall (video.min.js:19) at l.e.handleTechReady (video.min.js:19) at Vimeo.e.ready (video.min.js:12) at l.e.loadTech (video.min.js:19) at l.e.src (video.min.js:19) at video.min.js:19