xbgmsharp / videojs-watermark

A videoJS plugin to display a watermark over the video
GNU General Public License v3.0
107 stars 55 forks source link

player.watermark is not a function #14

Open bansalvedant opened 6 years ago

bansalvedant commented 6 years ago

I am trying to use the videojs-watermark npm module but the error which I am getting is - TypeError: player.watermark is not a function.

The code is as follows -

import React, { Component } from 'react'; import videojs from 'video.js'; import 'videojs-watermark';

class App extends Component { componentDidMount(){ const player = videojs('my-player'); player.watermark({ file: 'watermark.png', xpos: 50, ypos: 50, xrepeat: 0, opacity: 0.5, }) }

render() { return (

);

} }

export default App;