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

reset content each time we call video.watermark #7

Closed Cylix closed 9 years ago

Cylix commented 9 years ago

Hi,

I'm currently using your plugin with the videoJS-playLists plugin and I sometimes need to update the watermark.

However, each time we call video.watermark({ ... }), it does not clean the previous content but add the new content over the previous one.

With this commit we can do:

// at first
video.watermark({
  file: 'http://www.videojs.com/img/logo.png',
  xpos: 50,
  ypos: 50,
  xrepeat: 0,
  opacity: 0.5
  });

// then later
video.watermark({
  file: 'http://www.videojs.com/img/an_other_logo.png',
  xpos: 50,
  ypos: 50,
  xrepeat: 0,
  opacity: 0.5
  });

This will remove the first content and replace it with the new one.

xbgmsharp commented 9 years ago

Great. Coud you make the div className an parameter?

Cylix commented 9 years ago

Yes of course, I'll do that.

Cylix commented 9 years ago

Done, className can now be passed as parameter. Default value is still vjs-watermark.

xbgmsharp commented 9 years ago

Cool thanks for your commit