버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.
Sv translation
languageko

W Player API 수행 실패 원인 확인

W Player API 수행 실패에 대한 원인은 $wp.setDefaultCallback()으로 설정된 callback 함수를 통해 error object로 전달받을 수 있습니다.

코드 블럭
  

...

$wp.setDefaultCallback(function(dataset) {
  

...

// dataset.type: ‘error’
  

...

// dataset.sub: ‘content.getPage.setProperty’
  

...

// dataset.data: ‘Error: setProperty: Requested property is not supported, property = ip
  

...

}   
  

...

W Player API 수행 예외 확인

API 실행 중 예외 발생은 코드 내에 try catch를 추가해 확인할 수 있습니다.

코드 블럭
  let version 

...

= null;
  

...

try {
      version 

...

= $wp.utility.getApiVersion();
  

...

} catch (e) {
      

...

console.log("[getApiVersion] Exception occurred = ${e}");
  

...

}
  

...

웹 콘텐츠 내 Tizen API 사용

Tizen API를 사용해 장치의 기능(예: 리모콘 신호 수신)에 직접 접근할 수 있습니다.

...

자세한 내용은 Tizen 개발자 페이지를 참고하세요.

...

Tizen 개발자 홈페이지

책갈피
로그 가져오기
로그 가져오기
로그 가져오기

Log 스크립트에 ‘wplayer_api_nopswd’를 입력해 가져오기를 진행하면 $wp.utility.log()를 이용해 남긴 로그를 파일로 가져올 수 있습니다.

Stylesheet
classscreen

Image Modified

Sv translation
languageen

Finding the cause of a W Player API failure

The cause of a W Player API failure can be received as an error object through the callback function that is set as $wp.setDefaultCallback().

코드 블럭
  $wp.setDefaultCallback(function(dataset) {
  // dataset.type: ‘error’
  // dataset.sub: ‘content.getPage.setProperty’
  // dataset.data: ‘Error: setProperty: Requested property is not supported, property = ip
  }   
  

Checking the exceptions during running of W Player API

Exception occurrences during running of API can be checked by adding a try-catch statement in the code.

코드 블럭
  let version = null;
  try {
      version = $wp.utility.getApiVersion();
  } catch (e) {
      console.log("[getApiVersion] Exception occurred = ${e}");
  }
  

Using Tizen API in web content

Use Tizen API to access device functions (e.g., remote-control signal reception) directly. Refer to the Tizen developer page for details. ▶ Tizen Developers Website

책갈피
Importing logs
Importing logs
Importing logs

If you enter "wplayer_api_nopswd" in the log script, logs that were saved by using $wp.utility.log() can be imported as a file.

Stylesheet
classscreen

Image Added