[HTML5] Google Drive로 공유된 동영상 Jwplayer를 통해 플레이하기

페이지 정보

yadolee 루루아빠 3,157 2015.09.15 05:38:29

평점

  • 평점 : 0점 (0명 참여)

본문

기본적인 Jwplayer 동영상 소스는 다음과 같다.

<div style="text-align:center">
  <div id="player"></div>
  <script type="text/javascript">
    jwplayer('player').setup({
      file: "동영상 주소.확장자",
      image: "이미지 주소.확장자",
      title: "제목",
      width: '100%',
      aspectratio: '4:3',
      skin: 'five',
    });
  </script>
<style>
#player{position:relative;max-width:500px;margin-left:auto;margin-right:auto;height:auto}
</style>
</div>
  1. 구글드라이브에 웹 공개 설정으로 공유 폴더를 만든 후 그 공유폴더의 id=고유값을 메모한다.
  2. 생성된 폴더에 공유 비디오를 업로드한다.
  3. 구글드라이브에 업로드된 파일명 및 확장자는 본래의 이름과 확장자와 동일하다.
실제로 웹상에 올릴때는 다음과 같은 소스 구조를 갖는다.

<div style="text-align:center">
  <div id="player"></div>
  <script type="text/javascript">
    jwplayer('player').setup({
      file: "http://www.googledrive.com/host/폴더 고유값/파일명.확장자",
      image: "이미지 주소.확장자",
      title: "제목",
      width: '100%',
      aspectratio: '4:3',
      skin: 'five',
    });
  </script>
<style>
#player{position:relative;max-width:500px;margin-left:auto;margin-right:auto;height:auto}
</style>

 
추천인
  • 추천해 주세요
yadolee
6
루루아빠 - 회원등급 : 최고관리자 - 포인트 : 1,336,189
레벨 100
경험치 1,495,752

Progress Bar 35.84%

- 가입일 : 2015-03-04 03:24:54
- 서명 : KNOW YOUR LIMITS BUT NEVER STOP TRYING TO EXCEED THEM !!
- 자기소개 : 루루의 자랑 루루아빠랍니다~~

댓글

첫 번째 댓글을 남겨 주세요