cart item can’t update between categories navigation

i have a php e-commerce website When i add product to cart from category A then move to category B product that already added from category A can not increase or decrease from cart side until i moved back to category A.in same category window it works fine.when i click on category button in console this error show products.php?category_id=4:1607 Uncaught ReferenceError: toggleSidebar is not defined
at HTMLAnchorElement.onclick (products.php?category_id=4:1607:47).
i already review session data its fine between three files.this is script

<script>
        // Function to toggle cart sidebar
        function toggleCart() {
            $('.cart-sidebar').toggleClass('active');
            $('.overlay').toggleClass('active');
            if ($('.cart-sidebar').hasClass('active')) {
                loadCartSidebar();
            }
        }

        // Function to load cart sidebar content
        function loadCartSidebar() {
            $.ajax({
                url: 'cart_dropdown.php',
                type: 'GET',
                success: function(response) {
                    $('#cart-sidebar-content').html(response);
                }
            });
        }

        // Function to update cart
        function updateCart(productId, action) {
            const quantityType = $(`#quantity-type-${productId}`).val();
            const quantity = $(`#quantity-${productId}`).val();

            $.ajax({
                url: 'update_cart.php',
                type: 'POST',
                data: { 
                    product_id: productId, 
                    action: action,
                    quantity_type: quantityType,
                    quantity: quantity
                },
                success: function(response) {
                    let data = JSON.parse(response);
                    if (data.error) {
                        alert(data.error);
                    } else {
                        $('#cart-count').text(data.cartCount);
                        $('#cart-total').text('$' + data.cartTotal.toFixed(2));
                        loadCartSidebar();

                        // Enable/Disable the Order Submit button based on cart count
                        if (data.cartCount > 0) {
                            $('#order-submit').prop('disabled', false);
                        } else {
                            $('#order-submit').prop('disabled', true);
                        }

                        // Show/hide the minus button based on the product's quantity in the cart
                        if (data.cartCount > 0) {
                            $(`#minus-${productId}`).show(); // Show minus button
                        } else {
                            $(`#minus-${productId}`).hide(); // Hide minus button
                        }

                        // Show discount tag if applicable
                        if (data.discountApplied) {
                            const totalSaved = data.totalSaved.toFixed(2);
                            $(`#discount-tag-${data.productId}`).show().find(`#discount-amount-${data.productId}`).text(totalSaved);
                        } else {
                            $(`#discount-tag-${data.productId}`).hide(); // Hide the tag if quantity is below packets_per_pallet
                        }

                        // Show discount popup if applicable
                        if (data.discountApplied) {
                            const totalSaved = data.totalSaved.toFixed(2);
                            const newPrice = data.newPrice.toFixed(2);
                            const productName = $(`#product-${data.productId} h4`).text(); // Get product name
                            $('#discount-popup').html(`🎉 You saved $${totalSaved} on ${productName}! Now you get this price: $${newPrice} 🎉`).fadeIn().delay(3000).fadeOut();
                        }
                    }
                },
                error: function(xhr, status, error) {
                    console.error("AJAX Error:", status, error);
                }
            });
        }

        // Function to handle order submission
        $(document).ready(function() {
            $('#order-submit').click(function() {
                if ($(this).prop('disabled')) {
                    return; // Do nothing if the button is disabled
                }

                // Handle the order submission
                $.ajax({
                    url: 'submit_order.php',
                    type: 'POST',
                    success: function(response) {
                        alert('Order submitted successfully!');
                        // Optionally, clear the cart or redirect the user
                        window.location.href = 'thank_you.php';
                    },
                    error: function(xhr, status, error) {
                        console.error("AJAX Error:", status, error);
                        alert('There was an error submitting your order. Please try again.');
                    }
                });
            });

            // Toggle Categoría Sidebar
            $('.bottom-nav a').on('click', function(e) {
                if ($(this).attr('href') === '#') {
                    e.preventDefault();
                    $('.sidebar').toggleClass('active');
                    $('.overlay').toggleClass('active');
                }
            });

            // Close sidebar and cart sidebar when clicking outside
            $(document).on('click', function(event) {
                if (!$(event.target).closest('.sidebar').length && !$(event.target).closest('.bottom-nav a').length) {
                    $('.sidebar').removeClass('active');
                    $('.overlay').removeClass('active');
                }
                if (!$(event.target).closest('.cart-button').length && !$(event.target).closest('.cart-sidebar').length) {
                    $('.cart-sidebar').removeClass('active');
                    $('.overlay').removeClass('active');
                }
            });

            // Back Arrow in Cart Sidebar (Mobile)
            $('.cart-sidebar').on('click', '.back-arrow', function() {
                toggleCart();
            });

            // Live Search Functionality
            $('.search-bar').on('input', function() {
                const query = $(this).val();
                if (query.length > 2) { // Only search if query has at least 3 characters
                    $.ajax({
                        url: 'search_products.php',
                        type: 'GET',
                        data: { query: query },
                        success: function(response) {
                            $('.search-results').html(response).show();
                        }
                    });
                } else {
                    $('.search-results').hide();
                }
            });

            // Close search results when clicking outside
            $(document).click(function(event) {
                if (!$(event.target).closest('.search-container').length) {
                    $('.search-results').hide();
                }
            });

            // Handle click on search result item
            $(document).on('click', '.search-results .product-item', function() {
                const productId = $(this).data('product-id');
                // Hide search results
                $('.search-results').hide();
                // Scroll to the product card and highlight it
                const productCard = $(`#product-${productId}`);
                if (productCard.length) {
                    $('html, body').animate({
                        scrollTop: productCard.offset().top - 100 // Adjust offset for better visibility
                    }, 500);
                    productCard.css('border', '2px solid #28a745'); // Highlight the product
                    setTimeout(() => {
                        productCard.css('border', '1px solid #ddd'); // Remove highlight after 2 seconds
                    }, 2000);
                }
            });

            // Handle subcategory filter change
            $('.subcategory-filter input[type="checkbox"]').change(function() {
                const selectedSubcategories = [];
                $('.subcategory-filter input[type="checkbox"]:checked').each(function() {
                    selectedSubcategories.push($(this).val());
                });

                const categoryId = <?= $categoryId ? $categoryId : 'null' ?>;
                const url = new URL(window.location.href);

                // Update or remove the 'subcategories' parameter
                if (selectedSubcategories.length > 0) {
                    url.searchParams.set('subcategories', selectedSubcategories.join(','));
                } else {
                    url.searchParams.delete('subcategories');
                }

                // Update or remove the 'category_id' parameter
                if (categoryId) {
                    url.searchParams.set('category_id', categoryId);
                } else {
                    url.searchParams.delete('category_id');
                }

                // Reload the page with the updated URL
                window.location.href = url.toString();
            });

            // Function to scroll subcategories
            function scrollSubcategories(direction) {
                const scrollContainer = document.querySelector('.subcategory-filter-scroll');
                const scrollAmount = 200; // Adjust scroll amount as needed

                if (direction === 'left') {
                    scrollContainer.scrollBy({ left: -scrollAmount, behavior: 'smooth' });
                } else if (direction === 'right') {
                    scrollContainer.scrollBy({ left: scrollAmount, behavior: 'smooth' });
                }
            }

            // Function to check if scrolling is needed and show/hide arrows
            function checkScroll() {
                const scrollContainer = document.querySelector('.subcategory-filter-scroll');
                const leftArrow = document.querySelector('.subcategory-filter-arrow.left-arrow');
                const rightArrow = document.querySelector('.subcategory-filter-arrow.right-arrow');

                if (scrollContainer.scrollLeft > 0) {
                    leftArrow.style.display = 'block';
                } else {
                    leftArrow.style.display = 'none';
                }

                if (scrollContainer.scrollLeft < (scrollContainer.scrollWidth - scrollContainer.clientWidth)) {
                    rightArrow.style.display = 'block';
                } else {
                    rightArrow.style.display = 'none';
                }
            }

            // Attach event listener for scroll
            document.querySelector('.subcategory-filter-scroll').addEventListener('scroll', checkScroll);

            // Initial check on page load
            window.addEventListener('load', checkScroll);
        });

        // Function to handle WhatsApp button click
        function openWhatsApp() {
            alert("WhatsApp functionality is disabled for now.");
        }

        // Function to show location popup
        function showLocation() {
            document.getElementById('location-popup').style.display = 'block';
        }

        // Function to close location popup
        function closeLocationPopup() {
            document.getElementById('location-popup').style.display = 'none';
        }

        // Function to get directions
        function getDirections() {
            const address = encodeURIComponent('Carrer de l'Almirall Oquendo, 153, 08020 Sant Adrià de Besòs, Barcelona');
            window.open(`https://www.google.com/maps/dir/?api=1&destination=${address}`, '_blank');
        }

        // Function to scroll to top
        function scrollToTop() {
            window.scrollTo({ top: 0, behavior: 'smooth' });
        }
    </script>

How to fetch XSS cookie in PentesterLab XSS 10 Exercise

I am stuck at the XSS 10 exercise of the pentesterlab pro. I checked the solution video of the exercise provided by the pentesterlab researchers. Even though I am following the steps mentioned in the tutorial, i cannot get the output when I inspect the browser or on the webhook.site. I am unable to define whether it is a browser issue or something else. And if it is a browser issue how to fix this? I have tried it on Chrome, Firefox, and Edge. And the same result everywhere.

Here are the command i am running.

Command i am running

output i am getting wrong output i am getting

I am expecting the cookie value of the user after the ” /?c=[COOKIE]” in the output.

would appreciate if anyone who has already completed the Lab can provide the input.

Tizen tv unintentionally goes to no internet screen

I am creating a tizen web app where I am checking the internet connection and the do a fetch request to check that the internet is working. but the issue is that it randomly tells me that no internet is available and the API request is not fulfilled. to prevent the request from taking unlimited time I used a setTimeout.


I use the same function in WebOS LG TV and it works perfactly fine.
the device I have is Samsung 43in 5 series T5300 HD TV


I am using this function to detect wifi and internet connection. in randomUrl I am using a google.com, github.com and other populer urls.

let failureCount = 0;
function checkInternetConnection() {

    // first check if the wifi is connected
    const isOnline = navigator.onLine;
    if (!isOnline) {
        console.log("Internet check failed:", "no wifi");
        isPopupShown = true;
        return;
    }


    const randomUrl = randomUrls[Math.floor(Math.random() * randomUrls.length)];

    // Create a promise that rejects after 3 seconds to simulate a timeout.
    const timeoutPromise = new Promise((_, reject) =>
        setTimeout(() => reject(new Error("Timeout error")), 3000)
    );

    // Use Promise.race to either get the fetch result or timeout.
    Promise.race([
        fetch(randomUrl, { method: "GET", cache: "no-cache" }),
        timeoutPromise
    ])
        .then(() => {
            console.log("Internet is available");
            failureCount = 0;
            if (isPopupShown) {
                isPopupShown = false;
            }
        })
        .catch((error) => {
            console.log("Internet check failed:", error.message);
            failureCount = failureCount + 1;
            console.log("Failure count:", failureCount);
            // Only show the popup after 3 consecutive failures.
            if (failureCount >= 3 && !isPopupShown) {
                isPopupShown = true;
            }
        });
}

Testing Storybook with Cypress gets “Axe is already running” error

I am currently using Storybook v8.6.7 and Cypress v.14.2.0 with cypress-axe v1.6.0.

Most tests run without problem, but sometimes i get an Axe is already running. Use await axe.run() to wait for the previous run to finish before starting a new run. error.

For instance for this test:

describe('Calendar page a11y', () => {
    beforeEach(() => {
        cy.visit('/iframe.html?viewMode=story&id=components-calendar-pages--calendar-');
        cy.injectAxe();
    });

    it('single day inline has no detectable a11y violation on load', () => {
        cy.get(CALENDAR_PAGE_SELECTORS.SINGLE_DAY_INLINE);
        cy.checkA11y(CALENDAR_PAGE_SELECTORS.SINGLE_DAY_INLINE);
    });

    it('single day no time has no detectable a11y violation on load', () => {
        cy.get(CALENDAR_PAGE_SELECTORS.SINGLE_DAY_NO_TIME);
        cy.checkA11y(CALENDAR_PAGE_SELECTORS.SINGLE_DAY_NO_TIME);
    });

    it('single day with time has no detectable a11y violation on load', () => {
        cy.get(CALENDAR_PAGE_SELECTORS.SINGLE_DAY_WITH_TIME);
        cy.checkA11y(CALENDAR_PAGE_SELECTORS.SINGLE_DAY_WITH_TIME);
    });
})

I have tried awaiting for the tests to end like this (but also doesn’t seem to work):

it('single day with time has no detectable a11y violation on load', async () => {
        cy.get(CALENDAR_PAGE_SELECTORS.SINGLE_DAY_WITH_TIME);
        await cy.checkA11y(CALENDAR_PAGE_SELECTORS.SINGLE_DAY_WITH_TIME);
    });

I have tried rewritting it like this (which seems to work):

describe('Calendar page a11y', () => {
    beforeEach(() => {
        cy.visit('/iframe.html?viewMode=story&id=components-calendar-pages--calendar-');
        cy.injectAxe();
    });

    [
        { name: 'single day inline', selector: CALENDAR_PAGE_SELECTORS.SINGLE_DAY_INLINE },
        { name: 'single day no time', selector: CALENDAR_PAGE_SELECTORS.SINGLE_DAY_NO_TIME },
        { name: 'single day with time', selector: CALENDAR_PAGE_SELECTORS.SINGLE_DAY_WITH_TIME },
        { name: 'multi day no time', selector: CALENDAR_PAGE_SELECTORS.MULTI_DAY_NO_TIME },
        { name: 'multi day with time', selector: CALENDAR_PAGE_SELECTORS.MULTI_DAY_WITH_TIME }
    ].forEach(({ name, selector }) => {
        it(`${name} has no detectable a11y violation on load`, () => {
            cy.get(selector).should('exist').should('be.visible');

            cy.window().then(async (win) => {
                if (!win.axe) {
                    throw new Error('Axe is not loaded');
                }

                while (win.axe._running) {
                    await new Promise((resolve) => setTimeout(resolve, 50));
                }

                cy.checkA11y(selector);
            });
        });
    });
});

This seems to work, but feels strange to have to do it like this.

Are there any other better ways to do this?

Why is the data undefined if it’s passing data?

I’m using xstate & React to manage my state machine. I am passing data through the onChange handler in the App function. The console log shows that event.target.value is a string but when setResult is ran, event.data is undefined.

I am getting the following error when typing something in the input field:

Cannot read properties of undefined (reading ‘data’)
TypeError: Cannot read properties of undefined (reading ‘data’)
at prompt

Below is my code, any help is appreciated:

import { useMachine } from "@xstate/react";
import React from "react";
import { assign, createMachine } from "xstate";

const newMachine = createMachine(
{
id: "newMachine",
initial: "idle",
context: {
  result: "",
  prompt: "",
},
on: {
  TYPE: {
    actions: ["setResult"],
  },
  target: ".secondary",
},
states: {
  idle: {},
  secondary: {
    entry: "testPrint",
  },
},
 },
   {
     actions: {
    setResult: assign({
    prompt: (context, event) => {
      console.log("Event: ", event);
      return event.data;
    },
    }),
    testPrint: () => {
    console.log("TEST PRINT");
    },
  },
}
    );

 export default function App() {
const [current, send] = useMachine(newMachine);

const { result, prompt } = current.context;
return (
 <div>
  Result: {result} <br />
  State: {current.value} <br />
  <input
    type="text"
    value={prompt}
    onChange={(event) => {
      console.log("Event onChange: ", event.target.value);
      send({ type: "TYPE", data: event.target.value });
    }}
  />
</div>
);
}

Web Development Modern Approach [closed]

I have been developing my web design skills, learning as much as I can, and I’m starting to feel that I now have a solid understanding of HTML, CSS, Bootstrap, and JavaScript. I also have partial knowledge of other JavaScript libraries and frameworks. Am I wrong in my understanding that if I were to seek employment in web design, my primary skillset as a front-end developer would revolve around using JavaScript libraries and frameworks?

I am also beginning to see that back-end development follows a similar progression. For example, transitioning from my first LAMP deployment to learning the MEAN stack and now the MERN stack, I recognize that modern technologies aim to streamline the process of generating backend source code that would have traditionally been written by hand.

I suppose I am experiencing imposter syndrome as I start to not only understand these concepts but also implement them. I can now write code that accelerates source code generation at an almost ridiculous pace, using JavaScript and its extended libraries and frameworks, along with backend JavaScript or Python, to create a basic, commercially viable website.

I’m realizing that the ease of website creation today is largely determined by the unique needs of the client—whether it’s a small coffee shop website or an e-commerce toy store. My role is to use that information to generate tailored website source code based on what I’ve learned. I understand that this isn’t the full picture, and I’m just beginning to immerse myself in commercial web development methodologies.

Can anyone provide constructive criticism, comments, or advice on my understanding? How close or far am I from the reality of the field?

Thanks in advance!

How do I solve this GoCardLess -> Zapier issue?

This is the link to my javascript:
https://docs.google.com/document/d/1l4ZQMvCTwPWu_6UnE3PrltYu6ZLJF7xkdL_Ez8-1tBQ/edit?usp=sharing

In zapier it shows only absolute urls are supported even though my urls start with https already.

Many thanks. I’m just a beginner also here so thanks for your patience

This is an error that I’m getting. I don’t know what to do anymore.
[1]: https://i.sstatic.net/jBJdi4Fd.png

Why doesn’t opening the same window via window.open() trigger a load event?

I have a button that when clicked opens a new tab via the following code:

const childWindow = window.open('myFile.html', 'my-target');
if (childWindow) {
  childWindow.addEventListener('load', () => {
     console.log('Hello World');
  }
}

When the window opens the first time, “Hello World” is printed. When the button is clicked again the same window is refreshed, but nothing is printed. The child window isn’t null, it just isn’t catching the load event.

How do I get the window to refresh on click and also execute the event listener code on load?

This is in Chrome v134.

Encountering error when I trying run the extension on chrome

“Uncaught TypeError: Cannot read properties of undefined (reading ‘addListener’)”

// Add cleanup listener for extension unload using proper API
chrome.runtime.onSuspend.addListener(() => {
  console.log('[Debug] Extension suspending - performing cleanup');
  cleanup();
});

Uncaught Error: Extension context invalidated.

 if (node instanceof HTMLIFrameElement) {
  node.addEventListener('load', () => {
    try {
          if (node.contentDocument && node.contentWindow) {
                addKeyListeners(node.contentDocument);
              } else {
                console.warn('Using postMessage for cross-origin iframe communication');
// Initialize iframe with expansion capabilities
                node.contentWindow.postMessage({

I am trying to create an extension for Text expansion where upon key combination trigger; the shortcut word should expand to its defined expansion.

Creating an IDE using javascript canvas as the display

Bored so I’m working on an IDE using javascript and html, with canvas being it’s only interfacing part. I want to know if there’s already a platform for this (AWS and Google codebase does this somewhat, but is more focused on html driven outputs) and I want to basically revamp the server compilation process to allow server interactions to be recorded without the ability to copy and paste (somewhat for a later AI situation)

Would be helpful to know, I saw an advert for hypori, but I’m not really interested in passing interactions per pixel information (worked on this in college, and there’s always better) and security for that can get loose if not done correctly.

Btw it’s not a screen capture process, but an actual interfacing development environment using javascript that connects directly to a server that allows the IDE connection (no CORS issues).

Implement a React Popover primitive that is not affected by other layers z-index values or position fixed issues inside containers with transforms

I need to implement a Popover primitive that always appear on top of all other elements in the page, I tried to see if some well known solutions have this implemented but it seems in all cases the Popover is added to the bottom of the Page but still z-index is still in use:

For example:

Implementing a simple Popover is not that difficult but doing it with plain CSS might have the same issues as the ones above

  • It might need z-index to be set in most cases
  • It might not be correctly positioned if its position is fixed and it is inside a container that have a css transform, since a new stacking context might have been created.
  • It might be shown inside a container with overflow auto or hidden.

Despite those issues a CSS only popover offers a very simple API and it is very easy to create.

Here is an example of the simple API I’m looking for

// the Overlay is a controlled component so the 
// fact that is shown or not is controlled by the 
// open property
<CSSOverlay open={isOpen}>
  <div>Content here</div>
</CSSOverlay>

But most of the examples I’ve found go for something like

<SomeOverlay open={isOpen} style={{ zIndex: 100000 /* some arbitrary hight number no other popover will use, or at least we hope it won't */ }}>
  <div>Content here</div>
</SomeOverlay>

or appending it to the body, which might still have z-index issues, and now might also have issues accessing content inside React Providers as context might not be shared with it

<SomeOverlay open={isOpen} appendToBody={true}>
  <div>Content here</div>
</SomeOverlay>

Here is an example of a the CSS Popover with z-index issues

Full disclosure: This is a re-write of a now closed question posted here: What are the downsides or potential drawbacks of using `popover` attribute to create overlays, like tooltips, popovers and dialogs I’ve modified

TypeError: Do not know how to serialize a BigInt WHEN JSON.stringify(OBJECT)

Right now I’m getting a weird error, I’m trying to convert an object to a string and I get this type error.

const x = await web3.eth.getTransaction(tx);
               
console.log(x);
        ^
    Console Output:
{
  blockHash: '0x000ef0000abf000d0f000e0ff000c000a00d750d066ea0c60a00f0000b0f000c0',
  blockNumber: 0n,
  from: '0x0c000f0e0c000e000bfbc0c002000c0b0ec100000',
  gas: 0n,
  gasPrice: 0n,
  maxFeePerGas: 0n,
  maxPriorityFeePerGas: 0n,
  hash: '0x000000000000000d00f000f0000ffa000bd000c00cc0000b0fd000a0a00ffccfc',
  input: '0x',
  nonce: 0n,
  to: '0x000d0aa0fa0000ef00b00cb0e0000d000c0a00e0',
  transactionIndex: 0n,
  value: 0n,
  type: 0n,
  accessList: [],
  chainId: 0n,
  v: 0n,
  r: '0xa0000f00000f00c0b000000bffc000000000a000000000cc00e000100aa0d0d0',
  s: '0x0c0f00ec0cf0df0eb0000e00bce0000d00b0000a0000ffae0cc0ef28000e0cc',
  data: '0x'
}

But then I try to convert x into a string:

JSON.stringify(recoverTransaction)
     ^
    TypeError: Do not know how to serialize a BigInt

Quick Pick Items dont render in UI for VS Code Extension

I am making an extension for VS Code that wraps fzf. Only for certain searches, the Quick Pick UI does not render the quick pick items, but they appear on the console when I log them. If I add a large amount of items, the first item does not render.

Code

console.log('filenameResults');
console.log(filenameResults);
quickPick.items = filenameResults;
console.log('quickPick.items');
console.log(quickPick.items);

Output:

filenameResults 
• 0: {label: '$(python) models-py', description: 'main', data
• 1: {label: '$(file) models. cpython-313-pyc', description:
• 2: {label: '$(python) 0003_delete_blogpost_publication_imag
• 3: {label:
'$(file) 0003_delete_blogpost_publication_image.
length: 4


quickPick.items

• 0: {label: '$(python) models-py', description: 'main', data
• 1: {label: '$(file) models. cpython-313-pyc', description:
• 2: {label: '$(python) 0003_delete_blogpost_publication_imag
• 3: {label:
'$(file) 0003_delete_blogpost_publication_image.
length: 4

Empty Quick Pick

In phaser 3 what is the efficient way to transition from portrait to landscape and vice versa

import Phaser from 'phaser';
import PlayScene from './PlayScene';
import PreloadScene from './PreloadScene';
import QuestionScene from './QuestionScene';
import NotificationBannerScene from './NotificationBannerScene';

import backgroundImage from './assets/backgroundtest.svg';

// Apply the background image to the body
document.body.style.background = `url(${backgroundImage}) no-repeat center center / cover`;

const Scenes = [
  PreloadScene, 
  PlayScene, 
  QuestionScene, 
  NotificationBannerScene
];

const createScene = Scene => new Scene()

const initScenes = () => Scenes.map(createScene)

const { screen, innerWidth, innerHeight, devicePixelRatio: dpr } = window;

const width = dpr === 1 
  ? screen.width 
  : innerWidth * dpr;

const height = dpr === 1 
  ? screen.height 
  : innerHeight * dpr;

const config = {
  type: Phaser.CANVAS,
  transparent: true,
  scale: {
    mode: Phaser.Scale.FIT,
    autoCenter: Phaser.Scale.CENTER_BOTH,
    parent: 'game-container', 
    width: width,
    height: height
  },
  physics: {
    default: 'arcade'
  },
  scene: initScenes()
};

new Phaser.Game(config);

I have the above index.js then I use this.scale.width and this.scale.height for scaling sprite my problem now is if the user starts from portrait to landscape it become distorted. Right now I’m planning to use landscape size of mobile in portrait and landscape is this ok? or is there a better way?

Programmatic Playback Speed Control in Bunny Stream Player

I am using Bunny Stream for streaming audio content via an iframe, using the supported Player.js. I want to adjust the playback speed (e.g, 1x, 1.5x, 2x, 4x) programmatically (not through Bunny’s Player.js UI controls)

Does Bunny Stream’s implementation of Player.js support playback speed adjustments pragmatically? Either via Player.JS API, post message or direct DOM manipulation?

I tried using player.setPlaybackRate(newSpeed) to adjust speed but it does not seem to have any effect (the actual playback speed doesn’t change at all). Perhaps the the Bunny Stream player doesn’t fully implement all PlayerJS methods. I also tried to directly access and click elements inside the iframe but it seems cross-origin restrictions is preventing me from accessing iframe content from a different domain. Finally, I tried sending a postMessage command from the parent to the iframe (e.g, iframe.contentWindow.postMessage()) but I did not receive a response from the iframe. Apparently, the Bunny Stream player doesn’t implement a message listener for this custom command.

Is there any recommended workaround for controlling playback speed programmatically?
Am I missing something?