[null,null,["Last updated 2024-09-18 UTC."],[[["\u003cp\u003e\u003ccode\u003eMediaElementEvent\u003c/code\u003e provides data for events originating from the \u003ccode\u003eMediaElement\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt includes the event \u003ccode\u003etype\u003c/code\u003e and optionally the \u003ccode\u003ecurrentMediaTime\u003c/code\u003e of the media playback when the event occurred.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ecurrentMediaTime\u003c/code\u003e indicates the playback time in seconds and is undefined if playback hasn't begun.\u003c/p\u003e\n"]]],["The `MediaElementEvent` class handles events from the `MediaElement`. It's created using a constructor requiring a non-null `type` parameter, which corresponds to a `cast.framework.events.EventType`. An optional `currentMediaTime` parameter, representing the time in seconds of the current clip when the event occurred, is also available. The `currentMediaTime` property provides this time data; it's undefined if playback hasn't started.\n"],null,["# Class: MediaElementEvent\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).[events](/cast/docs/reference/web_receiver/cast.framework.events).MediaElementEvent\n======================================================================================================================================================\n\nclass static\n\nEvent data for all events forwarded from the `MediaElement`.\n\nConstructor\n-----------\n\n### MediaElementEvent\n\nnew\nMediaElementEvent(type, currentMediaTime)\n\n| #### Parameter ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| type | [cast.framework.events.EventType](/cast/docs/reference/web_receiver/cast.framework.events#.EventType) Value must not be null. |\n| currentMediaTime | Optional number |\n\nProperty\n--------\n\n### currentMediaTime\n\nconstant\n\n(number or undefined)\n\nThe time in the currently-playing clip when the event was fired (in\nseconds). This is `undefined` if playback has not started yet."]]