를 발행하지만 모바일 버전에서 나는이 문제가 :시간 dailymotion API를 모바일 웹 사이트는 아무 문제가없는 데스크톱 브라우저에서, 내 웹 페이지에 포함 된 동영상을 재생하려고
- 비디오 습관이보기 자동
- 시작을 오른쪽 하단 모서리에 Dailymotion 로고입니다
나는 https://api.dmcdn.net/all.js 파일에서 제공하는 DM 개체를 사용하고 있습니다.
코드 :
<script src="https://api.dmcdn.net/all.js"></script>
<script>
DM.init({
apiKey: 'correct api key',
status: true, // check login status
cookie: true // enable cookies to allow the server to access the session
});
</script>
<div id="player{$img->getId()}" class="dailymotion tile"></div>
<script>
$(function() {
var player{$img->getId()} = DM.player(document.getElementById("player{$img->getId()}"), {
{var DMurl = explode("/", $img->getImgUrl())}
video: {$DMurl[count($DMurl) - 1]},
width: "100%",
height: "100%",
params: {
autoplay: true,
mute: true,
endscreen-enable: false,
ui-logo: true,
controls: false
}
});
player{$img->getId()}.play();
});
</script>
내 문제는 PARAMS (endscreen은 활성화 및 UI 로고, phpstorm 때문에의 구문 오류를 보여주는 '-'문자)에 구문 오류가 발생할 수 있습니다