페이지 이력
...
Sv translation | ||
---|---|---|
| ||
이 인터페이스는 W Player에서 현재 로드(Load)된 페이지(Page) 및 요소(Element)를 사용하기 위한 API들을 제공합니다. getPage()
|
...
|
...
|
...
|
...
|
...
|
...
기타
$wp.content.getPage(); (id 값을 입력하지 않으면 현재 화면에 재생되는 page 객체가 전달됩니다.)
setProperty()
|
...
|
...
|
...
|
...
|
...
|
...
|
...
getProperty()
|
...
|
...
|
...
|
...
|
...
getGlobalPage()
|
...
|
...
|
...
|
...
|
...
|
...
getElement()
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
setProperty()
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
getProperty()
|
...
|
...
|
...
|
...
|
...
|
...
|
...
addEventListener()
|
...
|
...
getPropertyType()
|
...
|
...
|
...
movePage()
|
...
|
...
|
...
wp.device
이 인터페이스는 W Player, Tizen 등의 Device 관련 리소스 정보를 얻기 위한 API들을 제공합니다.
getProperty ()
...
설명: Device의 속성값을 구합니다.
...
구문: function getProperty (‘name’);
파라미터
name: 속성명
...
name
...
반환값
...
player_version
...
string
...
value: w player version
...
fw_version
...
string
...
value: firmware version
...
variable_tag
...
array
...
value: tag list
...
mis_ip
...
string
...
value: mis ip address
...
mac
...
string
...
value: mac address
...
ipaddress
...
string
...
value: ip address
...
resolution
...
object
...
{ width: 1920, height: 1080 }
...
orientation
...
string
...
value: landscape/portrait
...
반환값
Type: 위 표 참고
API가 성공적으로 수행된 경우: 정상값
API가 성공적으로 수행되지 않은 경우: undefined Type: bool
...
코드 예제
$wp.device.getProperty(‘mac’);
getPropertyType()
설명: Device 인터페이스에서 제공하는 속성들의 이름을 가져올 수 있습니다.
...
속성명
...
반환값
...
PLAYER_VERSION
...
'player_version'
...
FIRMWARE_VERSION
...
'fw_version'
...
VARIABLE_TAG
...
'variable_tag'
...
MIS_IP
...
'mis_ip'
...
MACADDRESS
...
'mac'
...
IPADDRESS
...
'ipaddress'
...
RESOLUTION
...
'resolution'
...
ORIENTATION
...
'orientation'
...
구문: function getPropertyType();
...
파라미터
None
...
반환값
성공: object(속성명), 실패: 항상 성공
...
코드 예제
$wp.device.getPropertyType();
...
기타
$wp.device.getPropertyType();로부터 반환되는 객체를 변수화해 사용하면 오타 방지 등의 편리함이 있습니다.
var devicePropertyType = $wp.device.getPropertyType();
$wp.device.getProperty(devicePropertyType.MACADDRESS);
$wp.local
이 인터페이스는 웹 콘텐츠 요소가 실행되는 local 환경 정보를 얻기 위한 API들을 제공합니다.
...
getApiVersion ()
설명: 웹 콘텐츠가 가져온 W Player API Lib의 버전을 알 수 있습니다.
구문: function getApiVersion();
파라미터
None
반환값
성공: string (version), 실패: 항상 성공
코드 예제
$wp.local.getApiVersion();
기타
$wp.utility.getApiVersion();과 함께 사용해 버전 관리를 할 수 있습니다.
getRootDirectory ()
...
설명: 웹 콘텐츠가 로드된 루트 디렉터리를 알 수 있습니다.
...
구문: function getRootDirectory();
...
파라미터
none
...
반환값
성공: string (Root Directory), 실패: 항상 성공
코드 예제
...
기타
웹 콘텐츠에 추가한 asset은 getRootDirectory()를 통해 전달받은 루트 디렉터리 경로 하위에 저장됩니다.
...
$wp.utility
이 인터페이스는 응용 웹 콘텐츠 요소 개발을 위한 여러 utility API들을 제공합니다.
log ()
설명: 웹 콘텐츠가 가져온 W Player API Lib의 버전을 알 수 있습니다.
구문: function log(“message”);
파라미터
message: string
반환값
Type: void
코드 예제
$wp.utility.log(“Hello World!”);
기타
로그를 원격으로 가져올 수 있습니다. 다음을 참고하세요. ▶ 로그 가져오기
getApiVersion ()
설명: 웹 콘텐츠가 실행되는 W Player가 지원하는 W Player API Lib의 버전을 알 수 있습니다.
구문: function getApiVersion();
파라미터
none
반환값
성공: string (version), 실패: 항상 성공
코드 예제
$wp.utility.getApiVersion();
기타
$wp.local.getApiVersion();과 함께 사용해 버전 관리를 할 수 있습니다.
Sv translation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This interface provides APIs required for using the loaded current pages and elements from W Player. getPage()
setProperty()
getProperty()
getGlobalPage()
getElement()
setProperty()
getProperty()
addEventListener()
getPropertyType()
movePage()
|