vime-js / vime

Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
https://vimejs.com
MIT License
2.77k stars 152 forks source link

bug: control="false" is not included in Dailymotion embed URL #252

Closed andykamezou closed 2 years ago

andykamezou commented 3 years ago

Bug Report

Vime version:

Latest 5.0.33 via jsdelivr

Provider:

Dailymotion

Current behavior:

Unable to hide the default Dailymotion UI because control=false is not included in Dailymotion embed URL. The default Dailymotion UI will briefly shown when pausing the video.

<!-- player setup -->
<vm-player class="embed-responsive-item" autoplay controls="false">
<!-- <vm-embed> results -->
<iframe id="vm-iframe-1" class="lazy" title="" data-src="https://www.dailymotion.com/embed/video/k3b11PemcuTrmWvYe0q?api=1&amp;autoplay=true&amp;mute=false&amp;queue-autoplay-next=false&amp;queue-enable=false&amp;sharing-enable=false&amp;ui-logo=false&amp;ui-start-screen-info=false" allowfullscreen="" allow="autoplay; encrypted-media; picture-in-picture;" src="https://www.dailymotion.com/embed/video/k3b11PemcuTrmWvYe0q?api=1&amp;autoplay=true&amp;mute=false&amp;queue-autoplay-next=false&amp;queue-enable=false&amp;sharing-enable=false&amp;ui-logo=false&amp;ui-start-screen-info=false"></iframe>

Related code:

Probably because controls is not included during buildParams() ? https://github.com/vime-js/vime/blob/1e8f386a46df47e7bcef408ceb5e116ca9a513e8/packages/core/src/components/providers/dailymotion/dailymotion.tsx#L212

  private buildParams(): DailymotionParams {
    return {
      autoplay: this.autoplay,
      mute: this.initialMuted,
      'queue-autoplay-next': this.shouldAutoplayQueue,
      'queue-enable': this.showUpNextQueue,
      'sharing-enable': this.showShareButtons,
      syndication: this.syndication,
      'ui-highlight': this.color,
      'ui-logo': this.showDailymotionLogo,
      'ui-start-screen-info': this.showVideoInfo,
    };
  }