三星电视mpeg-dash送货

Dev*_*and 12 samsung-smart-tv mpeg-dash

我正在编写一个新的应用程序,以向三星电视提供内容我正在使用应用程序框架和avplay播放器.

我们使用的内容是用Mpeg-Dash包装的H.264

我已按照下面提供的文档

三星PlayReady文档

我有一个下面提供的playerWrapper

的jsfiddle

var playerWrapper = {
    player: null,
    licenseServerURL : null,
    token : null,
    contentURL : null,
    duration: 0,
};

var playCallBack = {
oncurrentplaytime : function(time) { 
    playerWrapper.setCurTime(time);
    alert(window.debugStatement + 'current time: ' + time);
},
onresolutionchanged: function(width, height) { alert(window.debugStatement + 'resolution changed to width:' + width + ' height:' + height);},
onstreamcompleted: function() { alert(window.debugStatement + 'stream completed');},
onerror: function(error) { 
    console.log(JSON.stringify(error));
    alert(window.debugStatement + 'player error: ' + error);
}
};

var bufferingCallBack = {
onbufferingstart: function() {
    alert(window.debugStatement + 'buffering started');
    playerWrapper.setDuration();
},
onbufferingprogress: function(percent) { alert(window.debugStatement + 'buffering percent: ' + percent); },
onbufferingcomplete: function() { alert(window.debugStatement + 'buffering complete');}
};

playerWrapper.setContentURL = function(url){
playerWrapper.contentURL = url + '|COMPONENT=HAS';
// playerWrapper.contentURL = url + '|COMPONENT=WMDRM';
};

playerWrapper.setLicenserURL =  function(url){
playerWrapper.licenseServerURL = url;
playerWrapper.player.setPlayerProperty(4, playerWrapper.licenseServerURL, playerWrapper.licenseServerURL.length);
};

playerWrapper.setToken = function(token){
playerWrapper.token = token;
playerWrapper.player.setPlayerProperty(3, playerWrapper.token, playerWrapper.token.length);
};

playerWrapper.setCurTime = function(time){
alert(window.debugStatement + 'current time: ' +time);
};

playerWrapper.setWindow = function() {
playerWrapper.player.setDisplayRect({
    top: 58,
    left: 458,
    width: 472,
    height: 270
});
},

playerWrapper.configurePlayer = function(player){
alert(window.debugStatement + 'Setting AVPlayer ');
playerWrapper.player = player; 
playerWrapper.player.init({
    containerID: 'player_container',
    bufferingCallback: bufferingCallBack,
    playCallback: playCallBack,
    displayRect: {
        top: 0,
        left: 0,
        width: 1920,
        height: 1080
    },
    autoRatio: true,
});
};

playerWrapper.getPlayerError = function(error){
alert(window.debugStatement + 'AVPlayer FETCH ERROR');
};

playerWrapper.setDuration = function() {
currentDuration = Player.AVPlayer.getDuration();
alert(window.debugStatement + 'current duration: ' + currentDuration);
playerWrapper.duration = convertTime(currentDuration);
};

playerWrapper.play = function(){
try{
    playerWrapper.player.open(
        playerWrapper.contentURL,
        {
            drm : {
                type : "Playready",
                company : 'Microsoft Corporation',
                deviceID : '1'
            }
        });
    playerWrapper.player.play(playerWrapper.playSuccess,    playerWrapper.playError);
}catch(error){
    alert(window.debugStatement + 'play error: ' + error);
}

};

playerWrapper.playSuccess = function(){
alert(window.debugStatement + 'success');
};

playerWrapper.playError = function(error){
alert(window.debugStatement + 'play error: ' + error);
},

playerWrapper.init = function(){
try{
    webapis.avplay.getAVPlay(playerWrapper.configurePlayer,     playerWrapper.getPlayerError);
    if(typeof playerWrapper.player === 'undefined') throw 'player fetch failure';
    return playerWrapper;
}catch(error){
    alert(window.debugStatement + 'AVPlayer Initialisation ERROR: ' + error);
}
};
Run Code Online (Sandbox Code Playgroud)

此类是从主app.js文件初始化的,该文件仅遵循此工作流程

  1. 调用playerWrapper init
  2. 设置许可网址
  3. 设置内容网址
  4. 设置令牌
  5. 打电话

看来,当使用PlayReady插件或文档中描述的SetPlayerProperty方法时,电视不会呼叫许可证服务器.

看看播放器规格我可以看到Mpeg-Dash和H.264都支持.

播放器规格

我的问题是

  1. 我该怎么做才能解决这个问题?
  2. 谁有人看到这个错误的文档,好像我可以得到这至少我会有一个起点?