Easiest way to make SLDP Player responsive to window changes

Daff 2021-01-29 05:54:11 UTC in WMSPanel functionality

Hi All

I can see how to make the player a fixed size. I would like to make it responsive to windows size changes. i.e always be 70% of the window width. What is the easiest way to do this.

Andrew 2021-01-29 10:27:20 UTC 

SLDP Player is attached to container element. You should set width of that element to 70% of window and set width parameter of the player to 'parent', i.e.

container: 'player-wrapper-id',
stream: 'ws://',
width: 'parent', // please note that 'parent' is a string with quotes
buffering: 1000

You can take a look at full list of SLDP Player parameters on this page:

Daff 2021-01-31 07:22:44 UTC 

Awesome, thanks. I did read the about parent string in the parameters page but didn't realise it was as easy as 'parent'

John 2021-02-24 12:10:09 UTC 

Anyway to intergrate slpd with p2p?

Yury 2021-02-24 23:53:17 UTC 

We don't have any capabilities for P2P with SLDP.

John 2021-02-25 01:56:07 UTC 

> We don't have any capabilities for P2P with SLDP.
Same technology, websocket, why not? Please research and develop, it will take more advantages than HLS with 3rd-party p2p now

Yury 2021-02-25 02:28:22 UTC 

These are completely different technologies so we don't plan investigating that kind on combination.

Finn 2022-05-09 10:29:10 UTC 

Hi, sorry to revive this thread, for me width: 'parent' works as expected when there is no stream running but as soon as a video is playing it goes over the parent Divs size?

max-width: 1000px;


<div class="main-content">
<p class="d-none d-sm-block">
<div id='sldp_player_wrapper'</div>

Sergei 2022-05-11 06:24:51 UTC 

that might be of different reasons, for example some wordpress plugins override video element size automatically. The above information isn't enough to determine the exact cause. Please open a new ticket to provide a link to your web page? You can create new support ticket here:

Post a reply

Post a new question


This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the Privacy Policy. If you want to know more or withdraw your consent to all or some of the cookies, please refer to the Privacy Policy.
By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to the use of cookies.