radiantmediaplayer / rmp-vast

A client-side JavaScript solution to load, parse and display VAST 2, 3 & 4 resources with HTML5 video
https://www.radiantmediaplayer.com/rmp-vast/app/
Other
95 stars 37 forks source link

Rmp player mecanism loading ads depending on screen resolution and not bitrate #43

Closed Momotoculteur closed 2 years ago

Momotoculteur commented 2 years ago

Hello guys :D

I'm would like to get informations about rmp player mecanism when loading an ad. In xml files, you can define several media, with specific resolution/bitrate in order to serve an ad depending your connexion speed. More bandwidth you have, better ad resolution you have. I'm making some test and for high or slow bandwidth i got the same ad resolution. But If i'm making the same processus on a different screen ( for example 4K, and previous test in 1080p display), i will always have the highest ad quality displayed, even if i am a slow connexion.

Am i wrong somewhere in my code ? Or the bitrate is not take account in rmp-player ?

Example of vast xml loaded:

<MediaFiles>
              <MediaFile id="5241" delivery="progressive" type="video/mp4" bitrate="2000" width="1280" height="720" minBitrate="1500" maxBitrate="2500" scalable="1" maintainAspectRatio="1" codec="H.264">
                <![CDATA[https://iab-publicfiles.s3.amazonaws.com/vast/VAST-4.0-Short-Intro.mp4]]>
              </MediaFile>
              <MediaFile id="5244" delivery="progressive" type="video/mp4" bitrate="1000" width="854" height="480" minBitrate="700" maxBitrate="1500" scalable="1" maintainAspectRatio="1" codec="H.264">
                <![CDATA[https://iab-publicfiles.s3.amazonaws.com/vast/VAST-4.0-Short-Intro-mid-resolution.mp4]]>
              </MediaFile>
              <MediaFile id="5246" delivery="progressive" type="video/mp4" bitrate="600" width="640" height="360" minBitrate="500" maxBitrate="700" scalable="1" maintainAspectRatio="1" codec="H.264">
                <![CDATA[https://iab-publicfiles.s3.amazonaws.com/vast/VAST-4.0-Short-Intro-low-resolution.mp4]]>
             </MediaFile>
</MediaFiles>

Thanks in advance and have a great day, Bastien

radiantmediaplayer commented 2 years ago

Hi,

Can you provide a URL to your VAST tag, so we can test it.

Thanks Arnaud

Momotoculteur commented 2 years ago

Hey Arnaud,

i test this vast url on your site https://www.radiantmediaplayer.com/rmp-vast/app/ https://raw.githubusercontent.com/InteractiveAdvertisingBureau/VAST_Samples/master/VAST%204.2%20Samples/Inline_Linear_Tag-test.xml

Try to only change resolution with a low width, and try in second time to throtling in slow 3g via chrome devtools. You will see a change of video only via changing screen size and not network speed :(

radiantmediaplayer commented 2 years ago

As far as I can tell the rmp-vast parser works as expected when selecting creatives. The logic built inside first checks for width, then bitrate. It will not pick higher bitrate if the width of the creative exceed the width of the player. I have verified that behaviour if the player changes size as well.

Momotoculteur commented 2 years ago

Thanks Arnaud for these explications about player's mecanism. Got a better understanding with the code you share :)

Have a good weekend, Bastien

Momotoculteur commented 2 years ago

@radiantmediaplayer I got another one question ; Seems that the choice of an ad according to bitrate ( after a first sort according to screen witdh ) doesn't work.

In debug mode, i got -1 as average bandwidth. I see how you try to average it via some object available on the browser ( https://wicg.github.io/netinfo/#dom-networkinformation ) but these object are not common in Brave,Chrome, Safari or Firefox. So the library cannot and never sort ad according to current bitrate, isn't it ?

radiantmediaplayer commented 2 years ago

You can refer to https://caniuse.com/netinfo for a list of supported browsers for Network Information API. It will work well on mobile devices but on desktop it will not work in Safari and Firefox. In this case the decision will be made based on width alone.