Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 45 additions & 40 deletions AAMP-UVE-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -2439,46 +2439,51 @@ When a player instance is no longer needed, recommend to call explicit release()

## Universal Video Engine Player Errors

| Error Code | Code | Error String |
| ---- | ---- | ----- |
| AAMP_TUNE_INIT_FAILED | 10 | AAMP: init failed |
| AAMP_TUNE_INIT_FAILED_MANIFEST_DNLD_ERROR | 10 | AAMP: init failed (unable to download manifest) |
| AAMP_TUNE_INIT_FAILED_MANIFEST_CONTENT_ERROR | 10 | AAMP: init failed (manifest missing tracks) |
| AAMP_TUNE_INIT_FAILED_MANIFEST_PARSE_ERROR | 10 | AAMP: init failed (corrupt/invalid manifest) |
| AAMP_TUNE_INIT_FAILED_TRACK_SYNC_ERROR | 10 | AAMP: init failed (unsynchronized tracks) |
| AAMP_TUNE_MANIFEST_REQ_FAILED | 10 | AAMP: Manifest Download failed; Playlist refresh failed |
| AAMP_TUNE_INIT_FAILED_PLAYLIST_VIDEO_DNLD_ERROR | 10 | AAMP: init failed (unable to download video playlist) |
| AAMP_TUNE_INIT_FAILED_PLAYLIST_AUDIO_DNLD_ERROR | 10 | AAMP: init failed (unable to download audio playlist) |
| AAMP_TUNE_FRAGMENT_DOWNLOAD_FAILURE | 10 | AAMP: fragment download failures |
| AAMP_TUNE_INIT_FRAGMENT_DOWNLOAD_FAILURE | 10 | AAMP: init fragment download failed |
| AAMP_TUNE_INVALID_MANIFEST_FAILURE | 10 | AAMP: Invalid Manifest, parse failed |
| AAMP_TUNE_MP4_INIT_FRAGMENT_MISSING | 10 | AAMP: init fragments missing in playlist |
| AAMP_TUNE_CONTENT_NOT_FOUND | 20 | AAMP: Resource was not found at the URL(HTTP 404) |
| AAMP_TUNE_AUTHORIZATION_FAILURE | 40 | AAMP: Authorization failure |
| AAMP_TUNE_UNTRACKED_DRM_ERROR | 50 | AAMP: DRM error untracked error |
| AAMP_TUNE_DRM_INIT_FAILED | 50 | AAMP: DRM Initialization Failed |
| AAMP_TUNE_DRM_DATA_BIND_FAILED | 50 | AAMP: InitData-DRM Binding Failed |
| AAMP_TUNE_DRM_SESSIONID_EMPTY | 50 | AAMP: DRM Session ID Empty |
| AAMP_TUNE_DRM_CHALLENGE_FAILED | 50 | AAMP: DRM License Challenge Generation Failed |
| AAMP_TUNE_LICENCE_TIMEOUT | 50 | AAMP: DRM License Request Timed out |
| AAMP_TUNE_LICENCE_REQUEST_FAILED | 50 | AAMP: DRM License Request Failed |
| AAMP_TUNE_INVALID_DRM_KEY | 50 | AAMP: Invalid Key Error, from DRM |
| AAMP_TUNE_UNSUPPORTED_STREAM_TYPE | 60 | AAMP: Unsupported Stream Type. Unable to determine stream type for DRM Init |
| AAMP_TUNE_UNSUPPORTED_AUDIO_TYPE | 60 | AAMP: No supported Audio Types in Manifest |
| AAMP_TUNE_FAILED_TO_GET_KEYID | 50 | AAMP: Failed to parse key id from PSSH |
| AAMP_TUNE_FAILED_TO_GET_ACCESS_TOKEN | 50 | AAMP: Failed to get access token from Auth Service |
| AAMP_TUNE_CORRUPT_DRM_METADATA | 50 | AAMP: DRM failure due to Bad DRMMetadata in stream |
| AAMP_TUNE_DRM_DECRYPT_FAILED | 50 | AAMP: DRM Decryption Failed for Fragments |
| AAMP_TUNE_DRM_UNSUPPORTED | 50 | AAMP: DRM format Unsupported |
| AAMP_TUNE_DRM_SELF_ABORT | 50 | AAMP: DRM license request aborted by player |
| AAMP_TUNE_DRM_KEY_UPDATE_FAILED | 50 | AAMP: Failed to process DRM key |
| AAMP_TUNE_CORRUPT_DRM_DATA | 51 | AAMP: DRM failure due to Corrupt DRM files |
| AAMP_TUNE_DEVICE_NOT_PROVISIONED | 52 | AAMP: Device not provisioned |
| AAMP_TUNE_HDCP_COMPLIANCE_ERROR | 53 | AAMP: HDCP Compliance Check Failure |
| AAMP_TUNE_GST_PIPELINE_ERROR | 80 | AAMP: Error from gstreamer pipeline |
| AAMP_TUNE_FAILED_PTS_ERROR | 80 | AAMP: Playback failed due to PTS error |
| AAMP_TUNE_PLAYBACK_STALLED | 7600 | AAMP: Playback was stalled due to lack of new fragments |
| AAMP_TUNE_FAILURE_UNKNOWN | 100 | AAMP: Unknown Failure |
| Error Code | Code | MinorCode | Error String |
| ---- | ---- | ----- | ----- |
| AAMP_TUNE_INIT_FAILED | 10 | 1001 | AAMP: init failed |
| AAMP_TUNE_INIT_FAILED_MANIFEST_DNLD_ERROR | 10 | 1002 | AAMP: init failed (unable to download manifest) |
| AAMP_TUNE_INIT_FAILED_MANIFEST_CONTENT_ERROR | 10 | 1003 | AAMP: init failed (manifest missing tracks) |
| AAMP_TUNE_INIT_FAILED_MANIFEST_PARSE_ERROR | 10 | 1004 | AAMP: init failed (corrupt/invalid manifest) |
| AAMP_TUNE_INIT_FAILED_PLAYLIST_VIDEO_DNLD_ERROR | 10 | 1005 | AAMP: init failed (unable to download video playlist) |
| AAMP_TUNE_INIT_FAILED_PLAYLIST_AUDIO_DNLD_ERROR | 10 | 1006 | AAMP: init failed (unable to download audio playlist) |
| AAMP_TUNE_INIT_FAILED_TRACK_SYNC_ERROR | 10 | 1007 | AAMP: init failed (unsynchronized tracks) |
| AAMP_TUNE_CONTENT_NOT_FOUND | 20 | 2001 | AAMP: Resource was not found at the URL(HTTP 404) |
| AAMP_TUNE_MANIFEST_REQ_FAILED | 30 | 3001 | AAMP: Manifest Download failed |
| AAMP_TUNE_FRAGMENT_DOWNLOAD_FAILURE | 30 | 3002 | AAMP: fragment download failures |
| AAMP_TUNE_INIT_FRAGMENT_DOWNLOAD_FAILURE | 30 | 3003 | AAMP: init fragment download failed |
| AAMP_TUNE_INVALID_MANIFEST_FAILURE | 30 | 3004 | AAMP: Invalid Manifest, parse failed |
| AAMP_TUNE_MP4_INIT_FRAGMENT_MISSING | 30 | 3005 | AAMP: init fragments missing in playlist |
| AAMP_TUNE_DNS_RESOLVE_TIMEOUT | 30 | 3006 | AAMP: Manifest download failed due to DNS resolve timeout |
| AAMP_TUNE_CURL_CONNECTION_TIMEOUT | 30 | 3007 | AAMP: Manifest download failed due to connection timeout |
| AAMP_TUNE_DATA_TRANSFER_TIMEOUT | 30 | 3008 | AAMP: Manifest download failed due to data transfer timeout |
| AAMP_TUNE_AUTHORIZATION_FAILURE | 40 | 4001 | AAMP: Authorization failure |
| AAMP_TUNE_UNTRACKED_DRM_ERROR | 50 | 5001 | AAMP: DRM error untracked error |
| AAMP_TUNE_DRM_INIT_FAILED | 50 | 5002 | AAMP: DRM Initialization Failed |
| AAMP_TUNE_DRM_DATA_BIND_FAILED | 50 | 5003 | AAMP: InitData-DRM Binding Failed |
| AAMP_TUNE_DRM_SESSIONID_EMPTY | 50 | 5004 | AAMP: DRM Session ID Empty |
| AAMP_TUNE_DRM_CHALLENGE_FAILED | 50 | 5005 | AAMP: DRM License Challenge Generation Failed |
| AAMP_TUNE_LICENCE_TIMEOUT | 50 | 5006 | AAMP: DRM License Request Timed out |
| AAMP_TUNE_LICENCE_REQUEST_FAILED | 50 | 5007 | AAMP: DRM License Request Failed |
| AAMP_TUNE_INVALID_DRM_KEY | 50 | 5008 | AAMP: Invalid Key Error, from DRM |
| AAMP_TUNE_FAILED_TO_GET_KEYID | 50 | 5009 | AAMP: Failed to parse key id from PSSH |
| AAMP_TUNE_CORRUPT_DRM_DATA | 50 | 5010 | AAMP: DRM failure due to Corrupt DRM files |
| AAMP_TUNE_CORRUPT_DRM_METADATA | 50 | 5011 | AAMP: DRM failure due to Bad DRMMetadata in stream |
| AAMP_TUNE_DRM_DECRYPT_FAILED | 50 | 5012 | AAMP: DRM Decryption Failed for Fragments |
| AAMP_TUNE_DRM_UNSUPPORTED | 50 | 5013 | AAMP: DRM format Unsupported |
| AAMP_TUNE_DRM_SELF_ABORT | 50 | 5014 | AAMP: DRM license request aborted by player |
| AAMP_TUNE_FAILED_TO_GET_ACCESS_TOKEN | 50 | 5015 | AAMP: Failed to get access token from Auth Service |
| AAMP_TUNE_DRM_KEY_UPDATE_FAILED | 50 | 5016 | AAMP: Failed to process DRM key |
| AAMP_TUNE_DEVICE_NOT_PROVISIONED | 51 | 5101 | AAMP: Device not provisioned |
| AAMP_TUNE_HDCP_COMPLIANCE_ERROR | 52 | 5201 | AAMP: HDCP Compliance Check Failure |

