HTML oncanplay attribute

HTML oncanplay attribute defines that to execute the script when the browser starts playing the file.

HTML oncanplay attribute

In the attribute, it will be using  some of the elements like <audio>, <video>

Syntax: <element oncanplay=”script”>

Browser compatibility

This HTML oncanplay attribute supports different types of browsers as follows

  • Chrome
  • Mozilla
  • InternetExplorer
  • Safari
  • Opera