js 고수님들 도움 요청 합니다

게시판 링크에 플래시 동영상 주소를 입력하면 (
http://player.youku.com/player.php/sid/아이디/v.swf
http://player.youku.com/player.php/sid/XNjI0MTQxMjM2/v.swf
아니면
http://share.vrs.sohu.com/my/v.swf&autoplay=false&id=아이디&skinNum=1&topBar=1&xuid=
http://share.vrs.sohu.com/my/v.swf&autoplay=false&id=61272302&skinNum=1&topBar=1&xuid=
이런 형식이거든요


)


뷰페이지에서 쟈바로 이렇게 (iPhone|iPad|iPod|Android) 모바일 기기에서는 m3u8 붙여서 플레이를 하려고 합니다

function show_web(movie_name,movie_url,websource)
// movie_url 주소가 http://player.youku.com/player.php/sid/아이디/v.swf 아니면 http://share.vrs.sohu.com/my/v.swf&autoplay=false&id=아이디&skinNum=1&topBar=1&xuid= 이런 형식이거든요
// 가져올 놈은 http://v.youku.com/player/getRealM3U8/vid/아이디/type/video.m3u8 아니면 http://my.tv.sohu.com/ipad/ID.m3u8
{
var vid;
if (str.indexOf('youku.com') > -1) {
vid = str.substr(str.indexOf('/sid/')+5, 13);
return 'http://v.youku.com/player/getRealM3U8/vid/'+vid+'/type/video.m3u8';
} else if (str.indexOf('sohu.com') > -1) {
vid = str.split('&id=')[1];
vid = vid.substr(0, vid.indexOf('&'));
return 'http://my.tv.sohu.com/ipad/'+vid+'.m3u8';
} else {
return str;
}
{
if(websource==2){
document.getElementById('play').innerHTML="<div style='z-index:0'><video style='background:#000;' width='100%' height='100%' preload='auto' controls src='http://v.youku.com/player/getRealM3U8/vid/'+vid+'/type/video.m3u8'></video></div>";
}
if(websource==1){
document.getElementById('play').innerHTML="<div style='z-index:0'><video style='background:#000;' width='100%' height='100%' preload='auto' controls src='http://my.tv.sohu.com/ipad/'+vid+'.m3u8'></video></div>";
}

}

삽질 하여 여기까지 왔는데 잘 안되네요

도움 요청 드립니다
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
12년 전 조회 1,037
12년 전 조회 2,411
12년 전 조회 1,092
12년 전 조회 962
12년 전 조회 1,165
12년 전 조회 1,016
12년 전 조회 1,545
12년 전 조회 1,048
12년 전 조회 1,194
12년 전 조회 940
12년 전 조회 1,692
12년 전 조회 1,258
12년 전 조회 1,563
12년 전 조회 2,870
12년 전 조회 1,025
12년 전 조회 972
12년 전 조회 1,617
12년 전 조회 915
12년 전 조회 1,607
12년 전 조회 1,717
🐛 버그신고