m3u8링크를 볼수있는 동영상 hls 게시판 스킨 정보
게시판 m3u8링크를 볼수있는 동영상 hls 게시판 스킨
관련링크
첨부파일
테스트한 버전5.4
호환 가능 버전5.3 이상
본문
간단하게 만들어 보았습니다.
기존에 vimeo 플레이어게시판을 hls로 변형하였습니다.
wr_link1 에 sample 링크
view.skin.php
<script src='https://d33wubrfki0l68.cloudfront.net/js/9012aa6cdcc02be8d7cbd62c6f12aff976c2d83b/dist/hls.js'></script>
<script>
var video = document.getElementById('video');
if (Hls.isSupported()) {
var hls = new Hls({
debug: true,
});
hls.loadSource("<?php echo $view['wr_link1'];?>");
hls.attachMedia(video);
hls.on(Hls.Events.MEDIA_ATTACHED, function () {
video.muted = true;
video.play();
});
}
// hls.js is not supported on platforms that do not have Media Source Extensions (MSE) enabled.
// When the browser has built-in HLS support (check using `canPlayType`), we can provide an HLS manifest (i.e. .m3u8 URL) directly to the video element through the `src` property.
// This is using the built-in support of the plain video element, without using hls.js.
else if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = "<?php echo $view['wr_link1'];?>";
video.addEventListener('canplay', function () {
video.play();
});
}
</script>
영상위치
<video id="video" width='100%' height='auto' ></video>
추천
5
5
댓글 전체

감사 합니다.
감사합니다.
감사합니다.

감사합니다.
감사합니다.
데모 보는곳이 포인트 차감 부분으로 글 보기가 안됩니다.