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