• Is it possible to switch the HTML5 player between light to dark modes? I have a website which alternates between light and dark backgrounds depending on the content.

Viewing 1 replies (of 1 total)
  • Plugin Author Serhiy Zakharchenko

    (@zahardoc)

    @cjmclean

    You can use the ssp_html_player_data filter to dynamically change the colour mode of your player. Something like this:

     
    add_filter( 'ssp_html_player_data', function( $data ){

    $is_light_mode = my_function_is_light_mode();

    $data['player_mode'] = $is_light_mode ? 'light' : 'dark';

    return $data;
    } );

    You’ll just need to implement the my_function_is_light_mode() function with your custom logic, and it should work. Hope this helps.

Viewing 1 replies (of 1 total)

The topic ‘Switching Modes?’ is closed to new replies.