GlobalEventHandlers.oncanplay

 The oncanplay property of the GlobalEventHandlers mixin is the event handler for processing canplay events.   The canplay event is fired when the user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content. 

Syntax

element.oncanplay = handlerFunction;
var handlerFunction = element.oncanplay;
  handlerFunction is either null or a JavaScript function specifying the handler for the event. 

Specifications

Specification
HTML Standard # handler-oncanplay

Browser compatibility




Desktop
Mobile



Chrome
Edge
Firefox
Internet Explorer
Opera
Safari
WebView Android
Chrome Android
Firefox for Android
Opera Android
Safari on IOS
Samsung Internet



oncanplay
32
12
9
9

19
≤12.1-15

9
4.4.3
32
9

19
≤12.1-14

9
2.0


See also
 DOM event handlers 


Found a problem with this page?

Edit on GitHub
Source on GitHub
Report a problem with this content on GitHub
Want to fix the problem yourself? See our Contribution guide.


Last modified: Sep 14, 2021, by MDN contributors


    
{'path': 'public/docs/dom/globaleventhandlers/oncanplay.html', 'source': 'DevDocs.IO'}