Embed: fix for empty metatracks

This commit is contained in:
Cat 2016-11-11 14:21:54 +01:00 committed by Thulinma
parent 421e239bd9
commit 59d5ee2cba
2 changed files with 8 additions and 3 deletions

View file

@ -733,6 +733,7 @@ function mistPlay(streamName,options) {
};
for (var i in streaminfo.meta.tracks) {
var t = streaminfo.meta.tracks[i];
var skip = false;
switch (t.type) {
case 'video':
t.desc = ['['+t.codec+']',t.width+'x'+t.height,Math.round(t.bps/1024)+'kbps',t.fpks/1e3+'fps',t.lang];
@ -743,7 +744,11 @@ function mistPlay(streamName,options) {
case 'subtitle':
t.desc = ['['+t.codec+']',t.lang];
break;
default:
skip = true;
break;
}
if (skip) { continue; }
t.desc = t.desc.join(', ');
tracks[t.type].push(t);
}

View file

@ -15,7 +15,7 @@
<script>
// global options can be set here
var mistoptions = {
host: 'https://cat.mistserver.org:4433'
host: 'http://cattop:8080'
};
</script>
@ -75,10 +75,10 @@
c.className = 'mistvideo';
c.title = tryplayers[i];
document.body.appendChild(c);
//mistPlay('live',{
mistPlay('live',{
//mistPlay('vids+mist.mp4',{
//mistPlay('lama',{
mistPlay('bunny',{
//mistPlay('bunny',{
target: c,
forcePlayer: tryplayers[i],
loop: true