| AAMP_TUNE_UNSUPPORTED_STREAM_TYPE | 60 | 6001 | AAMP: Unsupported Stream Type |
| AAMP_TUNE_UNSUPPORTED_AUDIO_TYPE | 60 | 6002 | AAMP: No supported Audio Types in Manifest |
| AAMP_TUNE_GST_PIPELINE_ERROR | 80 | 8001 | AAMP: Error from gstreamer pipeline |
| AAMP_TUNE_FAILED_PTS_ERROR | 80 | 8002 | AAMP: Playback failed due to PTS error |

| AAMP_TUNE_PLAYBACK_STALLED | 7600 | 1 | AAMP: Playback was stalled due to lack of new fragments |
| AAMP_TUNE_FAILURE_UNKNOWN | 100 | 1 | AAMP: Unknown Failure |

---

Expand Down
22 changes: 15 additions & 7 deletions AampEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ AAMPEventType AAMPEventObject::getType() const
/**
* @brief MediaErrorEvent Constructor
*/
MediaErrorEvent::MediaErrorEvent(AAMPTuneFailure failure, int code, const std::string &desc, bool shouldRetry, int classCode, int reason, int businessStatus, const std::string &responseData, std::string sid):
AAMPEventObject(AAMP_EVENT_TUNE_FAILED, std::move(sid)), mFailure(failure), mCode(code),
MediaErrorEvent::MediaErrorEvent(AAMPTuneFailure failure, int code, int minorCode, const std::string &desc, bool shouldRetry, int classCode, int reason, int businessStatus, const std::string &responseData, std::string sid):
AAMPEventObject(AAMP_EVENT_TUNE_FAILED, std::move(sid)), mFailure(failure), mMajorCode(code), mMinorCode(minorCode),
mDescription(desc), mShouldRetry(shouldRetry), mSecManagerClass(classCode), mSecManagerReasonCode(reason), mBusinessStatus(businessStatus), mResponseData(responseData)
{

Expand All @@ -67,15 +67,23 @@ AAMPTuneFailure MediaErrorEvent::getFailure() const
}

