Samsung Smart TV streaming MPEG DASH with PlayRead

自作多情 提交于 2019-12-06 06:20:57

问题


I try to play stream (MPEG-DASH with PlayReady) on Orsay TV (Samsung TV before Tizen). Unencrypted DASH is working fine. I'm trying to acquire licence strictly according to DRM Today manual (that is my DRM provider), but the playback doesn't start, and after a while I get rendering error, or no stream at all. CustomData is generated due the DRM provider specification and it works on other platforms and devices. It's base64 hashed to customDataBase64 due to the DRM provider's manual.

<object id="pluginPlayerSef" classid="clsid:SAMSUNG-INFOLINK-SEF" style="border:none; width:0px;height:0px;"></object>
<object id="pluginDRM" classid="clsid:SAMSUNG-INFOLINK-SEF"></object>

var playerPlugin = document.getElementById("pluginPlayerSef");
var streamUrl = '...' + '|COMPONENT=HAS';
var laUrl = 'https://.../RightsManager.asmx';
var customData = {'userId': '...', 'sessionId': '...', 'merchant': '...'};
var customDataBase64 = 'eyJ1c2...';

var xmlData = '<?xml version='1.0' encoding='utf-8'?>' +
'<PlayReadyInitiator xmlns='http://schemas.microsoft.com/DRM/2007/03/protocols/'>' +
    '<LicenseServerUriOverride>' +
        '<LA_URL>' + laUrl + '</LA_URL>' +
    '</LicenseServerUriOverride>' +
    '<SetCustomData>' +
        '<CustomData>' + customDataBase64 + '</CustomData>' +
    '</SetCustomData>' +
'</PlayReadyInitiator>';

playerPlugin.Execute("InitPlayer", streamUrl);
playerPlugin.Execute("SetPlayerProperty", 3, customDataBase64, customDataBase64.length);
playerPlugin.Execute("SetPlayerProperty", 4, laUrl, laUrl.length);
playerPlugin.Execute('StartPlayback', 0);                  

And I tried also another way to implement it:

var pluginDRM = document.getElementById("pluginDRM");
pluginDRM.Open("PlayReadyDrm", "1.000", "PlayReadyDrm");
pluginDRM.Execute("ProcessInitiatorsFromXml", xmlData, xmlData.length);
pluginDRM.Execute("Start", streamUrl);  
playerPlugin.Execute("InitPlayer", streamUrl);
playerPlugin.Execute('StartPlayback', 0);

I tried the code above with and without the line pluginDRM.Execute("Start", streamUrl)

As for component part above at the top, I tried all of these:

var streamUrl = '...' + '|COMPONENT=HAS';
var streamUrl = '...' + '|COMPONENT=WMDRM';
var streamUrl = '...' + '|COMPONENT=HAS|DRM_TYPE=PLAYREADY';
var streamUrl = '...' + '|COMPONENT=HAS|DRM_TYPE=WMDRM';    

What am I doing wrong? Please help.

来源:https://stackoverflow.com/questions/40174746/samsung-smart-tv-streaming-mpeg-dash-with-playread

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!