# InnerAudioContext.onEnded(function callback)

Listens on an event that an audio plays to the end

## Support

App capability | Android | iOS | PC | Harmony | Preview
---|---|---|---|---|---
Gadget | **✓** | **✓** | **✕** | V7.43.0+ | Preview
Web app | **✕** | **✕** | **✕** | **✕** | /

## Input

Name | Data type | Required | Default value | Description
---|---|---|---|---
callback | function | Yes | &nbsp; | Callback function of this event

# Output
None

##  Sample code

```js
const innerAudioContext = tt.createInnerAudioContext();
innerAudioContext.autoplay = true;
innerAudioContext.src = 'https://someaudiourl';
const cb = ()=>{console.log("Audio ended")};
innerAudioContext.onEnded(cb);
```