/**
* @brief Get Error Code
* @brief Get Major Code
*
* @return Tune error code
* @return Major code
*/
int MediaErrorEvent::getCode() const
int MediaErrorEvent::getMajorCode() const
{
return mCode;
return mMajorCode;
}
/**
* @brief Get Minor Code
*
* @return Minor code
*/
int MediaErrorEvent::getMinorCode() const
{
return mMinorCode;
}

/**
* @brief Get Description
*
Expand Down
107 changes: 68 additions & 39 deletions AampEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,40 +123,63 @@ typedef enum
AAMP_TUNE_INIT_FAILED_PLAYLIST_VIDEO_DNLD_ERROR, /**< Tune failure due to video playlist download error*/
AAMP_TUNE_INIT_FAILED_PLAYLIST_AUDIO_DNLD_ERROR, /**< Tune failure due to audio playlist download error*/
AAMP_TUNE_INIT_FAILED_TRACK_SYNC_ERROR, /**< Tune failure due to A/V track sync error*/
AAMP_TUNE_MANIFEST_REQ_FAILED, /**< Tune failure caused by manifest fetch failure*/
AAMP_TUNE_AUTHORIZATION_FAILURE, /**< Not authorized to view the content*/
AAMP_TUNE_FRAGMENT_DOWNLOAD_FAILURE, /**< When fragment download fails for 5 consecutive fragments*/
AAMP_TUNE_INIT_FRAGMENT_DOWNLOAD_FAILURE, /**< Unable to download init fragment*/
AAMP_TUNE_UNTRACKED_DRM_ERROR, /**< DRM error*/
AAMP_TUNE_DRM_INIT_FAILED, /**< DRM initialization failure */
AAMP_TUNE_DRM_DATA_BIND_FAILED, /**< InitData binding with DRM failed */
AAMP_TUNE_DRM_SESSIONID_EMPTY, /**< DRM session ID empty */
AAMP_TUNE_DRM_CHALLENGE_FAILED, /**< DRM key request challenge generation failed */
AAMP_TUNE_LICENCE_TIMEOUT, /**< DRM license request timeout */
AAMP_TUNE_LICENCE_REQUEST_FAILED, /**< DRM license got invalid response */
AAMP_TUNE_INVALID_DRM_KEY, /**< DRM reporting invalid license key */
AAMP_TUNE_UNSUPPORTED_STREAM_TYPE, /**< Unsupported stream type */
AAMP_TUNE_UNSUPPORTED_AUDIO_TYPE, /**< Unsupported audio type in manifest */
AAMP_TUNE_FAILED_TO_GET_KEYID, /**< Failed to parse key id from init data*/
AAMP_TUNE_FAILED_TO_GET_ACCESS_TOKEN, /**< Failed to get session token from AuthService*/
AAMP_TUNE_CORRUPT_DRM_DATA, /**< DRM failure due to corrupt drm data, self heal might clear further errors*/
AAMP_TUNE_CORRUPT_DRM_METADATA, /**< DRM failure due to corrupt drm metadata in the stream*/
AAMP_TUNE_DRM_DECRYPT_FAILED, /**< DRM Decryption Failed for Fragments */
AAMP_TUNE_DRM_UNSUPPORTED, /**< DRM Format Unsupported */
AAMP_TUNE_DRM_SELF_ABORT, /**< Download activity is aborted by player */
AAMP_TUNE_GST_PIPELINE_ERROR, /**< Playback failure due to error from GStreamer pipeline or associated plugins */
AAMP_TUNE_PLAYBACK_STALLED, /**< Playback was stalled due to valid fragments not available in playlist */
AAMP_TUNE_CONTENT_NOT_FOUND, /**< The resource was not found at the URL provided (HTTP 404) */
AAMP_TUNE_DRM_KEY_UPDATE_FAILED, /**< Failed to process DRM key, see the error code returned from Update() for more info */
AAMP_TUNE_DEVICE_NOT_PROVISIONED, /**< STB not provisioned/corrupted; need to re-provision. */
AAMP_TUNE_HDCP_COMPLIANCE_ERROR, /**< HDCP Compliance Check failure.Not compatible hdcp version for playback */
AAMP_TUNE_INVALID_MANIFEST_FAILURE, /**< Manifest is invalid */
AAMP_TUNE_FAILED_PTS_ERROR, /**< Playback failed due to PTS error */
AAMP_TUNE_MP4_INIT_FRAGMENT_MISSING, /**< Init fragments missing in playlist */
AAMP_TUNE_DNS_RESOLVE_TIMEOUT,
AAMP_TUNE_CURL_CONNECTION_TIMEOUT,
AAMP_TUNE_DATA_TRANSFER_TIMEOUT,
AAMP_TUNE_FAILURE_UNKNOWN /**< Unknown failure */


