Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(svg-icons): handle custom svg icons #8488

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Nov 12, 2023

  1. feat(svg-icons): handle custom svg icons

    Replace the player's default icons with custom icons.
    
    The `experimentalSvgIcons` option accepts a `boolean` or a `string`.
    If the string represents a valid svg, it will replace the default icons.
    
    **Usage**
    
    ```javascript
    import playerIcons from './asset/vjs-sprite-icons.svg';
    
    const player = videojs('my-player', {
      experimentalSvgIcons: playerIcons,
      // ...
    });
    ```
    
    Or:
    
    ```javascript
    const player = videojs('my-player', {
      experimentalSvgIcons: `
      <svg>
      ...
      </svg>
      `,
      // ...
    });
    ```
    
    - extract a `initSvgIcons_` function to activate svg icons
    - add test cases
    amtins committed Nov 12, 2023
    Configuration menu
    Copy the full SHA
    0c9ae3c View commit details
    Browse the repository at this point in the history