Built-in Media Player
Introduces the methods and callbacks related to the built-in media player.
You can play local or online media resources by calling APIs related to the media player, or play media resources to remote users in the Agora channel.
adjustPlayoutVolume
Adjusts the local playback volume.
virtual int adjustPlayoutVolume(int volume) = 0;
Parameters
- volume
- The local playback volume, which ranges from 0 to 100:
- 0: Mute.
- 100: (Default) The original volume.
Returns
- 0: Success.
- < 0: Failure.
adjustPublishSignalVolume
Adjusts the volume of the media file for publishing.
virtual int adjustPublishSignalVolume(int volume) = 0;
After connected to the Agora server, you can call this method to adjust the volume of the media file heard by the remote user.
Parameters
- volume
- The volume, which ranges from 0 to 400:
- 0: Mute.
- 100: (Default) The original volume.
- 400: Four times the original volume (amplifying the audio signals by four times).
Returns
- 0: Success.
- < 0: Failure.
createMediaPlayer
Creates a media player instance.
virtual agora_refptr <IMediaPlayer> createMediaPlayer() = 0;
Returns
- The IMediaPlayer instance, if the method call succeeds.
- An empty pointer , if the method call fails.
destroyMediaPlayer
Destroys the media player instance.
virtual int destroyMediaPlayer(agora_refptr<IMediaPlayer> media_player) = 0;
Parameters
- media_player
-
IMediaPlayer object.
Returns
- ≥ 0: Success. Returns the ID of the media player instance.
- < 0: Failure.
enableAutoRemoveCache
Sets whether to delete cached media files automatically.
virtual int enableAutoRemoveCache(bool enable) = 0;
If you enable this function to remove cached media files automatically, when the cached media files exceed either the number or size limit you set, the SDK automatically deletes the least recently used cache file.
Parameters
- enable
- Whether to enable the SDK to delete cached media files automatically:
true
: Delete cached media files automatically.false
: (Default) Do not delete cached media files automatically.
Returns
- 0: Success.
- < 0: Failure. See MEDIA_PLAYER_ERROR.
getCacheDir
Gets the storage path of the cached media files.
virtual int getCacheDir(char* path, int length) = 0;
If you have not called the setCacheDir method to set the storage path for the media files to be cached before calling this method, you get the default storage path used by the SDK.
Parameters
- path
- An output parameter; the storage path for the media file to be cached.
- length
- An input parameter; the maximum length of the cache file storage path string. Fill in according to the cache file storage path string you obtained from path.
Returns
- 0: Success.
- < 0: Failure. See MEDIA_PLAYER_ERROR.
getCacheFileCount
Gets the number of media files that are cached.
virtual int getCacheFileCount() = 0;
Returns
- ≥ 0: The call succeeds and returns the number of media files that are cached.
- < 0: Failure. See MEDIA_PLAYER_ERROR.
getDuration
Gets the duration of the media resource.
virtual int getDuration(int64_t& duration) = 0;
Parameters
- duration
- Output parameter. The total duration (ms) of the media file.
Returns
- 0: Success.
- < 0: Failure.
getMaxCacheFileCount
Gets the maximum number of media files that can be cached.
virtual int getMaxCacheFileCount() = 0;
By default, the maximum number of media files that can be cached is 1,000.
Returns
- > 0: The call succeeds and returns the maximum number of media files that can be cached.
- < 0: Failure. See MEDIA_PLAYER_ERROR.
getMaxCacheFileSize
Gets the maximum size of the aggregate storage space for cached media files.
virtual int64_t getMaxCacheFileSize() = 0;
By default, the maximum size of the aggregate storage space for cached media files is 1 GB. You can call the setMaxCacheFileSize method to set the limit according to your scenarios.
Returns
- > 0: The call succeeds and returns the maximum size (in bytes) of the aggregate storage space for cached media files.
- < 0: Failure. See MEDIA_PLAYER_ERROR.
getMediaPlayerCacheManager
Gets an IMediaPlayerCacheManager instance.
AGORA_API agora::rtc::IMediaPlayerCacheManager* AGORA_CALL getMediaPlayerCacheManager();
Make sure the IRtcEngine is initialized before you call this method.
Returns
The IMediaPlayerCacheManager instance.
getMediaPlayerId
Gets the ID of the media player.
virtual int getMediaPlayerId() const = 0;
Returns
- ≥ 0: Success. The ID of the media player.
- < 0: Failure.
getMute
Reports whether the media resource is muted.
virtual int getMute(bool& mute) = 0;
Parameters
- mute
- Output parameter. Whether the media file is muted:
true
: Mute the media file.false
: The media file is unmuted.
Returns
- 0: Success.
- < 0: Failure.
getPlayoutVolume
Gets the local playback volume.
virtual int getPlayoutVolume(int& volume) = 0;
Parameters
- volume
- Output parameter. The local playback volume, which ranges from 0 to 100:
- 0: Mute.
- 100: (Default) The original volume.
Returns
- 0: Success.
- < 0: Failure.
getPlayPosition
Gets current local playback progress.
virtual int getPlayPosition(int64_t& pos) = 0;
Parameters
- pos
- The playback position (ms) of the audio effect file.
Returns
- Returns the current playback progress (ms) if the call succeeds.
- < 0: Failure. See MEDIA_PLAYER_ERROR.
getPublishSignalVolume
Gets the volume of the media file for publishing.
virtual int getPublishSignalVolume(int& volume) = 0;
Parameters
- volume
- Output parameter. The remote playback volume.
Returns
- 0: Success.
- < 0: Failure.
getState
Gets current playback state.
virtual media::base::MEDIA_PLAYER_STATE getState() = 0;
Returns
The current playback state. See MEDIA_PLAYER_STATE.
getStreamCount
Gets the number of the media streams in the media resource.
virtual int getStreamCount(int64_t& count) = 0;
Parameters
- count
- Output parameter. The number of the media streams in the media resource.
Returns
- 0: Success.
- < 0: Failure. See MEDIA_PLAYER_ERROR.
getStreamInfo
Gets the detailed information of the media stream.
virtual int getStreamInfo(int64_t index, media::base::PlayerStreamInfo* info) = 0;
Parameters
- index
- The index of the media stream.
- info
- An output parameter. The detailed information of the media stream. See PlayerStreamInfo.
Returns
- 0: Success.
- < 0: Failure.
mute
Sets whether to mute the media file.
virtual int mute(bool muted) = 0;
Parameters
- muted
- Whether to mute the media file:
true
: Mute the media file.false
: (Default) Unmute the media file.
Returns
- 0: Success.
- < 0: Failure.
open
Opens the media resource.
virtual int open(const char* url, int64_t startPos) = 0;
This method is called asynchronously.
If you need to play a media file, make sure you receive the onPlayerSourceStateChanged callback reporting PLAYER_STATE_OPEN_COMPLETED before calling the play method to play the file.
Parameters
- url
- The path of the media file. Both local path and online path are supported.
- startPos
- The starting position (ms) for playback. Default value is 0.
Returns
- 0: Success.
- < 0: Failure.
openWithCustomSource
Opens the custom media resource file.
virtual int openWithCustomSource(int64_t startPos, IMediaPlayerCustomDataProvider* provider) = 0;
- Deprecated:
- This method is deprecated.
This method allows you to open custom media resource files. For example, you can call this method to open encrypted media resources.
Parameters
- startPos
- The starting position (ms) for playback. The default value is 0.
- provider
- The callback for custom media resource files. See IMediaPlayerCustomDataProvider.
Returns
- 0: Success.
- < 0: Failure.
openWithMediaSource
Opens a media file and configures the playback scenarios.
virtual int openWithMediaSource(const media::base::MediaSource &source) = 0;
This method supports opening media files of different sources, including a custom media source, and allows you to configure the playback scenarios.
Parameters
- source
- Media resources. See MediaSource.
Returns
- 0: Success.
- < 0: Failure.
pause
Pauses the playback.
virtual int pause() = 0;
Returns
- 0: Success.
- < 0: Failure.
play
playPreloadedSrc
Plays preloaded media resources.
virtual int playPreloadedSrc(const char* src) = 0;
After calling the preloadSrc method to preload the media resource into the playlist, you can call this method to play the preloaded media resource. After calling this method, if you receive the onPlayerSourceStateChanged callback which reports the PLAYER_STATE_PLAYING state, the playback is successful.
If you want to change the preloaded media resource to be played, you can call this method again and specify the URL of the new media resource that you want to preload. If you want to replay the media resource, you need to call preloadSrc to preload the media resource to the playlist again before playing. If you want to clear the playlist, call the stop method.
If you call this method when playback is paused, this method does not take effect until playback is resumed.
Parameters
- src
- The URL of the media resource in the playlist must be consistent with the src set by the preloadSrc method; otherwise, the media resource cannot be played.
Returns
- 0: Success.
- < 0: Failure.
preloadSrc
Preloads a media resource.
virtual int preloadSrc(const char* src, int64_t startPos) = 0;
You can call this method to preload a media resource into the playlist. If you need to preload multiple media resources, you can call this method multiple times.
After calling this method, if you receive the PLAYER_PRELOAD_EVENT_COMPLETE event in the onPreloadEvent callback, the preload is successful; If you receive the PLAYER_PRELOAD_EVENT_ERROR event in the onPreloadEvent callback, the preload fails.
If the preload is successful and you want to play the media resource, call playPreloadedSrc; if you want to clear the playlist, call stop.
Agora does not support preloading duplicate media resources to the playlist. However, you can preload the media resources that are being played to the playlist again.
Parameters
- src
- The URL of the media resource.
- startPos
- The starting position (ms) for playing after the media resource is preloaded to the playlist. When preloading a live stream, set this parameter to 0.
Returns
- 0: Success.
- < 0: Failure.
registerAudioFrameObserver [1/2]
Registers an audio frame observer object.
virtual int registerAudioFrameObserver(media::base::IAudioFrameObserver* observer) = 0;
You need to implement the IAudioFrameObserver class in this method and register callbacks according to your scenarios. After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.
Parameters
- observer
- The audio frame observer, reporting the reception of each audio frame. See IAudioFrameObserver.
Returns
- 0: Success.
- < 0: Failure.
registerAudioFrameObserver [2/2]
Registers an audio frame observer object.
virtual int registerAudioFrameObserver(media::base::IAudioFrameObserver observer, RAW_AUDIO_FRAME_OP_MODE_TYPE mode) = 0;
Parameters
- observer
-
The audio frame observer, reporting the reception of each audio frame. See IAudioFrameObserver.
- mode
-
The use mode of the audio frame. See RAW_AUDIO_FRAME_OP_MODE_TYPE.
Returns
- 0: Success.
- < 0: Failure.
registerPlayerSourceObserver
Registers a media player observer.
virtual int registerPlayerSourceObserver(IMediaPlayerSourceObserver* observer) = 0;
Parameters
- observer
- The player observer, listening for events during the playback. See IMediaPlayerSourceObserver.
Returns
- 0: Success.
- < 0: Failure.
registerVideoFrameObserver
Registers a video frame observer object.
virtual int registerVideoFrameObserver(media::base::IVideoFrameObserver* observer) = 0;
You need to implement the IVideoFrameObserver class in this method and register callbacks according to your scenarios. After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.
Parameters
- observer
- The video observer, reporting the reception of each video frame. See IVideoFrameObserver.
Returns
- 0: Success.
- < 0: Failure.
removeAllCaches
Deletes all cached media files in the media player.
virtual int removeAllCaches() = 0;
The cached media file currently being played will not be deleted.
Returns
- 0: Success.
- < 0: Failure. See MEDIA_PLAYER_ERROR.
removeCacheByUri
Deletes a cached media file.
virtual int removeCacheByUri(const char *uri) = 0;
The cached media file currently being played will not be deleted.
Parameters
- uri
- The URI (Uniform Resource Identifier) of the media file to be deleted.
Returns
- 0: Success.
- < 0: Failure. See MEDIA_PLAYER_ERROR.
removeOldCache
Deletes a cached media file that is the least recently used.
virtual int removeOldCache() = 0;
You can call this method to delete a cached media file when the storage space for the cached files is about to reach its limit. After you call this method, the SDK deletes the cached media file that is least used.
The cached media file currently being played will not be deleted.
Returns
- 0: Success.
- < 0: Failure. See MEDIA_PLAYER_ERROR.
resume
Resumes playing the media file.
virtual int resume() = 0;
Returns
- 0: Success.
- < 0: Failure.
seek
Seeks to a new playback position.
virtual int seek(int64_t newPos) = 0;
After successfully calling this method, you will receive the onPlayerEvent callback, reporting the result of the seek operation to the new playback position.
- Call this method to seek to the position you want to begin playback.
- Call the play method to play the media file.
Parameters
- newPos
- The new playback position (ms).
Returns
- 0: Success.
- < 0: Failure.
selectAudioTrack
Selects the audio track used during playback.
virtual int selectAudioTrack(int index) = 0;
After getting the track index of the audio file, you can call this method to specify any track to play. For example, if different tracks of a multi-track file store songs in different languages, you can call this method to set the playback language.
Parameters
- index
- The index of the audio track.
Returns
- 0: Success.
- < 0: Failure.
setAudioDualMonoMode
Sets the channel mode of the current audio file.
virtual int setAudioDualMonoMode(agora::media::base::AUDIO_DUAL_MONO_MODE mode) = 0;
In a stereo music file, the left and right channels can store different audio data. According to your needs, you can set the channel mode to original mode, left channel mode, right channel mode, or mixed channel mode. For example, in the KTV scenario, the left channel of the music file stores the musical accompaniment, and the right channel stores the singing voice. If you only need to listen to the accompaniment, call this method to set the channel mode of the music file to left channel mode; if you need to listen to the accompaniment and the singing voice at the same time, call this method to set the channel mode to mixed channel mode.
- Call this method after calling open.
- This method only applies to stereo audio files.
Parameters
- mode
- The channel mode. See AUDIO_DUAL_MONO_MODE.
Returns
- 0: Success.
- < 0: Failure.
setAudioPitch
Sets the pitch of the current media resource.
virtual int setAudioPitch(int pitch) = 0;
Parameters
- pitch
- Sets the pitch of the local music file by the chromatic scale. The default value is 0, which means keeping the original pitch. The value ranges from -12 to 12, and the pitch value between consecutive values is a chromatic value. The greater the absolute value of this parameter, the higher or lower the pitch of the local music file.
Returns
- 0: Success.
- < 0: Failure.
setCacheDir
Sets the storage path for the media files that you want to cache.
virtual int setCacheDir(const char *path) = 0;
Make sure IRtcEngine is initialized before you call this method.
Parameters
- path
- The absolute path of the media files to be cached. Ensure that the directory for the media files exists and is writable.
Returns
- 0: Success.
- < 0: Failure. See MEDIA_PLAYER_ERROR.
setLoopCount
Sets the loop playback.
virtual int setLoopCount(int loopCount) = 0;
If you want to loop, call this method and set the number of the loops.
When the loop finishes, the SDK triggers onPlayerSourceStateChanged and reports the playback state as PLAYER_STATE_PLAYBACK_ALL_LOOPS_COMPLETED.
Parameters
- loopCount
- The number of times the audio effect loops:
Returns
- 0: Success.
- < 0: Failure.
setMaxCacheFileCount
Sets the maximum number of media files that can be cached.
virtual int setMaxCacheFileCount(int count) = 0;
Parameters
- count
- The maximum number of media files that can be cached. The default value is 1,000.
Returns
- 0: Success.
- < 0: Failure. See MEDIA_PLAYER_ERROR.
setMaxCacheFileSize
Sets the maximum size of the aggregate storage space for cached media files.
virtual int setMaxCacheFileSize(int64_t cacheSize) = 0;
Parameters
- cacheSize
- The maximum size (bytes) of the aggregate storage space for cached media files. The default value is 1 GB.
Returns
- 0: Success.
- < 0: Failure. See MEDIA_PLAYER_ERROR.
setPlaybackSpeed
Sets the channel mode of the current audio file.
virtual int setPlaybackSpeed(int speed) = 0;
Call this method after calling open.
Parameters
- speed
- The playback speed. Agora recommends that you limit this value to between 50 and 400, defined as follows:
- 50: Half the original speed.
- 100: The original speed.
- 400: 4 times the original speed.
Returns
- 0: Success.
- < 0: Failure.
setPlayerOption
Sets the private options for the media player.
virtual int setPlayerOption(const char* key, int value) = 0;
The media player supports setting private options by key and value. Under normal circumstances, you do not need to know the private option settings, and just use the default option settings.
- Ensure that you call this method before open.
- If you need to push streams with SEI into the CDN, callsetPlayerOption
("sei_data_with_uuid", 1)
; otherwise, the loss of SEI might occurs.
Parameters
- key
- The key of the option.
- value
- The value of the key.
Returns
- 0: Success.
- < 0: Failure.
setRenderMode
Sets the render mode of the media player.
virtual int setRenderMode(media::base::RENDER_MODE_TYPE renderMode) = 0;
Parameters
- renderMode
-
Sets the render mode of the view. See RENDER_MODE_TYPE.
Returns
- 0: Success.
- < 0: Failure.
setSpatialAudioParams
Enables or disables the spatial audio effect for the media player.
virtual int setSpatialAudioParams(const SpatialAudioParams& params) = 0;
After successfully setting the spatial audio effect parameters of the media player, the SDK enables the spatial audio effect for the media player, and the local user can hear the media resources with a sense of space.
If you need to disable the spatial audio effect for the media player, set the params parameter to null.
Parameters
- params
- The spatial audio effect parameters of the media player. See SpatialAudioParams for details.
Returns
- 0: Success.
- < 0: Failure.
setView
Sets the view.
virtual int setView(media::base::view_t view) = 0;
Parameters
- view
- The render view. On Windows, this parameter sets the window handle (HWND).
Returns
- 0: Success.
- < 0: Failure.
stop
Stops playing the media track.
virtual int stop() = 0;
Returns
- 0: Success.
- < 0: Failure.
switchSrc
Switches the media resource being played.
virtual int switchSrc(const char* src, bool syncPts) = 0;
- When the network is poor, the media resource to be played is switched to a media resource address with a lower bitrate.
- When the network is good, the media resource to be played is switched to a media resource address with a higher bitrate.
After calling this method, if you receive the onPlayerEvent event in the PLAYER_EVENT_SWITCH_COMPLETE callback, the switch is successful; If you receive the onPlayerEvent event in the PLAYER_EVENT_SWITCH_ERROR callback, the switch fails.
- Ensure that you call this method after open.
- To ensure normal playback, pay attention to the following when calling this method:
- Do not call this method when playback is paused.
- Do not call the seek method during switching.
- Before switching the media resource, make sure that the playback position does not exceed the total duration of the media resource to be switched.
Parameters
- src
- The URL of the media resource.
- syncPts
- Whether to synchronize the playback position (ms) before and after the switch:
true
: Synchronize the playback position before and after the switch.false
: (Default) Do not synchronize the playback position before and after the switch.
Make sure to set this parameter as
false
if you need to play live streams, or the switch fails. If you need to play on-demand streams, you can set the value of this parameter according to your scenarios.
Returns
- 0: Success.
- < 0: Failure.
unloadSrc
Unloads media resources that are preloaded.
virtual int unloadSrc(const char* src) = 0;
This method cannot release the media resource being played.
Parameters
- src
- The URL of the media resource.
Returns
- 0: Success.
- < 0: Failure.
unregisterAudioFrameObserver
Unregisters an audio observer.
virtual int unregisterAudioFrameObserver(media::base::IAudioFrameObserver* observer) = 0;
Parameters
- observer
- The audio observer. See IAudioFrameObserver.
Returns
- 0: Success.
- < 0: Failure.
unregisterPlayerSourceObserver
Releases a media player observer.
virtual int unregisterPlayerSourceObserver(IMediaPlayerSourceObserver* observer) = 0;
Parameters
- observer
- The player observer, listening for events during the playback. See IMediaPlayerSourceObserver.
Returns
- 0: Success.
- < 0: Failure.
unregisterVideoFrameObserver
Unregisters the video frame observer.
virtual int unregisterVideoFrameObserver(agora::media::base::IVideoFrameObserver* observer) = 0;
Parameters
- observer
- The video observer, reporting the reception of each video frame. See IVideoFrameObserver.
Returns
- 0: Success.
- < 0: Failure.
onAudioVolumeIndication
Reports the volume of the media player.
virtual void onAudioVolumeIndication(int volume) = 0;
The SDK triggers this callback every 200 milliseconds to report the current volume of the media player.
Parameters
- volume
- The volume of the media player. The value ranges from 0 to 255.
onMetaData
Occurs when the media metadata is received.
virtual void onMetaData(const void* data, int length) = 0;
The callback occurs when the player receives the media metadata and reports the detailed information of the media metadata.
Parameters
- data
- The detailed data of the media metadata.
- length
- The data length (bytes).
onPlayBufferUpdated
Reports the playback duration that the buffered data can support.
virtual void onPlayBufferUpdated(int64_t playCachedBuffer) = 0;
- When the playback duration supported by the buffered data is less than the threshold (0 by default), the SDK returns PLAYER_EVENT_BUFFER_LOW.
- When the playback duration supported by the buffered data is greater than the threshold (0 by default), the SDK returns PLAYER_EVENT_BUFFER_RECOVER.
Parameters
- playCachedBuffer
- The playback duration (ms) that the buffered data can support.
onPlayerEvent
Reports the playback event.
virtual void onPlayerEvent(media::base::MEDIA_PLAYER_EVENT eventCode, int64_t elapsedTime, const char* message) = 0;
- After calling the seek method, the SDK triggers the callback to report the results of the seek operation.
Parameters
- eventCode
- The playback event. See MEDIA_PLAYER_EVENT.
- elapsedTime
- The time (ms) when the event occurs.
- message
- Information about the event.
onPlayerInfoUpdated
Occurs when information related to the media player changes.
virtual void onPlayerInfoUpdated(const media::base::PlayerUpdatedInfo& info) = 0;
When the information about the media player changes, the SDK triggers this callback. You can use this callback for troubleshooting.
Parameters
- info
- Information related to the media player. See PlayerUpdatedInfo.
onPlayerSourceStateChanged
Reports the playback state change.
virtual void onPlayerSourceStateChanged(media::base::MEDIA_PLAYER_STATE state,
media::base::MEDIA_PLAYER_ERROR ec) = 0;
When the state of the media player changes, the SDK triggers this callback to report the current playback state.
Parameters
- state
- The playback state, see MEDIA_PLAYER_STATE.
- ec
- The error code. See MEDIA_PLAYER_ERROR.
onPlayerSrcInfoChanged
Occurs when the video bitrate of the media resource changes.
virtual void onPlayerSrcInfoChanged(const media::base::SrcInfo& from, const media::base::SrcInfo& to) = 0;
Parameters
onPositionChanged
Reports current playback progress.
virtual void onPositionChanged(int64_t position) = 0;
When playing media files, the SDK triggers this callback every one second to report current playback progress.
Parameters
- position
- The playback position (ms) of media files.
onPreloadEvent
Reports the events of preloaded media resources.
virtual void onPreloadEvent(const char* src, media::base::PLAYER_PRELOAD_EVENT event) = 0;
Parameters
- src
- The URL of the media resource.
- event
- Events that occur when media resources are preloaded. See PLAYER_PRELOAD_EVENT.
onReadData
Occurs when the SDK reads the media resource data.
virtual int onReadData(unsigned char *buffer, int bufferSize) = 0;
When you call the openWithCustomSource method to open a custom media resource, the SDK triggers this callback to request the specified location in the media resource.
Parameters
- buffer
- An input parameter. Data buffer (bytes). Write the bufferSize data reported by the SDK into this parameter.
- bufferSize
- The length of the data buffer (bytes).
Returns
- If the data is read successfully, pass in the length of the data (bytes) you actually read in the return value.
- If reading the data fails, pass in 0 in the return value.
onSeek
Occurs when the SDK seeks the media resource data.
virtual int64_t onSeek(int64_t offset, int whence) = 0;
When you call the openWithCustomSource method to open a custom media resource, the SDK triggers this callback to request the specified location in the media resource.
Parameters
- offset
- An input parameter. The offset of the target position relative to the starting point, in bytes. The value can be positive or negative.
- whence
- An input parameter. The starting point. You can set it as one of the following values:
- 0: The starting point is the head of the data, and the actual data offset after seeking is offset.
- 1: The starting point is the current position, and the actual data offset after seeking is the current position plus offset.
- 2: The starting point is the end of the data, and the actual data offset after seeking is the whole data length plus offset.
- 65536: Do not perform position seeking, return the file size. Agora recommends that you use this parameter value when playing pure audio files such as MP3 and WAV.
Returns
- When whence is 65536, the media file size is returned.
- When whence is 0, 1, or 2, the actual data offset after the seeking is returned.
- -1: Seeking failed.