//Resource failure
AAMP_TUNE_CONTENT_NOT_FOUND, /**< The resource was not found at the URL provided (HTTP 404) */

//Download failure
AAMP_TUNE_MANIFEST_REQ_FAILED, /**< Tune failure caused by manifest fetch failure*/
AAMP_TUNE_FRAGMENT_DOWNLOAD_FAILURE, /**< When fragment download fails for 5 consecutive fragments*/
AAMP_TUNE_INIT_FRAGMENT_DOWNLOAD_FAILURE, /**< Unable to download init fragment*/
AAMP_TUNE_INVALID_MANIFEST_FAILURE, /**< Manifest is invalid */
AAMP_TUNE_MP4_INIT_FRAGMENT_MISSING, /**< Init fragments missing in playlist */
AAMP_TUNE_DNS_RESOLVE_TIMEOUT, /**< DNS resolve timedout */
AAMP_TUNE_CURL_CONNECTION_TIMEOUT, /**< Curl connection timedout */
AAMP_TUNE_DATA_TRANSFER_TIMEOUT, /**< Data transfer timedout */

//Authorization failure
AAMP_TUNE_AUTHORIZATION_FAILURE, /**< Not authorized to view the content*/

//DRM Failure
AAMP_TUNE_UNTRACKED_DRM_ERROR, /**< DRM error*/
AAMP_TUNE_DRM_INIT_FAILED, /**< DRM initialization failure */
AAMP_TUNE_DRM_DATA_BIND_FAILED, /**< InitData binding with DRM failed */
AAMP_TUNE_DRM_SESSIONID_EMPTY, /**< DRM session ID empty */
AAMP_TUNE_DRM_CHALLENGE_FAILED, /**< DRM key request challenge generation failed */
AAMP_TUNE_LICENCE_TIMEOUT, /**< DRM license request timeout */
AAMP_TUNE_LICENCE_REQUEST_FAILED, /**< DRM license got invalid response */
AAMP_TUNE_INVALID_DRM_KEY, /**< DRM reporting invalid license key */
AAMP_TUNE_FAILED_TO_GET_KEYID, /**< Failed to parse key id from init data*/
AAMP_TUNE_CORRUPT_DRM_DATA, /**< DRM failure due to corrupt drm data, self heal might clear further errors*/
AAMP_TUNE_CORRUPT_DRM_METADATA, /**< DRM failure due to corrupt drm metadata in the stream*/
AAMP_TUNE_DRM_DECRYPT_FAILED, /**< DRM Decryption Failed for Fragments */
AAMP_TUNE_DRM_UNSUPPORTED, /**< DRM Format Unsupported */
AAMP_TUNE_DRM_SELF_ABORT, /**< Download activity is aborted by player */
AAMP_TUNE_FAILED_TO_GET_ACCESS_TOKEN, /**< Failed to get session token from AuthService*/
AAMP_TUNE_DRM_KEY_UPDATE_FAILED, /**< Failed to process DRM key, see the error code returned from Update() for more info */



