SIMID:Creative:requestResize Not working as Expected

145 views
Skip to first unread message

Haruhiko Nishi

unread,
May 31, 2024, 7:14:16 AMMay 31
to Interactive Media Ads SDK
Hi, I am having some trouble with the `requestResize` command from the SIMID creative. When the creative send the `requestResize` command with the required arguments, I get a reject message with an empty JS object, and the player sends SIMID:Player:log 'pp'

I wonder if `SIMID:Creative:requestResize` is supported at all.  To provide more context, I've attached a screenshot that shows the sequence of SIMID communication. It might help in diagnosing the issue.

Has anyone else experienced this issue or have any suggestions on what might be going wrong? May be there's something specific in my setup, if it is not a known issue.

Any insights would be greatly appreciated!

Thank you in advance,

Haruhiko Nishi

スクリーンショット 2024-05-31 10.27.22.png

IMA SDK

unread,
May 31, 2024, 8:54:27 AMMay 31
to haruhik...@supership.jp, ima...@googlegroups.com
Hi Haruhiko,

Thanks for contacting us.

I've checked Sample SIMID ad tag. And it's working as expected in IMA VSI.
Could you provide your SIMID VAST to us for further investigation and how you are resizing it?
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJ9Ja:ref" (ADR-00237292)

Thanks,
 
Google Logo IMA SDK Team




 

Haruhiko Nishi

unread,
May 31, 2024, 9:43:21 AMMay 31
to Interactive Media Ads SDK
Hi,
Sure thing. Although it is no so much different from the example code found at https://github.com/InteractiveAdvertisingBureau/SIMID/blob/master/examples/creatives/banner_nonlinear.js#L123-L134 how I am sending the message.
I had to tweak a little so it communicates with SIMID 1.0.

I don't think Sample SIMID ad tag. is retuning a creative that actually sends the SIMID:Creative:requestResize, though.


onInit(eventData) {
 console.log(JSON.stringify(eventData))
 this.updateInternalOnInit(eventData);
 this.dynamicResize_();
 this.simidProtocol.resolve(eventData, {});
 this.updateCreativeWithParams_();
}

dynamicResize_() {
// This ad requests that the player resize it and move it, so that it is centered within the player.
 let videoDimensions = {};
 videoDimensions.x = 100;
 videoDimensions.y = 100;
 videoDimensions.width = Math.floor(this.environmentData.videoDimensions.width);
 videoDimensions.height = Math.floor(this.environmentData.videoDimensions.height);

l et creativeDimensions = {};
 creativeDimensions.x = Math.floor(this.environmentData.videoDimensions.width * X_OFFSET_PERCENTAGE);
 creativeDimensions.y = Math.floor(this.environmentData.videoDimensions.height * Y_OFFSET_PERCENTAGE);
 creativeDimensions.width = Math.floor(this.environmentData.videoDimensions.width * WIDTH_PERCENTAGE);
 creativeDimensions.height = Math.floor(this.environmentData.videoDimensions.height * HEIGHT_PERCENTAGE);

 const params = {
 videoDimensions: videoDimensions,
 creativeDimensions: creativeDimensions,
 fullscreen: this.environmentData.fullscreen 
 };
 this.requestResize(params);
}

/**
* Sends message requesting to resize creative based off of given resizeParameters
* @param {!Object} resizeParams An object with the video & creative dimensions.
*/
requestResize(resizeParams) {
 this.simidProtocol.sendMessage(CreativeMessage.REQUEST_RESIZE, resizeParams).then( () => {
 this.environmentData.creativeDimensions = resizeParams.creativeDimensions;
 this.environmentData.videoDimensions = resizeParams.videoDimensions;
})
}

IMA SDK

unread,
May 31, 2024, 4:40:23 PMMay 31
to haruhik...@supership.jp, ima...@googlegroups.com

Hi Haruhiko,

Thank you for explaining the issue in detail.

I will check with our team regarding your query and one of my team members will reach out to you once we have an update. Meanwhile, your patience is appreciated.

IMA SDK

unread,
May 31, 2024, 5:08:22 PMMay 31
to haruhik...@supership.jp, ima...@googlegroups.com

Hi Haruhiko,

The creative requests ad resize by posting a SIMID:Creative:requestResize message.

The player must not resize the ad unless it can change the dimensions of both media element and SIMID iframe to the values specified by the Creative:requestResize message.

Note: the message requestResize must not be used to change screen mode. See the § 4.4.10 SIMID:Creative:requestFullscreen and § 4.4.11 SIMID:Creative:requestExitFullscreen messages.

dictionary MessageArgs
{
  required Dimensions mediaDimensions;
  required Dimensions creativeDimensions;
};
dictionary Dimensions
{
  required long x;
  required long y;
  required long width;
  required long height;
};

mediaDimensions
Media element size and coordinates.

creativeDimensions
SIMID iframe size and coordinates.

4.4.15.1. resolve
The player replies to requestResize with a resolve if it has resized the ad and set the dimensions to the values specified by the requestResize message.

4.4.15.2. reject
The player responds to requestResize with reject when it ignores the message or is unable to complete the resizing.

Haruhiko Nishi

unread,
Jun 4, 2024, 8:34:54 AMJun 4
to Interactive Media Ads SDK
Hi,

Thank you for the detailed information.

I actually have thoroughly reviewed the SIMID specification before reaching out with my initial question. While I understand the conditions under which the `requestResize` command should be resolved or rejected, the specification does not clarify why the player cannot handle the request in the particular case. If the player side is rejecting the request, I would like to understand what specifically is causing the rejection. Knowing the exact reason behind the rejection is crucial to diagnosing and resolving the issue. Otherwise, it appears as though the feature is not supported at all, which then could contradict the specification.

Additionally, the code I am using is based on the IAB's example. It is concerning if IMA-SDK cannot handle this, as it suggests a potential issue with the implementation of a standardized example.

I already know the player will only return an empty JSON object if it cannot handle the `requestResize` and your previous responses have not addressed the core issue or provided actionable steps to resolve it. This lack of clarity is frustrating and seems somewhat irresponsible,  considering the importance of standardized implementations in ensuring smooth operations. If there is any particular step requirements or conditions that need to be met for the `requestResize` command to work, that information would be very helpful.

Thank you for your assistance and understanding.

Haruhiko Nishi
Reply all
Reply to author
Forward
0 new messages