我在iPhone模拟器上使用iOS Chromecast应用,当我尝试投放视频时(比如Big Buck Bunny),示例视频几乎立即启动。然而,当我使用来自源http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/的相同JSON文件(videos-enhanced-b.json)托管(使用godaddy.com ost服务)相同的视频/ mp4(Bigbuckbunny.mp4)时,需要大约2分钟才能渲染?任何解释都非常感谢。谢谢
我的media.h如下:
#import <Foundation/Foundation.h>
#define MEDIA_URL_BASE @"http://www.myhosturl.com/subdirectory/"
#define MEDIA_URL_FILE @"videos-enhanced-b.json"
答案 0 :(得分:0)
我建议您打开浏览器并指向接收器上的端口9222并观察消息进来以查看导致延迟的原因。发件人应用程序将加载消息直接发送到您的接收器,因此显然非常快(并且无论您的媒体是在这里还是那里都无关紧要)但在此之后,接收方必须从您的站点获取电影并进行渲染那。观察日志,看看你是否注意到任何异常。此外,从您的WiFi网络和笔记本电脑上,尝试下载电影(例如,将浏览器指向它),看看它的表现如何。
答案 1 :(得分:0)
根据我从X-Code获得的日志,在“媒体控制频道元数据更改”后大约需要3分钟,如下所示。
2014-02-17 00:08:45.337 YouCast[1510:a0b] -[GCKMediaControlChannel didReceiveTextMessage:] message received: {"type":"MEDIA_STATUS","status":[{"mediaSessionId":1,"playbackRate":1,"playerState":"PAUSED","currentTime":0,"supportedMediaCommands":15,"volume":{"level":1,"muted":false},"media":{"contentId":"http://myurl.com/dd1.mp4","streamType":"NONE","duration":40.77424,"contentType":"video/mp4","metadata":{"title":"Elephant Dream","images":[{"url":"http://myurl.com/images_480x270/ElephantsDream.jpg","width":200,"height":100}],"metadataType":0,"subtitle":"Blender Foundation"}}}],"requestId":3}
2014-02-17 00**:08:45.338** YouCast[1510:a0b] Media control channel status changed
**2014-02-17 0**0:08:45.34**0 YouCast[1510:a0b] Media control channel metadata changed
2014-02-17 00:08:48.617 YouCast[1510:a0b] -[GCKCastSocket socket:didReadData:withTag:] prefix read, expected message length=248**
2014-02-17 00:08:48.618 YouCast[1510:a0b] -[GCKMediaControlChannel didReceiveTextMessage:] message received: {"type":"MEDIA_STATUS","status":[{"mediaSessionId":1,"playbackRate":1,"playerState":"PLAYING","currentTime":1.291666,"supportedMediaCommands":15,"volume":{"level":1,"muted":false}}],"requestId":0}
Note:not able to point chrome browser to 9222