我的chromecast接收器有问题, 我重现没有问题的格式DRM(PlayReady)视频 集成lincensies(licenseUrl,licenseCustomData),这部分我没有问题。
我在激活字幕和更改视频音频时遇到的问题,在我的Android发件人中,视频在两种情况下都被冻结。
我正在使用github中的reciver示例:https://github.com/googlecast/CastReferencePlayer
Sender Android这些依赖项:
compile 'com.android.support:mediarouter-v7:25.0.0'
compile 'com.googlecode.android-query:android-query:0.25.9'
compile 'com.google.android.gms:play-services-cast-framework:9.4.0'
compile 'com.google.android.gms:play-services:9.4.0'
mediaInfo的配置如下:
private MediaInfo buildMediaInfo() {
MediaMetadata movieMetadata = new MediaMetadata(MediaMetadata.MEDIA_TYPE_GENERIC);
movieMetadata.putString(MediaMetadata.KEY_SUBTITLE, "STORKS");
movieMetadata.putString(MediaMetadata.KEY_TITLE, "CIGÜEÑAS: LA HISTORIA QUE NO TE CONTARON");
movieMetadata.addImage(new WebImage(Uri.parse("https://d1id64irsb2xux.cloudfront.net/images/3edaea38ef1a46bfab6b977ecb490378_192X288.jpg")));
movieMetadata.addImage(new WebImage(Uri.parse("https://d1id64irsb2xux.cloudfront.net/images/3edaea38ef1a46bfab6b977ecb490378_192X288.jpg")));
JSONObject jsonObj = null;
try {
jsonObj = new JSONObject();
jsonObj.put("customDataPR", "xxxxxxxxxxxxxxxxxxxx");
jsonObj.put("licenseServer", "xxxxxxxxxxxxxxxxxxxxx");
} catch (JSONException e) {
Log.e(TAG, "Failed to add description to the json object", e);
}
return new MediaInfo.Builder("http://d1fvtwjxzaawfl.cloudfront.net/usp-s3-storage/clear/zootopia/zootopia.ism/Manifest")
.setStreamType(MediaInfo.STREAM_TYPE_NONE)
.setContentType("application/vnd.ms-sstr+xml")
.setMetadata(movieMetadata)
.setCustomData(jsonObj)
.build();
}