2014-02-05 3 views
0

Google Cast SDK의 새 공개 버전에서 적응 형 HLS를 작동하는 데 문제가있었습니다 (다른 질문으로 저장하게 됨). SDK의 개발자 미리보기 버전에서 정상적으로 작동하는 점진적 MP4로 되돌리고 싶었습니다.Chromecast 프로그레시브 MP4 재생에서 자르기 비디오 확대, 스크롤바 표시

동영상이 재생되지만 문제가있는 경우 화면이 확대되고 화면에 스크롤 막대가 나타납니다.

var mediaInfo = new chrome.cast.media.MediaInfo('http://url_to_progressive_mp4.mp4'); 
mediaInfo.contentType = 'video/mp4'; 
mediaInfo.streamType = chrome.cast.media.StreamType.BUFFERED; 
mediaInfo.duration = 1732; 

http://url_to_progressive_mp4.mp4가 나는 등 그것을 크롬 (브라우저), VLC, 그것을 열 수, CloudFront를 서명 된 URL입니다 : 여기

는 Mediainfo를 인스턴스를 만들어 내 크롬 보낸 코드의 섹션 SDK의 개발자 미리보기 릴리스에서도 제대로 작동했습니다.

내 수신기는 문서의 예와 같은 사용자 정의 수신기이며 :

<html> 
<head> 
    <title>Cast</title> 
    <script src="//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js"></script> 
</head> 
<body> 
    <video id='media'/> 
    <script> 
    window.onload = function() { 
     window.mediaElement = document.getElementById('media'); 
     window.mediaManager = new cast.receiver.MediaManager(window.mediaElement); 
     window.castReceiverManager = cast.receiver.CastReceiverManager.getInstance(); 
     window.castReceiverManager.start(); 
    } 
    </script> 
</body> 

가 이렇게 왜 내가 이해할 수없는 내가 작업 MP4를 얻으려면 나는 HLS를 계속하기 전에 다시.

답변

0

주연의 팀 상태 그들의 Github 페이지의 simple receiver 샘플 응용 프로그램의 receiver.html에 다음

We find that having everything fit in the HTML boxes tends to look nicer on TV 
so, we also set overflow: hidden, which clips all flowing outside of boxes or 
adding of scrollbars, which aren't useful on TV. 
--> 
<style type="text/css"> 
    @import url(http://fonts.googleapis.com/css?family=Droid+Serif:400,700); 
    body { 
    font-family: "Droid Serif", serif; 
    color: #444; 
    line-height: 150%; 
    border: 0px; 
    margin: 0px; 
    width: 100%; 
    height: 100%; 
    overflow: hidden !important; 
    } 
    video { 
    width: 100%; 
    height: 100%; 
    margin: auto auto; 
    overflow: hidden !important; 
    } 
</style> 
0

나는 다음에 내 수신기에서 비디오 태그를 변경하여 고정 :

<video id='media' width="100%" height="auto" />

그들은 그들의 문서를 업데이트하고 고객 수신기 페이지의 예를 변경해야합니다 : https://developers.google.com/cast/docs/custom_receiver

그것을 기본적으로 SDK의 스크립트는 350px 너비로 크기를 조정합니다.

관련 문제