//Provisioning failure
AAMP_TUNE_DEVICE_NOT_PROVISIONED, /**< STB not provisioned/corrupted; need to re-provision. */

//Hdcp failure
AAMP_TUNE_HDCP_COMPLIANCE_ERROR, /**< HDCP Compliance Check failure.Not compatible hdcp version for playback */

//Stream failure
AAMP_TUNE_UNSUPPORTED_STREAM_TYPE, /**< Unsupported stream type */
AAMP_TUNE_UNSUPPORTED_AUDIO_TYPE, /**< Unsupported audio type in manifest */

//Gstreamer error
AAMP_TUNE_GST_PIPELINE_ERROR, /**< Playback failed due to an error in the GStreamer pipeline */
AAMP_TUNE_FAILED_PTS_ERROR, /**< Playback failed due to PTS error */

//Playback failure
AAMP_TUNE_PLAYBACK_STALLED, /**< Playback was stalled due to valid fragments not available in playlist */

//Unknown failure
AAMP_TUNE_FAILURE_UNKNOWN
} AAMPTuneFailure;

/**
Expand Down Expand Up @@ -383,7 +406,8 @@ struct AAMPEvent
struct
{
AAMPTuneFailure failure; /**< Error Type */
int code; /**< Error code */
int code;
int minorCode; /**< Error code */
const char *description; /**< Error description */
bool shouldRetry; /**< If recovery on retry is possible */
int32_t classCode; /**< class Code */
Expand Down Expand Up @@ -619,7 +643,8 @@ class AAMPEventObject
class MediaErrorEvent: public AAMPEventObject
{
AAMPTuneFailure mFailure; /**< Error Type */
int mCode; /**< Error code */
int mMajorCode; /**< Error code */
int mMinorCode;
std::string mDescription; /**< Error description */
std::string mResponseData; /**< Response Data */
bool mShouldRetry; /**< If recovery on retry is possible */
Expand All @@ -638,10 +663,11 @@ class MediaErrorEvent: public AAMPEventObject
*
* @param[in] failure - Failure type
* @param[in] code - Error code
* @param[in] minorCode - Error code
* @param[in] desc - Error description
* @param[in] shouldRetry - Retry or not
*/
MediaErrorEvent(AAMPTuneFailure failure, int code, const std::string &desc, bool shouldRetry, int32_t classCode, int32_t reason, int32_t businessStatus, const std::string &responseData, std::string sid);
MediaErrorEvent(AAMPTuneFailure failure, int code, int minorCode, const std::string &desc, bool shouldRetry, int32_t classCode, int32_t reason, int32_t businessStatus, const std::string &responseData, std::string sid);

/**
* @brief MediaErrorEvent Destructor
Expand All @@ -653,11 +679,14 @@ class MediaErrorEvent: public AAMPEventObject
*/
AAMPTuneFailure getFailure() const;

/**
* @fn getMinorCode
*/
int getMinorCode() const;
/**
* @fn getCode
*/
int getCode() const;

int getMajorCode() const;
/**
* @fn getDescription
*/
Expand Down
3 changes: 2 additions & 1 deletion AampEventListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ static void GenerateLegacyAAMPEvent(const AAMPEventPtr &e, AAMPEvent &event)
{
MediaErrorEventPtr ev = std::dynamic_pointer_cast<MediaErrorEvent>(e);
event.data.mediaError.failure = ev->getFailure();
event.data.mediaError.code = ev->getCode();
event.data.mediaError.code = ev->getMajorCode();
event.data.mediaError.minorCode = ev->getMinorCode();
event.data.mediaError.description = ev->getDescription().c_str();
event.data.mediaError.shouldRetry = ev->shouldRetry();
if(-1 != ev->getClass()) //Only send the verbose logging for DRM failure due to secclient/secmanager
Expand Down
8 changes: 6 additions & 2 deletions jsbindings/jsbindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -928,14 +928,18 @@ class AAMP_JSListener_TuneFailed : public AAMP_JSListener
void setEventProperties(const AAMPEventPtr& e, JSContextRef context, JSObjectRef eventObj)
{
MediaErrorEventPtr evt = std::dynamic_pointer_cast<MediaErrorEvent>(e);

int code = evt->getCode();
int code = evt->getMajorCode();
int minorCode = evt->getMinorCode();
const char* description = evt->getDescription().c_str();

JSStringRef name = JSStringCreateWithUTF8CString("code");
JSObjectSetProperty(context, eventObj, name, JSValueMakeNumber(context, code), kJSPropertyAttributeReadOnly, NULL);
JSStringRelease(name);

name = JSStringCreateWithUTF8CString("minorCode");
JSObjectSetProperty(context, eventObj, name, JSValueMakeNumber(context, minorCode), kJSPropertyAttributeReadOnly, NULL);
JSStringRelease(name);

name = JSStringCreateWithUTF8CString("description");
JSObjectSetProperty(context, eventObj, name, aamp_CStringToJSValue(context, description), kJSPropertyAttributeReadOnly, NULL);
JSStringRelease(name);
Expand Down
6 changes: 5 additions & 1 deletion jsbindings/jseventlistener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,11 @@ class AAMP_Listener_PlaybackFailed : public AAMP_JSEventListener
JSStringRef prop;

prop = JSStringCreateWithUTF8CString("code");
JSObjectSetProperty(p_obj->_ctx, jsEventObj, prop, JSValueMakeNumber(p_obj->_ctx, evt->getCode()), kJSPropertyAttributeReadOnly, NULL);
JSObjectSetProperty(p_obj->_ctx, jsEventObj, prop, JSValueMakeNumber(p_obj->_ctx, evt->getMajorCode()), kJSPropertyAttributeReadOnly, NULL);
JSStringRelease(prop);

prop = JSStringCreateWithUTF8CString("minorCode");
JSObjectSetProperty(p_obj->_ctx, jsEventObj, prop, JSValueMakeNumber(p_obj->_ctx, evt->getMinorCode()), kJSPropertyAttributeReadOnly, NULL);
JSStringRelease(prop);

prop = JSStringCreateWithUTF8CString("description");
Expand Down
Loading
Loading