我一直在尝试弄清楚如何让dash.js (MPEG-Dash)与.ism编码的平滑流式文件一起工作。从下面提供的链接中可以看到,它们使用的是.ism文件。当我尝试使用编码的.ism视频,并附加/manifest(format=mpd-time-csf)时,我在控制台中得到以下错误代码:415 (Unsupported Media Type)
我正在使用微软表达式编码器来构建.ism文件,但是这通常与Silverlight插件一起使用来流式传输视频。有没有可能让.ism可以在dash.js上播放?
Embedding a MPEG-DASH Adaptive Streaming Video in an HTML5 Application with DASH.js
Serving MPEG DASH with the Microsoft IIS Smooth Streaming Media Extension
<html>
<head>
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/dash.all.js"></script>
<style>
video {
width: 40%;
height: 40%;
}
</style>
<script>
// setup the video element and attach it to the Dash player
function setupVideo() {
var url = "video.ism/manifest(format=mpd-time-csf)";
var context = new Dash.di.DashContext();
var player = new MediaPlayer(context);
player.startup();
player.attachView(document.querySelector("#videoplayer"));
player.attachSource(url);
}
</script>
</head><body onload="setupVideo()">
<video id="videoplayer" controls></video>
</body></html>发布于 2016-05-08 19:45:51
你可以使用hasplayer.js,它扩展了dash.js对SmoothStreaming的支持。
(function(){
var url = "http://playready.directtaps.net/smoothstreaming/SSWSS720H264/SuperSpeedway_720.ism/Manifest";
var context = new MediaPlayer.di.Context();
var player = new MediaPlayer(context);
player.startup();
player.attachView(document.querySelector("#videoPlayer"));
player.attachSource(url);
})();发布于 2014-12-01 07:02:05
一种不同的解决方案是使用Universal Streaming的工具。
(我与他们没有任何联系)
https://stackoverflow.com/questions/25961638
复制相似问题