V/G Controller

V/G Controller

📢  새로운 Kollus Docs 사이트에서 최신 문서를 확인하세요!

본 문서는 구버전이며, 더 정확하고 최신화된 정보는 아래 신규 경로에서 확인하실 수 있습니다.

게시 중단 안내: 이 문서는 2026년 6월 30일까지만 제공됩니다.

📢  새로운 Kollus Docs 사이트에서 최신 문서를 확인하세요!

본 문서는 구버전이며, 더 정확하고 최신화된 정보는 아래 신규 경로에서 확인하실 수 있습니다.

게시 중단 안내: 이 문서는 2026년 6월 30일까지만 제공됩니다.

V/G Controller 

Latest version 1.3.0

개요


Kollus VG Controller는 Videogateway로 제공되는 미디어의 일부 컨트롤을 고객사 웹사이트 내에서 구현 할 수 있도록 지원 하는 Javascript library입니다. Kollus VG Controller는 다음과 같은 특징을 가지고 있습니다.

  • Videogateway에서 자동으로 실행되는 플레이어의 타입에 관계없이 동일한 코드로 제어 가능

  • 간단한 설치 + 쉬운 사용방법

  • 플레이어의 감지 실행을 고민할 필요가 없음

  • 서드파티 자바스크립트 라이브러리가 필요치 않음

메소드와 이벤트 목록 이름 옆에 표기되는 V3, V4 Player(1) 등은 Player를 의미합니다.

시작하기


VgControllerClient

(고객사 html page에 삽입)

아래 예시 코드를 영상이 보여질 html page에 적용하시면 됩니다.  

... <script src="/path/to/vg-controller-client.1.1.16.min.js"></script> <script> window.onload = function () { try { var controller = new VgControllerClient({ target_window: document.getElementById('child').contentWindow, }); // 여기서부터 이벤트 리스너를 등록하거나, 웹페이지 Element에 메소드를 bind하면 됩니다. } catch (e) { // Videogateweay Controller Library는 window.postMessage API를 이용하기 때문에 // 해당 기능을 지원하지 않는 웹브라우져에서는 동작하지 않습니다. // 이 부분에 적절한 fail-over 코드를 추가하여 주십시요. console.error(e); } }; </script> <body> <iframe id="child" src="http://v.kr..."></iframe> </body> ...
  • VgControllerClient 생성시 파라미터로 전달하는 target_window의 경우 홈페이지에 첨부한 Kollus Videogateway iframe의 HTMLElement에 contentWindow 속성을 입력해야 합니다

  • 본 스크립트는 window.postMessage API 를 이용하여 Player와 통신하므로, 해당 기능을 지원하지 않는 웹브라우져에 서는 동작하지 않습니다.

  • 웹페이지 내에 하나 이상의 iframe을 embed한 경우 제어할 iframe마다 서로 다른 VgControllerClient 를 생성해야 합니다.

  • 이전 버전과의 호환성을 위해 (v0.5이하) new VgControllerClient() 대신 new Kollus.VideogatewayController() 를 사용해도 정상적으로 작동합니다.

  • try-catch문의 Exception code list는 다음과 같습니다.

code

message

description

code

message

description

-1

*

PostMessage API exception code

-99

player type is not defined

Player type이 정의되지 않았습니다.

-99

player type must be one of v2, v3, v4 and flash

Player type이 유효한 값이 아닙니다.

-99

this browser does not support postMessage

브라우저가 PostMessage API를 지원하지 않습니 다

-99

listener is not callable

이벤트 리스너가 함수형이 아닙니다.

CDN


Vg-Controller Client Library를 CDN으로 제공합니다. 가장 최신 버전의 라이브러리를 사용하시려면 아래 링크를 삽입하시면 됩니다

https://file.kollus.com/vgcontroller/vg-controller-client.latest.min.js

이전 버전의 라이브러리를 사용하시려면 latest 대신 버전명으로 변경하여 호출하시면 됩니다.

https://file.kollus.com/vgcontroller/vg-controller-client.1.1.4.min.js

Integrity 속성을 사용하면 VG-Controller Client Library의 악의적인 스크립트 변조를 방지할 수 있습니다. 스크립트 호출시 버전에 맞는 Integrity 속성값을 추가해 주시면 됩니다.

<script src="https://file.kollus.com/vgcontroller/vg-controller-client.1.2.3.min.js" integrity="sha256-esUCCL4RPYMS8AR+Sl3lNrFa5M+zgpt4Gb77qtz66OY=" crossorigin="anonymous"> </script>

Copyright © CATENOID, lnc. All Rights Reserved.
E-mail. support@catenoid.net | Tel. 1544-4367