Languages

Menu
Sites
Language
Unknown Error in AVPlayManager.setDrm()

Hi All,

My app on TV Samsung use Verimatrix Drm

This is code use setVerimatrix like this site : https://developer.samsung.com/tv/develop/api-references/samsung-product-api-references/avplay-api

TizenAVPlayer.setVerimarix = function () {
  console.log(this.UID);
  var drmParam = {
    CompanyName: "Viettel",
    IPTV: null,
    Web: "27.67.49.248:80",
    UID: this.UID,
  };

  try {
    webapis.avplay.setDrm("VERIMATRIX", "Initialize", JSON.stringify(drmParam));
  } catch (e) {
    console.log(e);
  }
};

This bug I receive

UID: YCLDEMjYuvL7UmAQyNPT2BjxOeA= 
 
WebAPIException
  1. ABORT_ERR20
  2. DATA_CLONE_ERR25
  3. DOMSTRING_SIZE_ERR2
  4. HIERARCHY_REQUEST_ERR3
  5. INDEX_SIZE_ERR1
  6. INUSE_ATTRIBUTE_ERR10
  7. INVALID_ACCESS_ERR15
  8. INVALID_CHARACTER_ERR5
  9. INVALID_MODIFICATION_ERR13
  10. INVALID_NODE_TYPE_ERR24
  11. INVALID_STATE_ERR11
  12. NAMESPACE_ERR14
  13. NETWORK_ERR19
  14. NOT_FOUND_ERR8
  15. NOT_SUPPORTED_ERR9
  16. NO_DATA_ALLOWED_ERR6
  17. NO_MODIFICATION_ALLOWED_ERR7
  18. QUOTA_EXCEEDED_ERR22
  19. SECURITY_ERR18
  20. SYNTAX_ERR12
  21. TIMEOUT_ERR23
  22. TYPE_MISMATCH_ERR17
  23. URL_MISMATCH_ERR21
  24. VALIDATION_ERR16
  25. WRONG_DOCUMENT_ERR4
  26. code0
  27. line66
  28. message"Unknown Error in AVPlayManager.setDrm()."
  29. name"UnknownError"
  30. sourceURL"file:///opt/usr/apps/TkjGBIGKqz/res/wgt/js/videoplayer/TizenAVPlayer.js"
  31. stack"setDrm@[native code]↵setVerimarixfile:///opt/usr/apps/TkjGBIGKqz/res/wgt/js/videoplayer/TizenAVPlayer.js:66:28↵playVideofile:///opt/usr/apps/TkjGBIGKqz/res/wgt/js/videoplayer/TizenAVPlayer.js:108:35↵file:///opt/usr/apps/TkjGBIGKqz/res/wgt/js/videoplayer/controllers/avplayerController.js:152:40"
  32. type"UnknownError"
  33. __proto__CallbackObject

Has anyone had this error and how to solve it ?

Thank.

Edited by: Vinh Nguyen on 28 Aug, 2018

Responses

1 Replies
Armaan-Ul- Islam

Make sure You have already added the 'drmplay' privilege in config.xml.

 

Possible WebAPIExceptions for setDrm(): (Ref)

  • with error type TypeMismatchError, if an input parameter is not compatible with its expected type.

  • with error type NotSupportedError, if this feature is not supported.

  • with error type InvalidValuesError, if any input parameter contains an invalid value.

  • with error type SecurityError, if the application does not have the privilege to call this method.

  • with error type InvalidStateError, if it is called in an invalid state.

  • with error type UnknownError, for any other error.

 

In your case, Debugger has shown 'Unknown Error in AVPlayManager.setDrm()', so hard to tell the reason.

The error could have been for 'jsonParam'. Check the JSON format is correct.

console.log(JSON.stringify(drmParam));

 

# Might try trial & Error process with the key/value pairs in the jsonParam. Like : Changing value of 'IPTV', removing 'UID', changing value of 'Web', etc.