Open bansalvedant opened 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 (
To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video
);
} }
export default App;
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;