이렇게 했는데 모바일상에는 오토플레이가 안되고 controls로만 되네요 클릭을 해야 플레이가 되는
좀 잡아 주십시요 모바일상에서도 오토플레이가 되면좋아서요^^;;
Copy
.v01{Margin:0 auto;width: 100%; height:50%;} .v01 * {Margin:0; padding:0;} .v01{ width:60%; } @media screen and (max-width: 1360px) { .v01{width:60% !important; height:50%}} @media screen and (max-width: 1160px) { .v01{width:60% !important; height:50%}} @media screen and (max-width: 830px) { .v01{width:60% !important;height:50%}} @media screen and (max-width: 630px) { .v01{width:100% !important;}}@media screen and (max-width:420px) { .v01{width:100% !important; }}<script type="text/javascript">function tab_change(num) { var tab_content; for (var i=1; i<=9; i++) { tab_content = document.getElementById("tab_content"+i); if (i==num) { tab_content.style.display = ""; } else { tab_content.style.display = "none"; } }} <div id="tab_content6" style="display:none;"><video src="/1111/0.mp4" class="v01" style="height:500px;" autoplay type="mp4" alt="map"/></div>
|
답변 3개 / 댓글 3개
채택된 답변
+20 포인트
9년 전
페이지 로딩이 되면서 자동으로 소리가 나오고 동영상이 재생되고...
분명 원하지 않는 사람들도 있을 텐데 말이죠.
그래서 이걸 모바일에서만 막았을 겁니다.
그러다가 최근에 iOS 10에서는 음소거가 된 채로 자동 재생이 되게 패치가 되었습니다.
<video width="600" height="480" autoplay muted playsinline></video>
https://webkit.org/blog/6784/new-video-policies-for-ios/
안드로이드에서는 크롬(53)부터 위와 마찬가지로 음소거가 된 채로 자동 재생이 허용되었구요.
https://developers.google.com/web/updates/2016/07/autoplay
말씀하신 페이스북 같은 경우는 자체 앱을 사용해서 할 겁니다.
카카오톡도 친구들끼리 링크 주고 받은 거 클릭해 보면 자체적으로 갖고 있는 브라우저에서는 동영상이 자동으로 재생이 됩니다.
Unknown
9년 전
ios 사파리에서는 보안을 이유로 autoplay를 할 수가 없게 되어 있습니다.
ios용 크롬 등 타 브라우저도 결국 사파리의 웹뷰를 이용하기 때문에 보안 정책은 같이 적용됩니다.
답변에 대한 댓글 1개
9년 전
html5 video 태그는 모바일에서 정상적인 방법으로는 autoplay를 사용할 수 없습니다.
흔히 스크립트를 통한 꽁수를 써야 가능합니다.
답변에 대한 댓글 2개
zkdlf
9년 전
function NextFrag(){
if (index < URLArray.length)
{
$("#VideoContainer").html('<video id="video1" controls autoplay width="95%"> "<source src= "'+ URLArray[index]+ '" type="video/mp4"></source> </video>' );
index++;
$("#video1").bind( "ended", NextFrag);
}
찾아보니 이런게 있긴하던데
if (index < URLArray.length)
{
$("#VideoContainer").html('<video id="video1" controls autoplay width="95%"> "<source src= "'+ URLArray[index]+ '" type="video/mp4"></source> </video>' );
index++;
$("#video1").bind( "ended", NextFrag);
}
찾아보니 이런게 있긴하던데
답변을 작성하려면 로그인이 필요합니다.