New Dynamic YouTube Gallery - Embed YouTube Playlist, Channel, Live Stream in minutes. Read More

Embed Youtube Code, not responsive

  • Jan Simon
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0

Embed Youtube Code, not responsive was created by Jan Simon

Hi all,

First of all thanks for this greate pice of code.
Unfortunately I got a problem with embedding my youtube videos.

1st:
After doing that everything is okay exept the video is not responsive.

2nd:
Trying to activate the video with the youtube option plays the video within flash, is there a option to force html5?

rgs
Jan
7 years 9 months ago #8288

Please Log in or Create an account to join the conversation.

  • Posts: 2474
  • Thank you received: 1451

Replied by Administrator on topic Re: Embed Youtube Code, not responsive

1st:
Kindly edit the "width" and "height" properties in your YouTube embed code to 100%.

2nd:
Sorry, you cannot force to use HTML5 in desktops. But, the extension will fallback to YouTube Iframe embed code in mobile devices. So, in mobiles the video will be played using HTML5.
7 years 9 months ago #8289

Please Log in or Create an account to join the conversation.

  • Jan Simon
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0

Replied by Jan Simon on topic Re: Embed Youtube Code, not responsive

thanks for the reply.
If I edit the youtube embed-code and set "width" and "height" to 100%
I lose the ratio of the video :(
7 years 9 months ago #8290

Please Log in or Create an account to join the conversation.

  • Posts: 2474
  • Thank you received: 1451

Replied by Administrator on topic Re: Embed Youtube Code, not responsive

Kindly get me your site link in where I can check this.
7 years 9 months ago #8291

Please Log in or Create an account to join the conversation.

  • Jan Simon
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0

Replied by Jan Simon on topic Re: Embed Youtube Code, not responsive

7 years 9 months ago #8292

Please Log in or Create an account to join the conversation.

  • Posts: 2474
  • Thank you received: 1451

Replied by Administrator on topic Re: Embed Youtube Code, not responsive

1. Open {root}/components/com_allvideoshare/models/player.php

2. Find the code below,
$result  = '<div style="width:' . $this->width . $__unit . '; height:' . $this->height . $__unit . ';">';
$result .= $video->thirdparty;
$result .= '</div>';
3. Replace it as,
$result  = '<div class="avs_player_responsive">';
$result .= $video->thirdparty;
$result .= '</div>';
4. Save the changes and try now.

Hope, this solved your issue.
7 years 9 months ago #8294

Please Log in or Create an account to join the conversation.

Time to create page: 0.125 seconds

We accept cookies to provide you the best viewing experience. By using our services, you agree to our use of cookies